Interface AgentInstanceBuilder


public interface AgentInstanceBuilder
Helper for starting a new agent instance. An instance can be obtained through the AgentRuntimeService. agentDefinitionId or agentDefinitionKey should be set before calling start() to start an agent instance.
Author:
Tijs Rademakers
  • Method Details

    • agentDefinitionId

      AgentInstanceBuilder agentDefinitionId(String agentDefinitionId)
      Set the id of the agent definition
    • agentDefinitionKey

      AgentInstanceBuilder agentDefinitionKey(String agentDefinitionKey)
      Set the key of the agent definition, latest version of the agent definition with the given key. If agentDefinitionId was set this will be ignored
    • agentDefinitionParentDeploymentId

      AgentInstanceBuilder agentDefinitionParentDeploymentId(String parentDeploymentId)
      When looking up for an agent definition by key it would first lookup for an agent definition within the given parent deployment. Then it will fallback to the latest agent definition with the given key.
    • operationKey

      AgentInstanceBuilder operationKey(String operationKey)
      Set the operation key of the operation used to invoke the agent
    • startUserId

      AgentInstanceBuilder startUserId(String startUserId)
      Set the start user id of agent instance
    • withUserId

      AgentInstanceBuilder withUserId(String permissionUserId)
      Set the permission user id of an agent instance
    • withUserGroupKeys

      AgentInstanceBuilder withUserGroupKeys(Set<String> userGroupKeys)
      Set the permission group keys of an agent instance
    • tenantId

      AgentInstanceBuilder tenantId(String tenantId)
      Set the tenant id of agent instance
    • variables

      AgentInstanceBuilder variables(Map<String,Object> variables)
      Sets variables passed to the agent instance.
    • callbackId

      AgentInstanceBuilder callbackId(String callbackId)
      Sets the callback id to the agent instance.
    • callbackType

      AgentInstanceBuilder callbackType(String callbackType)
      Sets the callback type to the agent instance.
    • start

      AgentInstance start()
      Start the agent instance
      Throws:
      org.flowable.common.engine.api.FlowableIllegalArgumentException - if agentDefinitionKey and agentDefinitionId are null
      org.flowable.common.engine.api.FlowableObjectNotFoundException - when no agent definition is deployed with the given agentDefinitionKey or agentDefinitionId