Class RuntimeServiceImpl
- java.lang.Object
-
- org.activiti.engine.impl.ServiceImpl
-
- org.activiti.engine.impl.RuntimeServiceImpl
-
- All Implemented Interfaces:
RuntimeService
public class RuntimeServiceImpl extends ServiceImpl implements RuntimeService
-
-
Field Summary
-
Fields inherited from class org.activiti.engine.impl.ServiceImpl
commandExecutor, processEngineConfiguration
-
-
Constructor Summary
Constructors Constructor Description RuntimeServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateProcessInstanceById(java.lang.String processInstanceId)Activates the process instance with the given id.voidaddEventListener(ActivitiEventListener listenerToAdd)Adds an event-listener which will be notified of ALL events by the dispatcher.voidaddEventListener(ActivitiEventListener listenerToAdd, ActivitiEventType... types)Adds an event-listener which will only be notified when an event occurs, which type is in the given types.voidaddGroupIdentityLink(java.lang.String processInstanceId, java.lang.String groupId, java.lang.String identityLinkType)Involves a group with a process instance.voidaddParticipantGroup(java.lang.String processInstanceId, java.lang.String groupId)Convenience shorthand forRuntimeService.addGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEvoidaddParticipantUser(java.lang.String processInstanceId, java.lang.String userId)Convenience shorthand forRuntimeService.addUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEvoidaddUserIdentityLink(java.lang.String processInstanceId, java.lang.String userId, java.lang.String identityLinkType)Involves a user with a process instance.voidcompleteAdhocSubProcess(java.lang.String executionId)Completes the ad-hoc sub processExecutionQuerycreateExecutionQuery()Creates a newExecutionQueryinstance, that can be used to query the executions and process instances.NativeExecutionQuerycreateNativeExecutionQuery()creates a newNativeExecutionQueryto queryExecutions by SQL directlyNativeProcessInstanceQuerycreateNativeProcessInstanceQuery()creates a newNativeProcessInstanceQueryto queryProcessInstances by SQL directlyProcessInstanceBuildercreateProcessInstanceBuilder()Create aProcessInstanceBuilder, that allows to set various options for starting a process instance, as an alternative to the various startProcessInstanceByXX methods.ProcessInstanceQuerycreateProcessInstanceQuery()Creates a newProcessInstanceQueryinstance, that can be used to query process instances.voiddeleteGroupIdentityLink(java.lang.String processInstanceId, java.lang.String groupId, java.lang.String identityLinkType)Removes the association between a group and a process instance for the given identityLinkType.voiddeleteParticipantGroup(java.lang.String processInstanceId, java.lang.String groupId)Convenience shorthand forRuntimeService.deleteGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEvoiddeleteParticipantUser(java.lang.String processInstanceId, java.lang.String userId)Convenience shorthand forRuntimeService.deleteUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEvoiddeleteProcessInstance(java.lang.String processInstanceId, java.lang.String deleteReason)Delete an existing runtime process instance.voiddeleteUserIdentityLink(java.lang.String processInstanceId, java.lang.String userId, java.lang.String identityLinkType)Removes the association between a user and a process instance for the given identityLinkType.voiddispatchEvent(ActivitiEvent event)Dispatches the given event to any listeners that are registered.ExecutionexecuteActivityInAdhocSubProcess(java.lang.String executionId, java.lang.String activityId)Executes an activity in a ad-hoc sub processjava.util.List<java.lang.String>getActiveActivityIds(java.lang.String executionId)Finds the activity ids for all executions that are waiting in activities.DataObjectgetDataObject(java.lang.String executionId, java.lang.String dataObject)The DataObject.DataObjectgetDataObject(java.lang.String executionId, java.lang.String dataObjectName, java.lang.String locale, boolean withLocalizationFallback)The DataObject.DataObjectgetDataObjectLocal(java.lang.String executionId, java.lang.String dataObjectName)The DataObject for an execution.DataObjectgetDataObjectLocal(java.lang.String executionId, java.lang.String dataObjectName, java.lang.String locale, boolean withLocalizationFallback)The DataObject for an execution.java.util.Map<java.lang.String,DataObject>getDataObjects(java.lang.String executionId)All DataObjects visible from the given execution scope (including parent scopes).java.util.Map<java.lang.String,DataObject>getDataObjects(java.lang.String executionId, java.lang.String locale, boolean withLocalizationFallback)All DataObjects visible from the given execution scope (including parent scopes).java.util.Map<java.lang.String,DataObject>getDataObjects(java.lang.String executionId, java.util.Collection<java.lang.String> dataObjectNames)The DataObjects for all given dataObjectNames, takes all dataObjects into account which are visible from the given execution scope (including parent scopes).java.util.Map<java.lang.String,DataObject>getDataObjects(java.lang.String executionId, java.util.Collection<java.lang.String> dataObjectNames, java.lang.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).java.util.Map<java.lang.String,DataObject>getDataObjectsLocal(java.lang.String executionId)All DataObject values that are defined in the execution scope, without taking outer scopes into account.java.util.Map<java.lang.String,DataObject>getDataObjectsLocal(java.lang.String executionId, java.lang.String locale, boolean withLocalizationFallback)All DataObject values that are defined in the execution scope, without taking outer scopes into account.java.util.Map<java.lang.String,DataObject>getDataObjectsLocal(java.lang.String executionId, java.util.Collection<java.lang.String> dataObjects)The DataObjects for the given dataObjectNames only taking the given execution scope into account, not looking in outer scopes.java.util.Map<java.lang.String,DataObject>getDataObjectsLocal(java.lang.String executionId, java.util.Collection<java.lang.String> dataObjectNames, java.lang.String locale, boolean withLocalizationFallback)The DataObjects for the given dataObjectNames only taking the given execution scope into account, not looking in outer scopes.java.util.List<org.activiti.bpmn.model.FlowNode>getEnabledActivitiesFromAdhocSubProcess(java.lang.String executionId)Gets enabled activities from ad-hoc sub processjava.util.List<IdentityLink>getIdentityLinksForProcessInstance(java.lang.String processInstanceId)Retrieves theIdentityLinks associated with the given process instance.java.util.List<Event>getProcessInstanceEvents(java.lang.String processInstanceId)The all events related to the given Process Instance.java.lang.ObjectgetVariable(java.lang.String executionId, java.lang.String variableName)The variable value.<T> TgetVariable(java.lang.String executionId, java.lang.String variableName, java.lang.Class<T> variableClass)The variable value.VariableInstancegetVariableInstance(java.lang.String executionId, java.lang.String variableName)The variable.VariableInstancegetVariableInstanceLocal(java.lang.String executionId, java.lang.String variableName)The variable for an execution.java.util.Map<java.lang.String,VariableInstance>getVariableInstances(java.lang.String executionId)All variables visible from the given execution scope (including parent scopes).java.util.Map<java.lang.String,VariableInstance>getVariableInstances(java.lang.String executionId, java.util.Collection<java.lang.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).java.util.List<VariableInstance>getVariableInstancesByExecutionIds(java.util.Set<java.lang.String> executionIds)All variables visible from the given execution scope (including parent scopes).java.util.Map<java.lang.String,VariableInstance>getVariableInstancesLocal(java.lang.String executionId)All variable values that are defined in the execution scope, without taking outer scopes into account.java.util.Map<java.lang.String,VariableInstance>getVariableInstancesLocal(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.java.lang.ObjectgetVariableLocal(java.lang.String executionId, java.lang.String variableName)The variable value for an execution.<T> TgetVariableLocal(java.lang.String executionId, java.lang.String variableName, java.lang.Class<T> variableClass)The variable value for an execution.java.util.Map<java.lang.String,java.lang.Object>getVariables(java.lang.String executionId)All variables visible from the given execution scope (including parent scopes).java.util.Map<java.lang.String,java.lang.Object>getVariables(java.lang.String executionId, java.util.Collection<java.lang.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).java.util.Map<java.lang.String,java.lang.Object>getVariablesLocal(java.lang.String executionId)All variable values that are defined in the execution scope, without taking outer scopes into account.java.util.Map<java.lang.String,java.lang.Object>getVariablesLocal(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.booleanhasVariable(java.lang.String executionId, java.lang.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).booleanhasVariableLocal(java.lang.String executionId, java.lang.String variableName)Check whether or not this execution has a local variable set with the given name.voidmessageEventReceived(java.lang.String messageName, java.lang.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'.voidmessageEventReceived(java.lang.String messageName, java.lang.String executionId, java.util.Map<java.lang.String,java.lang.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'.voidmessageEventReceivedAsync(java.lang.String messageName, java.lang.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'.voidremoveEventListener(ActivitiEventListener listenerToRemove)Removes the given listener from this dispatcher.voidremoveVariable(java.lang.String executionId, java.lang.String variableName)Removes a variable for an execution.voidremoveVariableLocal(java.lang.String executionId, java.lang.String variableName)Removes a variable for an execution (not considering parent scopes).voidremoveVariables(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)Removes variables for an execution.voidremoveVariablesLocal(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)Remove variables for an execution (not considering parent scopes).voidsetProcessInstanceName(java.lang.String processInstanceId, java.lang.String name)Sets the name for the process instance with the given id.voidsetVariable(java.lang.String executionId, java.lang.String variableName, java.lang.Object value)Update or create a variable for an execution.voidsetVariableLocal(java.lang.String executionId, java.lang.String variableName, java.lang.Object value)Update or create a variable for an execution (not considering parent scopes).voidsetVariables(java.lang.String executionId, java.util.Map<java.lang.String,? extends java.lang.Object> variables)Update or create given variables for an execution (including parent scopes).voidsetVariablesLocal(java.lang.String executionId, java.util.Map<java.lang.String,? extends java.lang.Object> variables)Update or create given variables for an execution (not considering parent scopes).voidsignal(java.lang.String executionId)voidsignal(java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> processVariables)voidsignalEventReceived(java.lang.String signalName)Notifies the process engine that a signal event of name 'signalName' has been received.voidsignalEventReceived(java.lang.String signalName, java.lang.String executionId)Notifies the process engine that a signal event of name 'signalName' has been received.voidsignalEventReceived(java.lang.String signalName, java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> processVariables)Notifies the process engine that a signal event of name 'signalName' has been received.voidsignalEventReceived(java.lang.String signalName, java.util.Map<java.lang.String,java.lang.Object> processVariables)Notifies the process engine that a signal event of name 'signalName' has been received.voidsignalEventReceivedAsync(java.lang.String signalName)Notifies the process engine that a signal event of name 'signalName' has been received.voidsignalEventReceivedAsync(java.lang.String signalName, java.lang.String executionId)Notifies the process engine that a signal event of name 'signalName' has been received.voidsignalEventReceivedAsyncWithTenantId(java.lang.String signalName, java.lang.String tenantId)Similar toRuntimeService.signalEventReceivedAsync(String), but within the context of one tenant.voidsignalEventReceivedWithTenantId(java.lang.String signalName, java.lang.String tenantId)Similar toRuntimeService.signalEventReceived(String), but within the context of one tenant.voidsignalEventReceivedWithTenantId(java.lang.String signalName, java.util.Map<java.lang.String,java.lang.Object> processVariables, java.lang.String tenantId)Similar to#signalEventReceived(String, Map, but within the context of one tenant.) ProcessInstancestartProcessInstance(ProcessInstanceBuilderImpl processInstanceBuilder)ProcessInstancestartProcessInstanceById(java.lang.String processDefinitionId)Starts a new process instance in the exactly specified version of the process definition with the given id.ProcessInstancestartProcessInstanceById(java.lang.String processDefinitionId, java.lang.String businessKey)Starts a new process instance in the exactly specified version of the process definition with the given id.ProcessInstancestartProcessInstanceById(java.lang.String processDefinitionId, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables)Starts a new process instance in the exactly specified version of the process definition with the given id.ProcessInstancestartProcessInstanceById(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.Object> variables)Starts a new process instance in the exactly specified version of the process definition with the given id.ProcessInstancestartProcessInstanceByKey(java.lang.String processDefinitionKey)Starts a new process instance in the latest version of the process definition with the given key.ProcessInstancestartProcessInstanceByKey(java.lang.String processDefinitionKey, java.lang.String businessKey)Starts a new process instance in the latest version of the process definition with the given key.ProcessInstancestartProcessInstanceByKey(java.lang.String processDefinitionKey, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables)Starts a new process instance in the latest version of the process definition with the given key.ProcessInstancestartProcessInstanceByKey(java.lang.String processDefinitionKey, java.util.Map<java.lang.String,java.lang.Object> variables)Starts a new process instance in the latest version of the process definition with the given keyProcessInstancestartProcessInstanceByKeyAndTenantId(java.lang.String processDefinitionKey, java.lang.String tenantId)Similar toRuntimeService.startProcessInstanceByKey(String), but using a specific tenant identifier.ProcessInstancestartProcessInstanceByKeyAndTenantId(java.lang.String processDefinitionKey, java.lang.String businessKey, java.lang.String tenantId)Similar toRuntimeService.startProcessInstanceByKey(String, String), but using a specific tenant identifier.ProcessInstancestartProcessInstanceByKeyAndTenantId(java.lang.String processDefinitionKey, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables, java.lang.String tenantId)Similar toRuntimeService.startProcessInstanceByKey(String, String, Map), but using a specific tenant identifier.ProcessInstancestartProcessInstanceByKeyAndTenantId(java.lang.String processDefinitionKey, java.util.Map<java.lang.String,java.lang.Object> variables, java.lang.String tenantId)Similar toRuntimeService.startProcessInstanceByKey(String, Map), but using a specific tenant identifier.ProcessInstancestartProcessInstanceByMessage(java.lang.String messageName)Signals the process engine that a message is received and starts a newProcessInstance.ProcessInstancestartProcessInstanceByMessage(java.lang.String messageName, java.lang.String businessKey)Signals the process engine that a message is received and starts a newProcessInstance.ProcessInstancestartProcessInstanceByMessage(java.lang.String messageName, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> processVariables)Signals the process engine that a message is received and starts a newProcessInstance.ProcessInstancestartProcessInstanceByMessage(java.lang.String messageName, java.util.Map<java.lang.String,java.lang.Object> processVariables)Signals the process engine that a message is received and starts a newProcessInstance.ProcessInstancestartProcessInstanceByMessageAndTenantId(java.lang.String messageName, java.lang.String tenantId)Similar toRuntimeService.startProcessInstanceByMessage(String), but with tenant context.ProcessInstancestartProcessInstanceByMessageAndTenantId(java.lang.String messageName, java.lang.String businessKey, java.lang.String tenantId)Similar toRuntimeService.startProcessInstanceByMessage(String, String), but with tenant context.ProcessInstancestartProcessInstanceByMessageAndTenantId(java.lang.String messageName, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> processVariables, java.lang.String tenantId)Similar toRuntimeService#startProcessInstanceByMessage(String, String, Map, but with tenant context.) ProcessInstancestartProcessInstanceByMessageAndTenantId(java.lang.String messageName, java.util.Map<java.lang.String,java.lang.Object> processVariables, java.lang.String tenantId)Similar toRuntimeService#startProcessInstanceByMessage(String, Map, but with tenant context.) voidsuspendProcessInstanceById(java.lang.String processInstanceId)Suspends the process instance with the given id.voidtrigger(java.lang.String executionId)Sends an external trigger to an activity instance that is waiting inside the given execution.voidtrigger(java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> processVariables)Sends an external trigger to an activity instance that is waiting inside the given execution.voidtrigger(java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> processVariables, java.util.Map<java.lang.String,java.lang.Object> transientVariables)Similar toRuntimeService.trigger(String, Map), but with an extra parameter that allows to pass transient variables.voidupdateBusinessKey(java.lang.String processInstanceId, java.lang.String businessKey)Updates the business key for the provided process instance-
Methods inherited from class org.activiti.engine.impl.ServiceImpl
getCommandExecutor, setCommandExecutor
-
-
-
-
Method Detail
-
startProcessInstanceByKey
public ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey)
Description copied from interface:RuntimeServiceStarts a new process instance in the latest version of the process definition with the given key.- Specified by:
startProcessInstanceByKeyin interfaceRuntimeService- Parameters:
processDefinitionKey- key of process definition, cannot be null.
-
startProcessInstanceByKey
public ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey, java.lang.String businessKey)
Description copied from interface:RuntimeServiceStarts a new process instance in the latest version of the process definition with the given key. A business key can be provided to associate the process instance with a certain identifier that has a clear business meaning. For example in an order process, the business key could be an order id. This business key can then be used to easily look up that process instance , seeProcessInstanceQuery.processInstanceBusinessKey(String). Providing such a business key is definitely a best practice.- Specified by:
startProcessInstanceByKeyin interfaceRuntimeService- Parameters:
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.
-
startProcessInstanceByKey
public ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey, java.util.Map<java.lang.String,java.lang.Object> variables)
Description copied from interface:RuntimeServiceStarts a new process instance in the latest version of the process definition with the given key- Specified by:
startProcessInstanceByKeyin interfaceRuntimeService- Parameters:
processDefinitionKey- key of process definition, cannot be null.variables- the variables to pass, can be null.
-
startProcessInstanceByKey
public ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables)
Description copied from interface:RuntimeServiceStarts a new process instance in the latest version of the process definition with the given key. A business key can be provided to associate the process instance with a certain identifier that has a clear business meaning. For example in an order process, the business key could be an order id. This business key can then be used to easily look up that process instance , seeProcessInstanceQuery.processInstanceBusinessKey(String). Providing such a business key is definitely a best practice. The combination of processdefinitionKey-businessKey must be unique.- Specified by:
startProcessInstanceByKeyin interfaceRuntimeService- Parameters:
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.variables- the variables to pass, can be null.
-
startProcessInstanceByKeyAndTenantId
public ProcessInstance startProcessInstanceByKeyAndTenantId(java.lang.String processDefinitionKey, java.lang.String tenantId)
Description copied from interface:RuntimeServiceSimilar toRuntimeService.startProcessInstanceByKey(String), but using a specific tenant identifier.- Specified by:
startProcessInstanceByKeyAndTenantIdin interfaceRuntimeService
-
startProcessInstanceByKeyAndTenantId
public ProcessInstance startProcessInstanceByKeyAndTenantId(java.lang.String processDefinitionKey, java.lang.String businessKey, java.lang.String tenantId)
Description copied from interface:RuntimeServiceSimilar toRuntimeService.startProcessInstanceByKey(String, String), but using a specific tenant identifier.- Specified by:
startProcessInstanceByKeyAndTenantIdin interfaceRuntimeService
-
startProcessInstanceByKeyAndTenantId
public ProcessInstance startProcessInstanceByKeyAndTenantId(java.lang.String processDefinitionKey, java.util.Map<java.lang.String,java.lang.Object> variables, java.lang.String tenantId)
Description copied from interface:RuntimeServiceSimilar toRuntimeService.startProcessInstanceByKey(String, Map), but using a specific tenant identifier.- Specified by:
startProcessInstanceByKeyAndTenantIdin interfaceRuntimeService
-
startProcessInstanceByKeyAndTenantId
public ProcessInstance startProcessInstanceByKeyAndTenantId(java.lang.String processDefinitionKey, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables, java.lang.String tenantId)
Description copied from interface:RuntimeServiceSimilar toRuntimeService.startProcessInstanceByKey(String, String, Map), but using a specific tenant identifier.- Specified by:
startProcessInstanceByKeyAndTenantIdin interfaceRuntimeService
-
startProcessInstanceById
public ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId)
Description copied from interface:RuntimeServiceStarts a new process instance in the exactly specified version of the process definition with the given id.- Specified by:
startProcessInstanceByIdin interfaceRuntimeService- Parameters:
processDefinitionId- the id of the process definition, cannot be null.
-
startProcessInstanceById
public ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId, java.lang.String businessKey)
Description copied from interface:RuntimeServiceStarts a new process instance in the exactly specified version of the process definition with the given id. A business key can be provided to associate the process instance with a certain identifier that has a clear business meaning. For example in an order process, the business key could be an order id. This business key can then be used to easily look up that process instance , seeProcessInstanceQuery.processInstanceBusinessKey(String). Providing such a business key is definitely a best practice.- Specified by:
startProcessInstanceByIdin interfaceRuntimeService- Parameters:
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.
-
startProcessInstanceById
public ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Description copied from interface:RuntimeServiceStarts a new process instance in the exactly specified version of the process definition with the given id.- Specified by:
startProcessInstanceByIdin interfaceRuntimeService- Parameters:
processDefinitionId- the id of the process definition, cannot be null.variables- variables to be passed, can be null
-
startProcessInstanceById
public ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables)
Description copied from interface:RuntimeServiceStarts a new process instance in the exactly specified version of the process definition with the given id. A business key can be provided to associate the process instance with a certain identifier that has a clear business meaning. For example in an order process, the business key could be an order id. This business key can then be used to easily look up that process instance , seeProcessInstanceQuery.processInstanceBusinessKey(String). Providing such a business key is definitely a best practice.- Specified by:
startProcessInstanceByIdin interfaceRuntimeService- Parameters:
processDefinitionId- the id of the process definition, cannot be null.variables- variables to be passed, can be null
-
deleteProcessInstance
public void deleteProcessInstance(java.lang.String processInstanceId, java.lang.String deleteReason)Description copied from interface:RuntimeServiceDelete an existing runtime process instance.- Specified by:
deleteProcessInstancein interfaceRuntimeService- Parameters:
processInstanceId- id of process instance to delete, cannot be null.deleteReason- reason for deleting, can be null.
-
createExecutionQuery
public ExecutionQuery createExecutionQuery()
Description copied from interface:RuntimeServiceCreates a newExecutionQueryinstance, that can be used to query the executions and process instances.- Specified by:
createExecutionQueryin interfaceRuntimeService
-
createNativeExecutionQuery
public NativeExecutionQuery createNativeExecutionQuery()
Description copied from interface:RuntimeServicecreates a newNativeExecutionQueryto queryExecutions by SQL directly- Specified by:
createNativeExecutionQueryin interfaceRuntimeService
-
createNativeProcessInstanceQuery
public NativeProcessInstanceQuery createNativeProcessInstanceQuery()
Description copied from interface:RuntimeServicecreates a newNativeProcessInstanceQueryto queryProcessInstances by SQL directly- Specified by:
createNativeProcessInstanceQueryin interfaceRuntimeService
-
updateBusinessKey
public void updateBusinessKey(java.lang.String processInstanceId, java.lang.String businessKey)Description copied from interface:RuntimeServiceUpdates the business key for the provided process instance- Specified by:
updateBusinessKeyin interfaceRuntimeService- Parameters:
processInstanceId- id of the process instance to set the business key, cannot be nullbusinessKey- new businessKey value
-
getVariables
public java.util.Map<java.lang.String,java.lang.Object> getVariables(java.lang.String executionId)
Description copied from interface:RuntimeServiceAll variables visible from the given execution scope (including parent scopes).- Specified by:
getVariablesin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariableInstances
public java.util.Map<java.lang.String,VariableInstance> getVariableInstances(java.lang.String executionId)
Description copied from interface:RuntimeServiceAll variables visible from the given execution scope (including parent scopes).- Specified by:
getVariableInstancesin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.- Returns:
- the variable instances or an empty map if no such variables are found.
-
getVariableInstancesByExecutionIds
public java.util.List<VariableInstance> getVariableInstancesByExecutionIds(java.util.Set<java.lang.String> executionIds)
Description copied from interface:RuntimeServiceAll variables visible from the given execution scope (including parent scopes).- Specified by:
getVariableInstancesByExecutionIdsin interfaceRuntimeService- Parameters:
executionIds- ids of execution, cannot be null.- Returns:
- the variables.
-
getVariablesLocal
public java.util.Map<java.lang.String,java.lang.Object> getVariablesLocal(java.lang.String executionId)
Description copied from interface:RuntimeServiceAll variable values that are defined in the execution scope, without taking outer scopes into account. If you have many task local variables and you only need a few, consider usingRuntimeService.getVariablesLocal(String, Collection)for better performance.- Specified by:
getVariablesLocalin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariableInstancesLocal
public java.util.Map<java.lang.String,VariableInstance> getVariableInstancesLocal(java.lang.String executionId)
Description copied from interface:RuntimeServiceAll variable values that are defined in the execution scope, without taking outer scopes into account. If you have many task local variables and you only need a few, consider usingRuntimeService.getVariableInstancesLocal(String, Collection)for better performance.- Specified by:
getVariableInstancesLocalin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariables
public java.util.Map<java.lang.String,java.lang.Object> getVariables(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)Description copied from interface:RuntimeServiceThe variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).- Specified by:
getVariablesin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.variableNames- the collection of variable names that should be retrieved.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariableInstances
public java.util.Map<java.lang.String,VariableInstance> getVariableInstances(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)
Description copied from interface:RuntimeServiceThe variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).- Specified by:
getVariableInstancesin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.variableNames- the collection of variable names that should be retrieved.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariablesLocal
public java.util.Map<java.lang.String,java.lang.Object> getVariablesLocal(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)Description copied from interface:RuntimeServiceThe variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.- Specified by:
getVariablesLocalin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.variableNames- the collection of variable names that should be retrieved.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariableInstancesLocal
public java.util.Map<java.lang.String,VariableInstance> getVariableInstancesLocal(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)
Description copied from interface:RuntimeServiceThe variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.- Specified by:
getVariableInstancesLocalin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.variableNames- the collection of variable names that should be retrieved.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariable
public java.lang.Object getVariable(java.lang.String executionId, java.lang.String variableName)Description copied from interface:RuntimeServiceThe variable value. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariablein interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.variableName- name of variable, cannot be null.- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null.
-
getVariableInstance
public VariableInstance getVariableInstance(java.lang.String executionId, java.lang.String variableName)
Description copied from interface:RuntimeServiceThe variable. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariableInstancein interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.variableName- name of variable, cannot be null.- Returns:
- the variable or null if the variable is undefined.
-
getVariable
public <T> T getVariable(java.lang.String executionId, java.lang.String variableName, java.lang.Class<T> variableClass)Description copied from interface:RuntimeServiceThe variable value. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null. Throws ClassCastException when cannot cast variable to given class- Specified by:
getVariablein interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.variableName- name of variable, cannot be null.variableClass- name of variable, cannot be null.- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null.
-
hasVariable
public boolean hasVariable(java.lang.String executionId, java.lang.String variableName)Description copied from interface:RuntimeServiceCheck 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).- Specified by:
hasVariablein interfaceRuntimeService
-
getVariableLocal
public java.lang.Object getVariableLocal(java.lang.String executionId, java.lang.String variableName)Description copied from interface:RuntimeServiceThe variable value for an execution. Returns the value when the variable is set for the execution (and not searching parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariableLocalin interfaceRuntimeService
-
getVariableInstanceLocal
public VariableInstance getVariableInstanceLocal(java.lang.String executionId, java.lang.String variableName)
Description copied from interface:RuntimeServiceThe variable for an execution. Returns the variable when it is set for the execution (and not searching parent scopes). Returns null when no variable is found with the given name or when the value is set to null.- Specified by:
getVariableInstanceLocalin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.variableName- name of variable, cannot be null.- Returns:
- the variable or null if the variable is undefined.
-
getVariableLocal
public <T> T getVariableLocal(java.lang.String executionId, java.lang.String variableName, java.lang.Class<T> variableClass)Description copied from interface:RuntimeServiceThe variable value for an execution. Returns the value casted to given class when the variable is set for the execution (and not searching parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariableLocalin interfaceRuntimeService
-
hasVariableLocal
public boolean hasVariableLocal(java.lang.String executionId, java.lang.String variableName)Description copied from interface:RuntimeServiceCheck whether or not this execution has a local variable set with the given name.- Specified by:
hasVariableLocalin interfaceRuntimeService
-
setVariable
public void setVariable(java.lang.String executionId, java.lang.String variableName, java.lang.Object value)Description copied from interface:RuntimeServiceUpdate or create a variable for an execution.The variable is set according to the algorithm as documented for
VariableScope.setVariable(String, Object).- Specified by:
setVariablein interfaceRuntimeService- Parameters:
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.- See Also:
VariableScope.setVariable(String, Object)
-
setVariableLocal
public void setVariableLocal(java.lang.String executionId, java.lang.String variableName, java.lang.Object value)Description copied from interface:RuntimeServiceUpdate or create a variable for an execution (not considering parent scopes). If the variable is not already existing, it will be created in the given execution.- Specified by:
setVariableLocalin interfaceRuntimeService- Parameters:
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.
-
setVariables
public void setVariables(java.lang.String executionId, java.util.Map<java.lang.String,? extends java.lang.Object> variables)Description copied from interface:RuntimeServiceUpdate or create given variables for an execution (including parent scopes).Variables are set according to the algorithm as documented for
VariableScope.setVariables(Map), applied separately to each variable.- Specified by:
setVariablesin interfaceRuntimeService- Parameters:
executionId- id of the execution, cannot be null.variables- map containing name (key) and value of variables, can be null.- See Also:
VariableScope.setVariables(Map)
-
setVariablesLocal
public void setVariablesLocal(java.lang.String executionId, java.util.Map<java.lang.String,? extends java.lang.Object> variables)Description copied from interface:RuntimeServiceUpdate or create given variables for an execution (not considering parent scopes). If the variables are not already existing, it will be created in the given execution.- Specified by:
setVariablesLocalin interfaceRuntimeService- Parameters:
executionId- id of the execution, cannot be null.variables- map containing name (key) and value of variables, can be null.
-
removeVariable
public void removeVariable(java.lang.String executionId, java.lang.String variableName)Description copied from interface:RuntimeServiceRemoves a variable for an execution.- Specified by:
removeVariablein interfaceRuntimeService- Parameters:
executionId- id of execution to remove variable in.variableName- name of variable to remove.
-
removeVariableLocal
public void removeVariableLocal(java.lang.String executionId, java.lang.String variableName)Description copied from interface:RuntimeServiceRemoves a variable for an execution (not considering parent scopes).- Specified by:
removeVariableLocalin interfaceRuntimeService- Parameters:
executionId- id of execution to remove variable in.variableName- name of variable to remove.
-
removeVariables
public void removeVariables(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)Description copied from interface:RuntimeServiceRemoves variables for an execution.- Specified by:
removeVariablesin interfaceRuntimeService- Parameters:
executionId- id of execution to remove variable in.variableNames- collection containing name of variables to remove.
-
removeVariablesLocal
public void removeVariablesLocal(java.lang.String executionId, java.util.Collection<java.lang.String> variableNames)Description copied from interface:RuntimeServiceRemove variables for an execution (not considering parent scopes).- Specified by:
removeVariablesLocalin interfaceRuntimeService- Parameters:
executionId- id of execution to remove variable in.variableNames- collection containing name of variables to remove.
-
getDataObjects
public java.util.Map<java.lang.String,DataObject> getDataObjects(java.lang.String executionId)
Description copied from interface:RuntimeServiceAll DataObjects visible from the given execution scope (including parent scopes).- Specified by:
getDataObjectsin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.- Returns:
- the DataObjects or an empty map if no such variables are found.
-
getDataObjects
public java.util.Map<java.lang.String,DataObject> getDataObjects(java.lang.String executionId, java.lang.String locale, boolean withLocalizationFallback)
Description copied from interface:RuntimeServiceAll DataObjects visible from the given execution scope (including parent scopes).- Specified by:
getDataObjectsin interfaceRuntimeService- Parameters:
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.- Returns:
- the DataObjects or an empty map if no DataObjects are found.
-
getDataObjectsLocal
public java.util.Map<java.lang.String,DataObject> getDataObjectsLocal(java.lang.String executionId)
Description copied from interface:RuntimeServiceAll DataObject values that are defined in the execution scope, without taking outer scopes into account. If you have many local DataObjects and you only need a few, consider usingRuntimeService.getDataObjectsLocal(String, Collection)for better performance.- Specified by:
getDataObjectsLocalin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.- Returns:
- the DataObjects or an empty map if no DataObjects are found.
-
getDataObjectsLocal
public java.util.Map<java.lang.String,DataObject> getDataObjectsLocal(java.lang.String executionId, java.lang.String locale, boolean withLocalizationFallback)
Description copied from interface:RuntimeServiceAll DataObject values that are defined in the execution scope, without taking outer scopes into account. If you have many local DataObjects and you only need a few, consider usingRuntimeService.getDataObjectsLocal(String, Collection)for better performance.- Specified by:
getDataObjectsLocalin interfaceRuntimeService- Parameters:
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.- Returns:
- the DataObjects or an empty map if no such variables are found.
-
getDataObjects
public java.util.Map<java.lang.String,DataObject> getDataObjects(java.lang.String executionId, java.util.Collection<java.lang.String> dataObjectNames)
Description copied from interface:RuntimeServiceThe DataObjects for all given dataObjectNames, takes all dataObjects into account which are visible from the given execution scope (including parent scopes).- Specified by:
getDataObjectsin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.dataObjectNames- the collection of DataObject names that should be retrieved.- Returns:
- the DataObject or an empty map if no DataObjects are found.
-
getDataObjects
public java.util.Map<java.lang.String,DataObject> getDataObjects(java.lang.String executionId, java.util.Collection<java.lang.String> dataObjectNames, java.lang.String locale, boolean withLocalizationFallback)
Description copied from interface:RuntimeServiceThe DataObjects for all given dataObjectNames, takes all dataObjects into account which are visible from the given execution scope (including parent scopes).- Specified by:
getDataObjectsin interfaceRuntimeService- Parameters:
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.- Returns:
- the DataObjects or an empty map if no such dataObjects are found.
-
getDataObjectsLocal
public java.util.Map<java.lang.String,DataObject> getDataObjectsLocal(java.lang.String executionId, java.util.Collection<java.lang.String> dataObjects)
Description copied from interface:RuntimeServiceThe DataObjects for the given dataObjectNames only taking the given execution scope into account, not looking in outer scopes.- Specified by:
getDataObjectsLocalin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.- Returns:
- the DataObjects or an empty map if no DataObjects are found.
-
getDataObjectsLocal
public java.util.Map<java.lang.String,DataObject> getDataObjectsLocal(java.lang.String executionId, java.util.Collection<java.lang.String> dataObjectNames, java.lang.String locale, boolean withLocalizationFallback)
Description copied from interface:RuntimeServiceThe DataObjects for the given dataObjectNames only taking the given execution scope into account, not looking in outer scopes.- Specified by:
getDataObjectsLocalin interfaceRuntimeService- Parameters:
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.- Returns:
- the DataObjects or an empty map if no DataObjects are found.
-
getDataObject
public DataObject getDataObject(java.lang.String executionId, java.lang.String dataObject)
Description copied from interface:RuntimeServiceThe DataObject. Searching for the DataObject is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no DataObject value is found with the given name or when the value is set to null.- Specified by:
getDataObjectin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.- Returns:
- the DataObject or null if the variable is undefined.
-
getDataObject
public DataObject getDataObject(java.lang.String executionId, java.lang.String dataObjectName, java.lang.String locale, boolean withLocalizationFallback)
Description copied from interface:RuntimeServiceThe DataObject. Searching for the DataObject is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no DataObject value is found with the given name or when the value is set to null.- Specified by:
getDataObjectin interfaceRuntimeService- Parameters:
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.- Returns:
- the DataObject or null if the DataObject is undefined.
-
getDataObjectLocal
public DataObject getDataObjectLocal(java.lang.String executionId, java.lang.String dataObjectName)
Description copied from interface:RuntimeServiceThe DataObject for an execution. Returns the DataObject when it is set for the execution (and not searching parent scopes). Returns null when no DataObject is found with the given name.- Specified by:
getDataObjectLocalin interfaceRuntimeService- Parameters:
executionId- id of execution, cannot be null.dataObjectName- name of DataObject, cannot be null.- Returns:
- the DataObject or null if the DataObject is undefined.
-
getDataObjectLocal
public DataObject getDataObjectLocal(java.lang.String executionId, java.lang.String dataObjectName, java.lang.String locale, boolean withLocalizationFallback)
Description copied from interface:RuntimeServiceThe DataObject for an execution. Returns the DataObject when it is set for the execution (and not searching parent scopes). Returns null when no DataObject is found with the given name.- Specified by:
getDataObjectLocalin interfaceRuntimeService- Parameters:
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.- Returns:
- the DataObject or null if the DataObject is undefined.
-
signal
public void signal(java.lang.String executionId)
-
trigger
public void trigger(java.lang.String executionId)
Description copied from interface:RuntimeServiceSends an external trigger to an activity instance that is waiting inside the given execution.- Specified by:
triggerin interfaceRuntimeService- Parameters:
executionId- id of execution to signal, cannot be null.
-
signal
public void signal(java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> processVariables)
-
trigger
public void trigger(java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> processVariables)Description copied from interface:RuntimeServiceSends an external trigger to an activity instance that is waiting inside the given execution.- Specified by:
triggerin interfaceRuntimeService- Parameters:
executionId- id of execution to signal, cannot be null.processVariables- a map of process variables
-
trigger
public void trigger(java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> processVariables, java.util.Map<java.lang.String,java.lang.Object> transientVariables)Description copied from interface:RuntimeServiceSimilar toRuntimeService.trigger(String, Map), but with an extra parameter that allows to pass transient variables.- Specified by:
triggerin interfaceRuntimeService
-
addUserIdentityLink
public void addUserIdentityLink(java.lang.String processInstanceId, java.lang.String userId, java.lang.String identityLinkType)Description copied from interface:RuntimeServiceInvolves a user with a process instance. The type of identity link is defined by the given identityLinkType.- Specified by:
addUserIdentityLinkin interfaceRuntimeService- Parameters:
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 (@seeIdentityLinkType).
-
addGroupIdentityLink
public void addGroupIdentityLink(java.lang.String processInstanceId, java.lang.String groupId, java.lang.String identityLinkType)Description copied from interface:RuntimeServiceInvolves a group with a process instance. The type of identityLink is defined by the given identityLink.- Specified by:
addGroupIdentityLinkin interfaceRuntimeService- Parameters:
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 (@seeIdentityLinkType).
-
addParticipantUser
public void addParticipantUser(java.lang.String processInstanceId, java.lang.String userId)Description copied from interface:RuntimeServiceConvenience shorthand forRuntimeService.addUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Specified by:
addParticipantUserin interfaceRuntimeService- Parameters:
processInstanceId- id of the process instance, cannot be null.userId- id of the user to use as candidate, cannot be null.
-
addParticipantGroup
public void addParticipantGroup(java.lang.String processInstanceId, java.lang.String groupId)Description copied from interface:RuntimeServiceConvenience shorthand forRuntimeService.addGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Specified by:
addParticipantGroupin interfaceRuntimeService- Parameters:
processInstanceId- id of the process instance, cannot be null.groupId- id of the group to use as candidate, cannot be null.
-
deleteParticipantUser
public void deleteParticipantUser(java.lang.String processInstanceId, java.lang.String userId)Description copied from interface:RuntimeServiceConvenience shorthand forRuntimeService.deleteUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Specified by:
deleteParticipantUserin interfaceRuntimeService- Parameters:
processInstanceId- id of the process instance, cannot be null.userId- id of the user to use as candidate, cannot be null.
-
deleteParticipantGroup
public void deleteParticipantGroup(java.lang.String processInstanceId, java.lang.String groupId)Description copied from interface:RuntimeServiceConvenience shorthand forRuntimeService.deleteGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Specified by:
deleteParticipantGroupin interfaceRuntimeService- Parameters:
processInstanceId- id of the process instance, cannot be null.groupId- id of the group to use as candidate, cannot be null.
-
deleteUserIdentityLink
public void deleteUserIdentityLink(java.lang.String processInstanceId, java.lang.String userId, java.lang.String identityLinkType)Description copied from interface:RuntimeServiceRemoves the association between a user and a process instance for the given identityLinkType.- Specified by:
deleteUserIdentityLinkin interfaceRuntimeService- Parameters:
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 (@seeIdentityLinkType).
-
deleteGroupIdentityLink
public void deleteGroupIdentityLink(java.lang.String processInstanceId, java.lang.String groupId, java.lang.String identityLinkType)Description copied from interface:RuntimeServiceRemoves the association between a group and a process instance for the given identityLinkType.- Specified by:
deleteGroupIdentityLinkin interfaceRuntimeService- Parameters:
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 (@seeIdentityLinkType).
-
getIdentityLinksForProcessInstance
public java.util.List<IdentityLink> getIdentityLinksForProcessInstance(java.lang.String processInstanceId)
Description copied from interface:RuntimeServiceRetrieves theIdentityLinks associated with the given process instance. Such anIdentityLinkinforms how a certain user is involved with a process instance.- Specified by:
getIdentityLinksForProcessInstancein interfaceRuntimeService
-
createProcessInstanceQuery
public ProcessInstanceQuery createProcessInstanceQuery()
Description copied from interface:RuntimeServiceCreates a newProcessInstanceQueryinstance, that can be used to query process instances.- Specified by:
createProcessInstanceQueryin interfaceRuntimeService
-
getActiveActivityIds
public java.util.List<java.lang.String> getActiveActivityIds(java.lang.String executionId)
Description copied from interface:RuntimeServiceFinds the activity ids for all executions that are waiting in activities. This is a list because a single activity can be active multiple times.- Specified by:
getActiveActivityIdsin interfaceRuntimeService- Parameters:
executionId- id of the execution, cannot be null.
-
suspendProcessInstanceById
public void suspendProcessInstanceById(java.lang.String processInstanceId)
Description copied from interface:RuntimeServiceSuspends the process instance with the given id. If a process instance is in state suspended, activiti will not execute jobs (timers, messages) associated with this instance. If you have a process instance hierarchy, suspending one process instance form the hierarchy will not suspend other process instances form that hierarchy.- Specified by:
suspendProcessInstanceByIdin interfaceRuntimeService
-
activateProcessInstanceById
public void activateProcessInstanceById(java.lang.String processInstanceId)
Description copied from interface:RuntimeServiceActivates the process instance with the given id. If you have a process instance hierarchy, suspending one process instance form the hierarchy will not suspend other process instances form that hierarchy.- Specified by:
activateProcessInstanceByIdin interfaceRuntimeService
-
startProcessInstanceByMessage
public ProcessInstance startProcessInstanceByMessage(java.lang.String messageName)
Description copied from interface:RuntimeServiceSignals the process engine that a message is received and starts a new
ProcessInstance.Calling this method can have two different outcomes:
- If the message name is associated with a message start event, a new process instance is started.
- If no subscription to a message with the given name exists,
ActivitiExceptionis thrown
- Specified by:
startProcessInstanceByMessagein interfaceRuntimeService- Parameters:
messageName- the 'name' of the message as specified as an attribute on the bpmn20<message name="messageName" />element.- Returns:
- the
ProcessInstanceobject representing the started process instance
-
startProcessInstanceByMessageAndTenantId
public ProcessInstance startProcessInstanceByMessageAndTenantId(java.lang.String messageName, java.lang.String tenantId)
Description copied from interface:RuntimeServiceSimilar toRuntimeService.startProcessInstanceByMessage(String), but with tenant context.- Specified by:
startProcessInstanceByMessageAndTenantIdin interfaceRuntimeService
-
startProcessInstanceByMessage
public ProcessInstance startProcessInstanceByMessage(java.lang.String messageName, java.lang.String businessKey)
Description copied from interface:RuntimeServiceSignals the process engine that a message is received and starts a new
SeeProcessInstance.RuntimeService.startProcessInstanceByMessage(String, Map). This method allows specifying a business key.- Specified by:
startProcessInstanceByMessagein interfaceRuntimeService- Parameters:
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 instance
-
startProcessInstanceByMessageAndTenantId
public ProcessInstance startProcessInstanceByMessageAndTenantId(java.lang.String messageName, java.lang.String businessKey, java.lang.String tenantId)
Description copied from interface:RuntimeServiceSimilar toRuntimeService.startProcessInstanceByMessage(String, String), but with tenant context.- Specified by:
startProcessInstanceByMessageAndTenantIdin interfaceRuntimeService
-
startProcessInstanceByMessage
public ProcessInstance startProcessInstanceByMessage(java.lang.String messageName, java.util.Map<java.lang.String,java.lang.Object> processVariables)
Description copied from interface:RuntimeServiceSignals the process engine that a message is received and starts a new
SeeProcessInstance.RuntimeService.startProcessInstanceByMessage(String). In addition, this method allows specifying a the payload of the message as a map of process variables.- Specified by:
startProcessInstanceByMessagein interfaceRuntimeService- Parameters:
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.- Returns:
- the
ProcessInstanceobject representing the started process instance
-
startProcessInstanceByMessageAndTenantId
public ProcessInstance startProcessInstanceByMessageAndTenantId(java.lang.String messageName, java.util.Map<java.lang.String,java.lang.Object> processVariables, java.lang.String tenantId)
Description copied from interface:RuntimeServiceSimilar toRuntimeService#startProcessInstanceByMessage(String, Map, but with tenant context.) - Specified by:
startProcessInstanceByMessageAndTenantIdin interfaceRuntimeService
-
startProcessInstanceByMessage
public ProcessInstance startProcessInstanceByMessage(java.lang.String messageName, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> processVariables)
Description copied from interface:RuntimeServiceSignals the process engine that a message is received and starts a new
SeeProcessInstance.RuntimeService.startProcessInstanceByMessage(String, Map). In addition, this method allows specifying a business key.- Specified by:
startProcessInstanceByMessagein interfaceRuntimeService- Parameters:
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.- Returns:
- the
ProcessInstanceobject representing the started process instance
-
startProcessInstanceByMessageAndTenantId
public ProcessInstance startProcessInstanceByMessageAndTenantId(java.lang.String messageName, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> processVariables, java.lang.String tenantId)
Description copied from interface:RuntimeServiceSimilar toRuntimeService#startProcessInstanceByMessage(String, String, Map, but with tenant context.) - Specified by:
startProcessInstanceByMessageAndTenantIdin interfaceRuntimeService
-
signalEventReceived
public void signalEventReceived(java.lang.String signalName)
Description copied from interface:RuntimeServiceNotifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to all executions waiting on the signal. NOTE: The waiting executions are notified synchronously.- Specified by:
signalEventReceivedin interfaceRuntimeService- Parameters:
signalName- the name of the signal event
-
signalEventReceivedWithTenantId
public void signalEventReceivedWithTenantId(java.lang.String signalName, java.lang.String tenantId)Description copied from interface:RuntimeServiceSimilar toRuntimeService.signalEventReceived(String), but within the context of one tenant.- Specified by:
signalEventReceivedWithTenantIdin interfaceRuntimeService
-
signalEventReceivedAsync
public void signalEventReceivedAsync(java.lang.String signalName)
Description copied from interface:RuntimeServiceNotifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to all executions waiting on the signal.- Specified by:
signalEventReceivedAsyncin interfaceRuntimeService- Parameters:
signalName- the name of the signal event
-
signalEventReceivedAsyncWithTenantId
public void signalEventReceivedAsyncWithTenantId(java.lang.String signalName, java.lang.String tenantId)Description copied from interface:RuntimeServiceSimilar toRuntimeService.signalEventReceivedAsync(String), but within the context of one tenant.- Specified by:
signalEventReceivedAsyncWithTenantIdin interfaceRuntimeService
-
signalEventReceived
public void signalEventReceived(java.lang.String signalName, java.util.Map<java.lang.String,java.lang.Object> processVariables)Description copied from interface:RuntimeServiceNotifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to all executions waiting on the signal. NOTE: The waiting executions are notified synchronously.- Specified by:
signalEventReceivedin interfaceRuntimeService- Parameters:
signalName- the name of the signal eventprocessVariables- a map of variables added to the execution(s)
-
signalEventReceivedWithTenantId
public void signalEventReceivedWithTenantId(java.lang.String signalName, java.util.Map<java.lang.String,java.lang.Object> processVariables, java.lang.String tenantId)Description copied from interface:RuntimeServiceSimilar to#signalEventReceived(String, Map, but within the context of one tenant.) - Specified by:
signalEventReceivedWithTenantIdin interfaceRuntimeService
-
signalEventReceived
public void signalEventReceived(java.lang.String signalName, java.lang.String executionId)Description copied from interface:RuntimeServiceNotifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to a single execution, being the execution referenced by 'executionId'. The waiting execution is notified synchronously.- Specified by:
signalEventReceivedin interfaceRuntimeService- Parameters:
signalName- the name of the signal eventexecutionId- the id of the execution to deliver the signal to
-
signalEventReceived
public void signalEventReceived(java.lang.String signalName, java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> processVariables)Description copied from interface:RuntimeServiceNotifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to a single execution, being the execution referenced by 'executionId'. The waiting execution is notified synchronously.- Specified by:
signalEventReceivedin interfaceRuntimeService- Parameters:
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)
-
signalEventReceivedAsync
public void signalEventReceivedAsync(java.lang.String signalName, java.lang.String executionId)Description copied from interface:RuntimeServiceNotifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to a single execution, being the execution referenced by 'executionId'. The waiting execution is notified asynchronously.- Specified by:
signalEventReceivedAsyncin interfaceRuntimeService- Parameters:
signalName- the name of the signal eventexecutionId- the id of the execution to deliver the signal to
-
messageEventReceived
public void messageEventReceived(java.lang.String messageName, java.lang.String executionId)Description copied from interface:RuntimeServiceNotifies the process engine that a message event with name 'messageName' has been received and has been correlated to an execution with id 'executionId'. The waiting execution is notified synchronously.- Specified by:
messageEventReceivedin interfaceRuntimeService- Parameters:
messageName- the name of the message eventexecutionId- the id of the execution to deliver the message to
-
messageEventReceived
public void messageEventReceived(java.lang.String messageName, java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> processVariables)Description copied from interface:RuntimeServiceNotifies the process engine that a message event with the name 'messageName' has been received and has been correlated to an execution with id 'executionId'. The waiting execution is notified synchronously.Variables are set for the scope of the execution of the message event subscribed to the message name. For example:
- The scope for an intermediate message event in the main process is that of the process instance
- The scope for an intermediate message event in a subprocess is that of the subprocess
- The scope for a boundary message event is that of the execution for the Activity the event is attached to
Variables are set according to the algorithm as documented for
VariableScope.setVariables(Map), applied separately to each variable.- Specified by:
messageEventReceivedin interfaceRuntimeService- Parameters:
messageName- the name of the message eventexecutionId- the id of the execution to deliver the message toprocessVariables- a map of variables added to the execution- See Also:
VariableScope.setVariables(Map)
-
messageEventReceivedAsync
public void messageEventReceivedAsync(java.lang.String messageName, java.lang.String executionId)Description copied from interface:RuntimeServiceNotifies the process engine that a message event with the name 'messageName' has been received and has been correlated to an execution with id 'executionId'. The waiting execution is notified asynchronously.- Specified by:
messageEventReceivedAsyncin interfaceRuntimeService- Parameters:
messageName- the name of the message eventexecutionId- the id of the execution to deliver the message to
-
addEventListener
public void addEventListener(ActivitiEventListener listenerToAdd)
Description copied from interface:RuntimeServiceAdds an event-listener which will be notified of ALL events by the dispatcher.- Specified by:
addEventListenerin interfaceRuntimeService- Parameters:
listenerToAdd- the listener to add
-
addEventListener
public void addEventListener(ActivitiEventListener listenerToAdd, ActivitiEventType... types)
Description copied from interface:RuntimeServiceAdds an event-listener which will only be notified when an event occurs, which type is in the given types.- Specified by:
addEventListenerin interfaceRuntimeService- Parameters:
listenerToAdd- the listener to addtypes- types of events the listener should be notified for
-
removeEventListener
public void removeEventListener(ActivitiEventListener listenerToRemove)
Description copied from interface:RuntimeServiceRemoves the given listener from this dispatcher. The listener will no longer be notified, regardless of the type(s) it was registered for in the first place.- Specified by:
removeEventListenerin interfaceRuntimeService- Parameters:
listenerToRemove- listener to remove
-
dispatchEvent
public void dispatchEvent(ActivitiEvent event)
Description copied from interface:RuntimeServiceDispatches the given event to any listeners that are registered.- Specified by:
dispatchEventin interfaceRuntimeService- Parameters:
event- event to dispatch.
-
setProcessInstanceName
public void setProcessInstanceName(java.lang.String processInstanceId, java.lang.String name)Description copied from interface:RuntimeServiceSets the name for the process instance with the given id.- Specified by:
setProcessInstanceNamein interfaceRuntimeService- Parameters:
processInstanceId- id of the process instance to updatename- new name for the process instance
-
getProcessInstanceEvents
public java.util.List<Event> getProcessInstanceEvents(java.lang.String processInstanceId)
Description copied from interface:RuntimeServiceThe all events related to the given Process Instance.- Specified by:
getProcessInstanceEventsin interfaceRuntimeService
-
getEnabledActivitiesFromAdhocSubProcess
public java.util.List<org.activiti.bpmn.model.FlowNode> getEnabledActivitiesFromAdhocSubProcess(java.lang.String executionId)
Description copied from interface:RuntimeServiceGets enabled activities from ad-hoc sub process- Specified by:
getEnabledActivitiesFromAdhocSubProcessin interfaceRuntimeService- Parameters:
executionId- id of the execution that has an ad-hoc sub process as current flow element- Returns:
- a list of enabled activities
-
executeActivityInAdhocSubProcess
public Execution executeActivityInAdhocSubProcess(java.lang.String executionId, java.lang.String activityId)
Description copied from interface:RuntimeServiceExecutes an activity in a ad-hoc sub process- Specified by:
executeActivityInAdhocSubProcessin interfaceRuntimeService- Parameters:
executionId- id of the execution that has an ad-hoc sub process as current flow elementactivityId- id of the activity id to enable- Returns:
- the newly created execution of the enabled activity
-
completeAdhocSubProcess
public void completeAdhocSubProcess(java.lang.String executionId)
Description copied from interface:RuntimeServiceCompletes the ad-hoc sub process- Specified by:
completeAdhocSubProcessin interfaceRuntimeService- Parameters:
executionId- id of the execution that has an ad-hoc sub process as current flow element
-
createProcessInstanceBuilder
public ProcessInstanceBuilder createProcessInstanceBuilder()
Description copied from interface:RuntimeServiceCreate aProcessInstanceBuilder, that allows to set various options for starting a process instance, as an alternative to the various startProcessInstanceByXX methods.- Specified by:
createProcessInstanceBuilderin interfaceRuntimeService
-
startProcessInstance
public ProcessInstance startProcessInstance(ProcessInstanceBuilderImpl processInstanceBuilder)
-
-