Package com.flowable.agent.api.runtime
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 Summary
Modifier and TypeMethodDescriptionagentDefinitionId
(String agentDefinitionId) Set the id of the agent definitionagentDefinitionKey
(String agentDefinitionKey) Set the key of the agent definition, latest version of the agent definition with the given key.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.callbackId
(String callbackId) Sets the callback id to the agent instance.callbackType
(String callbackType) Sets the callback type to the agent instance.operationKey
(String operationKey) Set the operation key of the operation used to invoke the agentstart()
Start the agent instancestartUserId
(String startUserId) Set the start user id of agent instanceSet the tenant id of agent instanceSets variables passed to the agent instance.withUserGroupKeys
(Set<String> userGroupKeys) Set the permission group keys of an agent instancewithUserId
(String permissionUserId) Set the permission user id of an agent instance
-
Method Details
-
agentDefinitionId
Set the id of the agent definition -
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
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
Set the operation key of the operation used to invoke the agent -
startUserId
Set the start user id of agent instance -
withUserId
Set the permission user id of an agent instance -
withUserGroupKeys
Set the permission group keys of an agent instance -
tenantId
Set the tenant id of agent instance -
variables
Sets variables passed to the agent instance. -
callbackId
Sets the callback id to the agent instance. -
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 nullorg.flowable.common.engine.api.FlowableObjectNotFoundException
- when no agent definition is deployed with the given agentDefinitionKey or agentDefinitionId
-