Package org.flowable.engine.runtime
Interface ChangeActivityStateBuilder
public interface ChangeActivityStateBuilder
Helper for changing the state of a process instance.
An instance can be obtained through
RuntimeService.createChangeActivityStateBuilder()
.- Author:
- Tijs Rademakers
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Start the process instanceenableEventSubProcessStartEvent
(String eventSubProcessStartEventId) Enables a new start event in an event sub process.localVariable
(String startActivityId, String localVariableName, Object localVariableValue) Sets a local scope variable for a start activity idlocalVariables
(String startActivityId, Map<String, Object> localVariables) Sets multiple local scope variables for a start activity idmoveActivityIdsToSingleActivityId
(List<String> currentActivityIds, String newActivityId) Set the activity ids that should be changed to a single activity id.moveActivityIdTo
(String currentActivityId, String newActivityId) Moves the execution with the current activity id to the provided new activity idmoveActivityIdToParentActivityId
(String currentActivityId, String newActivityId) Moves the execution with the current activity id to an activity id in the parent process instance.moveActivityIdToSubProcessInstanceActivityId
(String currentActivityId, String newActivityId, String callActivityId) Moves the execution with the current activity id to an activity id in a new sub process instance for the provided call activity id.moveActivityIdToSubProcessInstanceActivityId
(String currentActivityId, String newActivityId, String callActivityId, Integer subProcessDefinitionVersion) Moves the execution with the current activity id to an activity id in a new sub process instance of the specific definition version for the provided call activity id.moveExecutionsToSingleActivityId
(List<String> executionIds, String activityId) Set the ids of the executions which should be changed to a single execution with the provided activity id.moveExecutionToActivityId
(String executionId, String activityId) Set the id of the execution for which the activity should be changedmoveSingleActivityIdToActivityIds
(String currentActivityId, List<String> newActivityIds) Set the activity id that should be changed to multiple activity ids.moveSingleExecutionToActivityIds
(String executionId, List<String> activityId) Set the id of an execution which should be changed to multiple executions with the provided activity ids.processInstanceId
(String processInstanceId) Set the id of the process instanceprocessVariable
(String processVariableName, Object processVariableValue) Sets a process scope variableprocessVariables
(Map<String, Object> processVariables) Sets multiple process scope variables
-
Method Details
-
processInstanceId
Set the id of the process instance -
moveExecutionToActivityId
Set the id of the execution for which the activity should be changed -
moveExecutionsToSingleActivityId
ChangeActivityStateBuilder moveExecutionsToSingleActivityId(List<String> executionIds, String activityId) Set the ids of the executions which should be changed to a single execution with the provided activity id. This can be used for parallel execution like parallel/inclusive gateways, multiinstance, event sub processes etc. -
moveSingleExecutionToActivityIds
ChangeActivityStateBuilder moveSingleExecutionToActivityIds(String executionId, List<String> activityId) Set the id of an execution which should be changed to multiple executions with the provided activity ids. This can be used for parallel execution like parallel/inclusive gateways, multiinstance, event sub processes etc. -
moveActivityIdTo
Moves the execution with the current activity id to the provided new activity id -
moveActivityIdsToSingleActivityId
ChangeActivityStateBuilder moveActivityIdsToSingleActivityId(List<String> currentActivityIds, String newActivityId) Set the activity ids that should be changed to a single activity id. This can be used for parallel execution like parallel/inclusive gateways, multiinstance, event sub processes etc. -
moveSingleActivityIdToActivityIds
ChangeActivityStateBuilder moveSingleActivityIdToActivityIds(String currentActivityId, List<String> newActivityIds) Set the activity id that should be changed to multiple activity ids. This can be used for parallel execution like parallel/inclusive gateways, multiinstance, event sub processes etc. -
moveActivityIdToParentActivityId
ChangeActivityStateBuilder moveActivityIdToParentActivityId(String currentActivityId, String newActivityId) Moves the execution with the current activity id to an activity id in the parent process instance. The sub process instance will be terminated, so all sub process instance executions need to be moved. -
moveActivityIdToSubProcessInstanceActivityId
ChangeActivityStateBuilder moveActivityIdToSubProcessInstanceActivityId(String currentActivityId, String newActivityId, String callActivityId) Moves the execution with the current activity id to an activity id in a new sub process instance for the provided call activity id. -
moveActivityIdToSubProcessInstanceActivityId
ChangeActivityStateBuilder moveActivityIdToSubProcessInstanceActivityId(String currentActivityId, String newActivityId, String callActivityId, Integer subProcessDefinitionVersion) Moves the execution with the current activity id to an activity id in a new sub process instance of the specific definition version for the provided call activity id. -
enableEventSubProcessStartEvent
Enables a new start event in an event sub process. -
processVariable
Sets a process scope variable -
processVariables
Sets multiple process scope variables -
localVariable
ChangeActivityStateBuilder localVariable(String startActivityId, String localVariableName, Object localVariableValue) Sets a local scope variable for a start activity id -
localVariables
ChangeActivityStateBuilder localVariables(String startActivityId, Map<String, Object> localVariables) Sets multiple local scope variables for a start activity id -
changeState
void changeState()Start the process instance- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no process instance is foundorg.flowable.common.engine.api.FlowableException
- activity could not be canceled or started
-