public interface RuntimeService
Modifier and Type | Method and Description |
---|---|
void |
activateProcessInstanceById(String processInstanceId)
Activates the process instance with the given id.
|
void |
addEventListener(ActivitiEventListener listenerToAdd)
Adds an event-listener which will be notified of ALL events by the dispatcher.
|
void |
addEventListener(ActivitiEventListener listenerToAdd,
ActivitiEventType... types)
Adds an event-listener which will only be notified when an event occurs, which type is in the given types.
|
void |
addGroupIdentityLink(String processInstanceId,
String groupId,
String identityLinkType)
Involves a group with a process instance.
|
void |
addParticipantGroup(String processInstanceId,
String groupId)
Convenience shorthand for
addGroupIdentityLink(String, String, String) ; with type IdentityLinkType.CANDIDATE |
void |
addParticipantUser(String processInstanceId,
String userId)
Convenience shorthand for
addUserIdentityLink(String, String, String) ; with type IdentityLinkType.CANDIDATE |
void |
addUserIdentityLink(String processInstanceId,
String userId,
String identityLinkType)
Involves a user with a process instance.
|
void |
completeAdhocSubProcess(String executionId)
Completes the ad-hoc sub process
|
ExecutionQuery |
createExecutionQuery()
Creates a new
ExecutionQuery instance, that can be used to query the executions and process instances. |
NativeExecutionQuery |
createNativeExecutionQuery()
creates a new
NativeExecutionQuery to query Execution s by SQL directly |
NativeProcessInstanceQuery |
createNativeProcessInstanceQuery()
creates a new
NativeProcessInstanceQuery to query ProcessInstance s by SQL directly |
ProcessInstanceBuilder |
createProcessInstanceBuilder()
Create a
ProcessInstanceBuilder , that allows to set various options for starting a process instance,
as an alternative to the various startProcessInstanceByXX methods. |
ProcessInstanceQuery |
createProcessInstanceQuery()
Creates a new
ProcessInstanceQuery instance, that can be used to query process instances. |
void |
deleteGroupIdentityLink(String processInstanceId,
String groupId,
String identityLinkType)
Removes the association between a group and a process instance for the given identityLinkType.
|
void |
deleteParticipantGroup(String processInstanceId,
String groupId)
Convenience shorthand for
deleteGroupIdentityLink(String, String, String) ; with type IdentityLinkType.CANDIDATE |
void |
deleteParticipantUser(String processInstanceId,
String userId)
Convenience shorthand for
deleteUserIdentityLink(String, String, String) ; with type IdentityLinkType.CANDIDATE |
void |
deleteProcessInstance(String processInstanceId,
String deleteReason)
Delete an existing runtime process instance.
|
void |
deleteUserIdentityLink(String processInstanceId,
String userId,
String identityLinkType)
Removes the association between a user and a process instance for the given identityLinkType.
|
void |
dispatchEvent(ActivitiEvent event)
Dispatches the given event to any listeners that are registered.
|
Execution |
executeActivityInAdhocSubProcess(String executionId,
String activityId)
Executes an activity in a ad-hoc sub process
|
List<String> |
getActiveActivityIds(String executionId)
Finds the activity ids for all executions that are waiting in activities.
|
DataObject |
getDataObject(String executionId,
String dataObject)
The DataObject.
|
DataObject |
getDataObject(String executionId,
String dataObjectName,
String locale,
boolean withLocalizationFallback)
The DataObject.
|
DataObject |
getDataObjectLocal(String executionId,
String dataObjectName)
The DataObject for an execution.
|
DataObject |
getDataObjectLocal(String executionId,
String dataObjectName,
String locale,
boolean withLocalizationFallback)
The DataObject for an execution.
|
Map<String,DataObject> |
getDataObjects(String executionId)
All DataObjects visible from the given execution scope (including parent scopes).
|
Map<String,DataObject> |
getDataObjects(String executionId,
Collection<String> dataObjectNames)
The DataObjects for all given dataObjectNames, takes all dataObjects into account which are visible from the given execution scope (including parent scopes).
|
Map<String,DataObject> |
getDataObjects(String executionId,
Collection<String> dataObjectNames,
String locale,
boolean withLocalizationFallback)
The DataObjects for all given dataObjectNames, takes all dataObjects into account which are visible from the given execution scope (including parent scopes).
|
Map<String,DataObject> |
getDataObjects(String executionId,
String locale,
boolean withLocalizationFallback)
All DataObjects visible from the given execution scope (including parent scopes).
|
Map<String,DataObject> |
getDataObjectsLocal(String executionId)
All DataObject values that are defined in the execution scope, without taking outer scopes into account.
|
Map<String,DataObject> |
getDataObjectsLocal(String executionId,
Collection<String> dataObjects)
The DataObjects for the given dataObjectNames only taking the given execution scope into account, not looking in outer scopes.
|
Map<String,DataObject> |
getDataObjectsLocal(String executionId,
Collection<String> dataObjectNames,
String locale,
boolean withLocalizationFallback)
The DataObjects for the given dataObjectNames only taking the given execution scope into account, not looking in outer scopes.
|
Map<String,DataObject> |
getDataObjectsLocal(String executionId,
String locale,
boolean withLocalizationFallback)
All DataObject values that are defined in the execution scope, without taking outer scopes into account.
|
List<org.activiti.bpmn.model.FlowNode> |
getEnabledActivitiesFromAdhocSubProcess(String executionId)
Gets enabled activities from ad-hoc sub process
|
List<IdentityLink> |
getIdentityLinksForProcessInstance(String instanceId)
Retrieves the
IdentityLink s associated with the given process instance. |
List<Event> |
getProcessInstanceEvents(String processInstanceId)
The all events related to the given Process Instance.
|
Object |
getVariable(String executionId,
String variableName)
The variable value.
|
<T> T |
getVariable(String executionId,
String variableName,
Class<T> variableClass)
The variable value.
|
org.activiti.engine.impl.persistence.entity.VariableInstance |
getVariableInstance(String executionId,
String variableName)
The variable.
|
org.activiti.engine.impl.persistence.entity.VariableInstance |
getVariableInstanceLocal(String executionId,
String variableName)
The variable for an execution.
|
Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> |
getVariableInstances(String executionId)
All variables visible from the given execution scope (including parent scopes).
|
Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> |
getVariableInstances(String executionId,
Collection<String> variableNames)
The variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).
|
List<org.activiti.engine.impl.persistence.entity.VariableInstance> |
getVariableInstancesByExecutionIds(Set<String> executionIds)
All variables visible from the given execution scope (including parent
scopes).
|
Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> |
getVariableInstancesLocal(String executionId)
All variable values that are defined in the execution scope, without taking outer scopes into account.
|
Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> |
getVariableInstancesLocal(String executionId,
Collection<String> variableNames)
The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.
|
Object |
getVariableLocal(String executionId,
String variableName)
The variable value for an execution.
|
<T> T |
getVariableLocal(String executionId,
String variableName,
Class<T> variableClass)
The variable value for an execution.
|
Map<String,Object> |
getVariables(String executionId)
All variables visible from the given execution scope (including parent scopes).
|
Map<String,Object> |
getVariables(String executionId,
Collection<String> variableNames)
The variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).
|
Map<String,Object> |
getVariablesLocal(String executionId)
All variable values that are defined in the execution scope, without taking outer scopes into account.
|
Map<String,Object> |
getVariablesLocal(String executionId,
Collection<String> variableNames)
The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.
|
boolean |
hasVariable(String executionId,
String variableName)
Check whether or not this execution has variable set with the given name, Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes).
|
boolean |
hasVariableLocal(String executionId,
String variableName)
Check whether or not this execution has a local variable set with the given name.
|
void |
messageEventReceived(String messageName,
String executionId)
Notifies the process engine that a message event with name 'messageName' has been received and has been correlated to an execution with id 'executionId'.
|
void |
messageEventReceived(String messageName,
String executionId,
Map<String,Object> processVariables)
Notifies the process engine that a message event with the name 'messageName' has been received and has been correlated to an execution with id 'executionId'.
|
void |
messageEventReceivedAsync(String messageName,
String executionId)
Notifies the process engine that a message event with the name 'messageName' has been received and has been correlated to an execution with id 'executionId'.
|
void |
removeEventListener(ActivitiEventListener listenerToRemove)
Removes the given listener from this dispatcher.
|
void |
removeVariable(String executionId,
String variableName)
Removes a variable for an execution.
|
void |
removeVariableLocal(String executionId,
String variableName)
Removes a variable for an execution (not considering parent scopes).
|
void |
removeVariables(String executionId,
Collection<String> variableNames)
Removes variables for an execution.
|
void |
removeVariablesLocal(String executionId,
Collection<String> variableNames)
Remove variables for an execution (not considering parent scopes).
|
void |
setProcessInstanceName(String processInstanceId,
String name)
Sets the name for the process instance with the given id.
|
void |
setVariable(String executionId,
String variableName,
Object value)
Update or create a variable for an execution.
|
void |
setVariableLocal(String executionId,
String variableName,
Object value)
Update or create a variable for an execution (not considering parent scopes).
|
void |
setVariables(String executionId,
Map<String,? extends Object> variables)
Update or create given variables for an execution (including parent scopes).
|
void |
setVariablesLocal(String executionId,
Map<String,? extends Object> variables)
Update or create given variables for an execution (not considering parent scopes).
|
void |
signalEventReceived(String signalName)
Notifies the process engine that a signal event of name 'signalName' has been received.
|
void |
signalEventReceived(String signalName,
Map<String,Object> processVariables)
Notifies the process engine that a signal event of name 'signalName' has been received.
|
void |
signalEventReceived(String signalName,
String executionId)
Notifies the process engine that a signal event of name 'signalName' has been received.
|
void |
signalEventReceived(String signalName,
String executionId,
Map<String,Object> processVariables)
Notifies the process engine that a signal event of name 'signalName' has been received.
|
void |
signalEventReceivedAsync(String signalName)
Notifies the process engine that a signal event of name 'signalName' has been received.
|
void |
signalEventReceivedAsync(String signalName,
String executionId)
Notifies the process engine that a signal event of name 'signalName' has been received.
|
void |
signalEventReceivedAsyncWithTenantId(String signalName,
String tenantId)
Similar to
signalEventReceivedAsync(String) , but within the context of one tenant. |
void |
signalEventReceivedWithTenantId(String signalName,
Map<String,Object> processVariables,
String tenantId)
Similar to
#signalEventReceived(String, Map , but within the context of one tenant. |
void |
signalEventReceivedWithTenantId(String signalName,
String tenantId)
Similar to
signalEventReceived(String) , but within the context of one tenant. |
ProcessInstance |
startProcessInstanceById(String processDefinitionId)
Starts a new process instance in the exactly specified version of the process definition with the given id.
|
ProcessInstance |
startProcessInstanceById(String processDefinitionId,
Map<String,Object> variables)
Starts a new process instance in the exactly specified version of the process definition with the given id.
|
ProcessInstance |
startProcessInstanceById(String processDefinitionId,
String businessKey)
Starts a new process instance in the exactly specified version of the process definition with the given id.
|
ProcessInstance |
startProcessInstanceById(String processDefinitionId,
String businessKey,
Map<String,Object> variables)
Starts a new process instance in the exactly specified version of the process definition with the given id.
|
ProcessInstance |
startProcessInstanceByKey(String processDefinitionKey)
Starts a new process instance in the latest version of the process definition with the given key.
|
ProcessInstance |
startProcessInstanceByKey(String processDefinitionKey,
Map<String,Object> variables)
Starts a new process instance in the latest version of the process definition with the given key
|
ProcessInstance |
startProcessInstanceByKey(String processDefinitionKey,
String businessKey)
Starts a new process instance in the latest version of the process definition with the given key.
|
ProcessInstance |
startProcessInstanceByKey(String processDefinitionKey,
String businessKey,
Map<String,Object> variables)
Starts a new process instance in the latest version of the process definition with the given key.
|
ProcessInstance |
startProcessInstanceByKeyAndTenantId(String processDefinitionKey,
Map<String,Object> variables,
String tenantId)
Similar to
startProcessInstanceByKey(String, Map) , but using a specific tenant identifier. |
ProcessInstance |
startProcessInstanceByKeyAndTenantId(String processDefinitionKey,
String tenantId)
Similar to
startProcessInstanceByKey(String) , but using a specific tenant identifier. |
ProcessInstance |
startProcessInstanceByKeyAndTenantId(String processDefinitionKey,
String businessKey,
Map<String,Object> variables,
String tenantId)
Similar to
startProcessInstanceByKey(String, String, Map) , but using a specific tenant identifier. |
ProcessInstance |
startProcessInstanceByKeyAndTenantId(String processDefinitionKey,
String businessKey,
String tenantId)
Similar to
startProcessInstanceByKey(String, String) , but using a specific tenant identifier. |
ProcessInstance |
startProcessInstanceByMessage(String messageName)
Signals the process engine that a message is received and starts a new
ProcessInstance . |
ProcessInstance |
startProcessInstanceByMessage(String messageName,
Map<String,Object> processVariables)
Signals the process engine that a message is received and starts a new
ProcessInstance . |
ProcessInstance |
startProcessInstanceByMessage(String messageName,
String businessKey)
Signals the process engine that a message is received and starts a new
ProcessInstance . |
ProcessInstance |
startProcessInstanceByMessage(String messageName,
String businessKey,
Map<String,Object> processVariables)
Signals the process engine that a message is received and starts a new
ProcessInstance . |
ProcessInstance |
startProcessInstanceByMessageAndTenantId(String messageName,
Map<String,Object> processVariables,
String tenantId)
Similar to
RuntimeService#startProcessInstanceByMessage(String, Map , but with tenant context. |
ProcessInstance |
startProcessInstanceByMessageAndTenantId(String messageName,
String tenantId)
Similar to
startProcessInstanceByMessage(String) , but with tenant context. |
ProcessInstance |
startProcessInstanceByMessageAndTenantId(String messageName,
String businessKey,
Map<String,Object> processVariables,
String tenantId)
Similar to
RuntimeService#startProcessInstanceByMessage(String, String, Map , but with tenant context. |
ProcessInstance |
startProcessInstanceByMessageAndTenantId(String messageName,
String businessKey,
String tenantId)
Similar to
startProcessInstanceByMessage(String, String) , but with tenant context. |
void |
suspendProcessInstanceById(String processInstanceId)
Suspends the process instance with the given id.
|
void |
trigger(String executionId)
Sends an external trigger to an activity instance that is waiting inside the given execution.
|
void |
trigger(String executionId,
Map<String,Object> processVariables)
Sends an external trigger to an activity instance that is waiting inside the given execution.
|
void |
trigger(String executionId,
Map<String,Object> processVariables,
Map<String,Object> transientVariables)
Similar to
trigger(String, Map) , but with an extra parameter that allows to pass
transient variables. |
void |
updateBusinessKey(String processInstanceId,
String businessKey)
Updates the business key for the provided process instance
|
ProcessInstanceBuilder createProcessInstanceBuilder()
ProcessInstanceBuilder
, that allows to set various options for starting a process instance,
as an alternative to the various startProcessInstanceByXX methods.ProcessInstance startProcessInstanceByKey(String processDefinitionKey)
processDefinitionKey
- key of process definition, cannot be null.ActivitiObjectNotFoundException
- when no process definition is deployed with the given key.ProcessInstance startProcessInstanceByKey(String processDefinitionKey, String businessKey)
ProcessInstanceQuery.processInstanceBusinessKey(String)
. Providing such a business key is definitely a
best practice.processDefinitionKey
- key of process definition, cannot be null.businessKey
- a key that uniquely identifies the process instance in the context or the given process definition.ActivitiObjectNotFoundException
- when no process definition is deployed with the given key.ProcessInstance startProcessInstanceByKey(String processDefinitionKey, Map<String,Object> variables)
processDefinitionKey
- key of process definition, cannot be null.variables
- the variables to pass, can be null.ActivitiObjectNotFoundException
- when no process definition is deployed with the given key.ProcessInstance startProcessInstanceByKey(String processDefinitionKey, String businessKey, Map<String,Object> variables)
ProcessInstanceQuery.processInstanceBusinessKey(String)
. Providing such a business key is definitely a
best practice.
The combination of processdefinitionKey-businessKey must be unique.processDefinitionKey
- key of process definition, cannot be null.variables
- the variables to pass, can be null.businessKey
- a key that uniquely identifies the process instance in the context or the given process definition.ActivitiObjectNotFoundException
- when no process definition is deployed with the given key.ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey, String tenantId)
startProcessInstanceByKey(String)
, but using a specific tenant identifier.ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey, String businessKey, String tenantId)
startProcessInstanceByKey(String, String)
, but using a specific tenant identifier.ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey, Map<String,Object> variables, String tenantId)
startProcessInstanceByKey(String, Map)
, but using a specific tenant identifier.ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey, String businessKey, Map<String,Object> variables, String tenantId)
startProcessInstanceByKey(String, String, Map)
, but using a specific tenant identifier.ProcessInstance startProcessInstanceById(String processDefinitionId)
processDefinitionId
- the id of the process definition, cannot be null.ActivitiObjectNotFoundException
- when no process definition is deployed with the given key.ProcessInstance startProcessInstanceById(String processDefinitionId, String businessKey)
ProcessInstanceQuery.processInstanceBusinessKey(String)
. Providing such a business key is definitely a
best practice.processDefinitionId
- the id of the process definition, cannot be null.businessKey
- a key that uniquely identifies the process instance in the context or the given process definition.ActivitiObjectNotFoundException
- when no process definition is deployed with the given key.ProcessInstance startProcessInstanceById(String processDefinitionId, Map<String,Object> variables)
processDefinitionId
- the id of the process definition, cannot be null.variables
- variables to be passed, can be nullActivitiObjectNotFoundException
- when no process definition is deployed with the given key.ProcessInstance startProcessInstanceById(String processDefinitionId, String businessKey, Map<String,Object> variables)
ProcessInstanceQuery.processInstanceBusinessKey(String)
. Providing such a business key is definitely a
best practice.processDefinitionId
- the id of the process definition, cannot be null.variables
- variables to be passed, can be nullActivitiObjectNotFoundException
- when no process definition is deployed with the given key.ProcessInstance startProcessInstanceByMessage(String messageName)
Signals the process engine that a message is received and starts a new ProcessInstance
.
Calling this method can have two different outcomes:
ActivitiException
is thrownmessageName
- the 'name' of the message as specified as an attribute on the bpmn20 <message name="messageName" />
element.ProcessInstance
object representing the started process instanceActivitiException
- if no subscription to a message with the given name existsProcessInstance startProcessInstanceByMessageAndTenantId(String messageName, String tenantId)
startProcessInstanceByMessage(String)
, but with tenant context.ProcessInstance startProcessInstanceByMessage(String messageName, String businessKey)
Signals the process engine that a message is received and starts a new ProcessInstance
.
startProcessInstanceByMessage(String, Map)
. This method allows specifying a business key.messageName
- the 'name' of the message as specified as an attribute on the bpmn20 <message name="messageName" />
element.businessKey
- the business key which is added to the started process instanceActivitiException
- if no subscription to a message with the given name existsProcessInstance startProcessInstanceByMessageAndTenantId(String messageName, String businessKey, String tenantId)
startProcessInstanceByMessage(String, String)
, but with tenant context.ProcessInstance startProcessInstanceByMessage(String messageName, Map<String,Object> processVariables)
Signals the process engine that a message is received and starts a new ProcessInstance
.
startProcessInstanceByMessage(String)
. In addition, this method allows specifying a the payload of the message as a map of process variables.messageName
- the 'name' of the message as specified as an attribute on the bpmn20 <message name="messageName" />
element.processVariables
- the 'payload' of the message. The variables are added as processes variables to the started process instance.ProcessInstance
object representing the started process instanceActivitiException
- if no subscription to a message with the given name existsProcessInstance startProcessInstanceByMessageAndTenantId(String messageName, Map<String,Object> processVariables, String tenantId)
RuntimeService#startProcessInstanceByMessage(String, Map)
, but with tenant context.ProcessInstance startProcessInstanceByMessage(String messageName, String businessKey, Map<String,Object> processVariables)
Signals the process engine that a message is received and starts a new ProcessInstance
.
startProcessInstanceByMessage(String, Map)
. In addition, this method allows specifying a business key.messageName
- the 'name' of the message as specified as an attribute on the bpmn20 <message name="messageName" />
element.businessKey
- the business key which is added to the started process instanceprocessVariables
- the 'payload' of the message. The variables are added as processes variables to the started process instance.ProcessInstance
object representing the started process instanceActivitiException
- if no subscription to a message with the given name existsProcessInstance startProcessInstanceByMessageAndTenantId(String messageName, String businessKey, Map<String,Object> processVariables, String tenantId)
RuntimeService#startProcessInstanceByMessage(String, String, Map)
, but with tenant context.void deleteProcessInstance(String processInstanceId, String deleteReason)
processInstanceId
- id of process instance to delete, cannot be null.deleteReason
- reason for deleting, can be null.ActivitiObjectNotFoundException
- when no process instance is found with the given id.List<String> getActiveActivityIds(String executionId)
executionId
- id of the execution, cannot be null.ActivitiObjectNotFoundException
- when no execution exists with the given executionId.void trigger(String executionId)
executionId
- id of execution to signal, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.void trigger(String executionId, Map<String,Object> processVariables)
executionId
- id of execution to signal, cannot be null.processVariables
- a map of process variablesActivitiObjectNotFoundException
- when no execution is found for the given executionId.void trigger(String executionId, Map<String,Object> processVariables, Map<String,Object> transientVariables)
trigger(String, Map)
, but with an extra parameter that allows to pass
transient variables.void updateBusinessKey(String processInstanceId, String businessKey)
processInstanceId
- id of the process instance to set the business key, cannot be nullbusinessKey
- new businessKey valuevoid addUserIdentityLink(String processInstanceId, String userId, String identityLinkType)
processInstanceId
- id of the process instance, cannot be null.userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@see IdentityLinkType
).ActivitiObjectNotFoundException
- when the process instance doesn't exist.void addGroupIdentityLink(String processInstanceId, String groupId, String identityLinkType)
processInstanceId
- id of the process instance, cannot be null.groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@see IdentityLinkType
).ActivitiObjectNotFoundException
- when the process instance or group doesn't exist.void addParticipantUser(String processInstanceId, String userId)
addUserIdentityLink(String, String, String)
; with type IdentityLinkType.CANDIDATE
processInstanceId
- id of the process instance, cannot be null.userId
- id of the user to use as candidate, cannot be null.ActivitiObjectNotFoundException
- when the task or user doesn't exist.void addParticipantGroup(String processInstanceId, String groupId)
addGroupIdentityLink(String, String, String)
; with type IdentityLinkType.CANDIDATE
processInstanceId
- id of the process instance, cannot be null.groupId
- id of the group to use as candidate, cannot be null.ActivitiObjectNotFoundException
- when the task or group doesn't exist.void deleteParticipantUser(String processInstanceId, String userId)
deleteUserIdentityLink(String, String, String)
; with type IdentityLinkType.CANDIDATE
processInstanceId
- id of the process instance, cannot be null.userId
- id of the user to use as candidate, cannot be null.ActivitiObjectNotFoundException
- when the task or user doesn't exist.void deleteParticipantGroup(String processInstanceId, String groupId)
deleteGroupIdentityLink(String, String, String)
; with type IdentityLinkType.CANDIDATE
processInstanceId
- id of the process instance, cannot be null.groupId
- id of the group to use as candidate, cannot be null.ActivitiObjectNotFoundException
- when the task or group doesn't exist.void deleteUserIdentityLink(String processInstanceId, String userId, String identityLinkType)
processInstanceId
- id of the process instance, cannot be null.userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@see IdentityLinkType
).ActivitiObjectNotFoundException
- when the task or user doesn't exist.void deleteGroupIdentityLink(String processInstanceId, String groupId, String identityLinkType)
processInstanceId
- id of the process instance, cannot be null.groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@see IdentityLinkType
).ActivitiObjectNotFoundException
- when the task or group doesn't exist.List<IdentityLink> getIdentityLinksForProcessInstance(String instanceId)
IdentityLink
s associated with the given process instance. Such an IdentityLink
informs how a certain user is involved with a process instance.Map<String,Object> getVariables(String executionId)
executionId
- id of execution, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstances(String executionId)
executionId
- id of execution, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.List<org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstancesByExecutionIds(Set<String> executionIds)
executionIds
- ids of execution, cannot be null.Map<String,Object> getVariablesLocal(String executionId)
getVariablesLocal(String, Collection)
for better performance.executionId
- id of execution, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstancesLocal(String executionId)
getVariableInstancesLocal(String, Collection)
for better performance.executionId
- id of execution, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,Object> getVariables(String executionId, Collection<String> variableNames)
executionId
- id of execution, cannot be null.variableNames
- the collection of variable names that should be retrieved.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstances(String executionId, Collection<String> variableNames)
executionId
- id of execution, cannot be null.variableNames
- the collection of variable names that should be retrieved.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,Object> getVariablesLocal(String executionId, Collection<String> variableNames)
executionId
- id of execution, cannot be null.variableNames
- the collection of variable names that should be retrieved.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstancesLocal(String executionId, Collection<String> variableNames)
executionId
- id of execution, cannot be null.variableNames
- the collection of variable names that should be retrieved.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Object getVariable(String executionId, String variableName)
executionId
- id of execution, cannot be null.variableName
- name of variable, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.org.activiti.engine.impl.persistence.entity.VariableInstance getVariableInstance(String executionId, String variableName)
executionId
- id of execution, cannot be null.variableName
- name of variable, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.<T> T getVariable(String executionId, String variableName, Class<T> variableClass)
executionId
- id of execution, cannot be null.variableName
- name of variable, cannot be null.variableClass
- name of variable, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.boolean hasVariable(String executionId, String variableName)
Object getVariableLocal(String executionId, String variableName)
org.activiti.engine.impl.persistence.entity.VariableInstance getVariableInstanceLocal(String executionId, String variableName)
executionId
- id of execution, cannot be null.variableName
- name of variable, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.<T> T getVariableLocal(String executionId, String variableName, Class<T> variableClass)
boolean hasVariableLocal(String executionId, String variableName)
void setVariable(String executionId, String variableName, Object value)
The variable is set according to the algorithm as documented for VariableScope.setVariable(String, Object)
.
executionId
- id of execution to set variable in, cannot be null.variableName
- name of variable to set, cannot be null.value
- value to set. When null is passed, the variable is not removed, only it's value will be set to null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.{@link VariableScope#setVariable(String, Object)}
void setVariableLocal(String executionId, String variableName, Object value)
executionId
- id of execution to set variable in, cannot be null.variableName
- name of variable to set, cannot be null.value
- value to set. When null is passed, the variable is not removed, only it's value will be set to null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.void setVariables(String executionId, Map<String,? extends Object> variables)
Variables are set according to the algorithm as documented for VariableScope.setVariables(Map)
, applied separately to each variable.
executionId
- id of the execution, cannot be null.variables
- map containing name (key) and value of variables, can be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.{@link VariableScope#setVariables(Map)}
void setVariablesLocal(String executionId, Map<String,? extends Object> variables)
executionId
- id of the execution, cannot be null.variables
- map containing name (key) and value of variables, can be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.void removeVariable(String executionId, String variableName)
executionId
- id of execution to remove variable in.variableName
- name of variable to remove.void removeVariableLocal(String executionId, String variableName)
executionId
- id of execution to remove variable in.variableName
- name of variable to remove.void removeVariables(String executionId, Collection<String> variableNames)
executionId
- id of execution to remove variable in.variableNames
- collection containing name of variables to remove.void removeVariablesLocal(String executionId, Collection<String> variableNames)
executionId
- id of execution to remove variable in.variableNames
- collection containing name of variables to remove.Map<String,DataObject> getDataObjects(String executionId)
executionId
- id of execution, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,DataObject> getDataObjects(String executionId, String locale, boolean withLocalizationFallback)
executionId
- id of execution, cannot be null.locale
- locale the DataObject name and description should be returned in (if available).withLocalizationFallback
- When true localization will fallback to more general locales if the specified locale is not found.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,DataObject> getDataObjectsLocal(String executionId)
getDataObjectsLocal(String, Collection)
for better performance.executionId
- id of execution, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,DataObject> getDataObjectsLocal(String executionId, String locale, boolean withLocalizationFallback)
getDataObjectsLocal(String, Collection)
for better performance.executionId
- id of execution, cannot be null.locale
- locale the DataObject name and description should be returned in (if available).withLocalizationFallback
- When true localization will fallback to more general locales if the specified locale is not found.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,DataObject> getDataObjects(String executionId, Collection<String> dataObjectNames)
executionId
- id of execution, cannot be null.dataObjectNames
- the collection of DataObject names that should be retrieved.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,DataObject> getDataObjects(String executionId, Collection<String> dataObjectNames, String locale, boolean withLocalizationFallback)
executionId
- id of execution, cannot be null.dataObjectNames
- the collection of DataObject names that should be retrieved.locale
- locale the DataObject name and description should be returned in (if available).withLocalizationFallback
- When true localization will fallback to more general locales if the specified locale is not found.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,DataObject> getDataObjectsLocal(String executionId, Collection<String> dataObjects)
executionId
- id of execution, cannot be null.dataObjectNames
- the collection of DataObject names that should be retrieved.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.Map<String,DataObject> getDataObjectsLocal(String executionId, Collection<String> dataObjectNames, String locale, boolean withLocalizationFallback)
executionId
- id of execution, cannot be null.dataObjectNames
- the collection of DataObject names that should be retrieved.locale
- locale the DataObject name and description should be returned in (if available).withLocalizationFallback
- When true localization will fallback to more general locales if the specified locale is not found.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.DataObject getDataObject(String executionId, String dataObject)
executionId
- id of execution, cannot be null.dataObjectName
- name of DataObject, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.DataObject getDataObject(String executionId, String dataObjectName, String locale, boolean withLocalizationFallback)
executionId
- id of execution, cannot be null.dataObjectName
- name of DataObject, cannot be null.locale
- locale the DataObject name and description should be returned in (if available).withLocalizationFallback
- When true localization will fallback to more general locales including the default locale of the JVM if the specified locale is not found.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.DataObject getDataObjectLocal(String executionId, String dataObjectName)
executionId
- id of execution, cannot be null.dataObjectName
- name of DataObject, cannot be null.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.DataObject getDataObjectLocal(String executionId, String dataObjectName, String locale, boolean withLocalizationFallback)
executionId
- id of execution, cannot be null.dataObjectName
- name of DataObject, cannot be null.locale
- locale the DataObject name and description should be returned in (if available).withLocalizationFallback
- When true localization will fallback to more general locales if the specified locale is not found.ActivitiObjectNotFoundException
- when no execution is found for the given executionId.ExecutionQuery createExecutionQuery()
ExecutionQuery
instance, that can be used to query the executions and process instances.NativeExecutionQuery createNativeExecutionQuery()
NativeExecutionQuery
to query Execution
s by SQL directlyProcessInstanceQuery createProcessInstanceQuery()
ProcessInstanceQuery
instance, that can be used to query process instances.NativeProcessInstanceQuery createNativeProcessInstanceQuery()
NativeProcessInstanceQuery
to query ProcessInstance
s by SQL directlyvoid suspendProcessInstanceById(String processInstanceId)
ActivitiObjectNotFoundException
- if no such processInstance can be found.ActivitiException
- the process instance is already in state suspended.void activateProcessInstanceById(String processInstanceId)
ActivitiObjectNotFoundException
- if no such processInstance can be found.ActivitiException
- if the process instance is already in state active.void signalEventReceived(String signalName)
signalName
- the name of the signal eventvoid signalEventReceivedWithTenantId(String signalName, String tenantId)
signalEventReceived(String)
, but within the context of one tenant.void signalEventReceivedAsync(String signalName)
signalName
- the name of the signal eventvoid signalEventReceivedAsyncWithTenantId(String signalName, String tenantId)
signalEventReceivedAsync(String)
, but within the context of one tenant.void signalEventReceived(String signalName, Map<String,Object> processVariables)
signalName
- the name of the signal eventprocessVariables
- a map of variables added to the execution(s)void signalEventReceivedWithTenantId(String signalName, Map<String,Object> processVariables, String tenantId)
#signalEventReceived(String, Map)
, but within the context of one tenant.void signalEventReceived(String signalName, String executionId)
signalName
- the name of the signal eventexecutionId
- the id of the execution to deliver the signal toActivitiObjectNotFoundException
- if no such execution exists.ActivitiException
- if the execution has not subscribed to the signal.void signalEventReceived(String signalName, String executionId, Map<String,Object> processVariables)
signalName
- the name of the signal eventexecutionId
- the id of the execution to deliver the signal toprocessVariables
- a map of variables added to the execution(s)ActivitiObjectNotFoundException
- if no such execution exists.ActivitiException
- if the execution has not subscribed to the signalvoid signalEventReceivedAsync(String signalName, String executionId)
signalName
- the name of the signal eventexecutionId
- the id of the execution to deliver the signal toActivitiObjectNotFoundException
- if no such execution exists.ActivitiException
- if the execution has not subscribed to the signal.void messageEventReceived(String messageName, String executionId)
messageName
- the name of the message eventexecutionId
- the id of the execution to deliver the message toActivitiObjectNotFoundException
- if no such execution exists.ActivitiException
- if the execution has not subscribed to the signalvoid messageEventReceived(String messageName, String executionId, Map<String,Object> processVariables)
Variables are set for the scope of the execution of the message event subscribed to the message name. For example:
Variables are set according to the algorithm as documented for VariableScope.setVariables(Map)
, applied separately to each variable.
messageName
- the name of the message eventexecutionId
- the id of the execution to deliver the message toprocessVariables
- a map of variables added to the executionActivitiObjectNotFoundException
- if no such execution exists.ActivitiException
- if the execution has not subscribed to the signal{@link VariableScope#setVariables(Map)}
void messageEventReceivedAsync(String messageName, String executionId)
messageName
- the name of the message eventexecutionId
- the id of the execution to deliver the message toActivitiObjectNotFoundException
- if no such execution exists.ActivitiException
- if the execution has not subscribed to the signalvoid addEventListener(ActivitiEventListener listenerToAdd)
listenerToAdd
- the listener to addvoid addEventListener(ActivitiEventListener listenerToAdd, ActivitiEventType... types)
listenerToAdd
- the listener to addtypes
- types of events the listener should be notified forvoid removeEventListener(ActivitiEventListener listenerToRemove)
listenerToRemove
- listener to removevoid dispatchEvent(ActivitiEvent event)
event
- event to dispatch.ActivitiException
- if an exception occurs when dispatching the event or when the ActivitiEventDispatcher
is disabled.ActivitiIllegalArgumentException
- when the given event is not suitable for dispatching.void setProcessInstanceName(String processInstanceId, String name)
processInstanceId
- id of the process instance to updatename
- new name for the process instanceActivitiObjectNotFoundException
- when the given process instance does not exist.List<org.activiti.bpmn.model.FlowNode> getEnabledActivitiesFromAdhocSubProcess(String executionId)
executionId
- id of the execution that has an ad-hoc sub process as current flow elementExecution executeActivityInAdhocSubProcess(String executionId, String activityId)
executionId
- id of the execution that has an ad-hoc sub process as current flow elementactivityId
- id of the activity id to enablevoid completeAdhocSubProcess(String executionId)
executionId
- id of the execution that has an ad-hoc sub process as current flow elementCopyright © 2017 Alfresco. All rights reserved.