Package org.flowable.engine.impl.dynamic
Class AbstractDynamicStateManager
java.lang.Object
org.flowable.engine.impl.dynamic.AbstractDynamicStateManager
- Direct Known Subclasses:
DefaultDynamicStateManager
,ProcessInstanceMigrationManagerImpl
- Author:
- Tijs Rademakers, Dennis Federico
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<ExecutionEntity>
createBoundaryEvents
(List<BoundaryEvent> boundaryEvents, ExecutionEntity execution, CommandContext commandContext) protected ExecutionEntity
createCallActivityInstance
(CallActivity callActivity, ProcessDefinition subProcessDefinition, ExecutionEntity parentExecution, String initialActivityId, CommandContext commandContext) protected List<ExecutionEntity>
createEmbeddedSubProcessAndExecutions
(Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements, List<ExecutionEntity> movingExecutions, MoveExecutionEntityContainer moveExecutionEntityContainer, ProcessInstanceChangeState processInstanceChangeState, CommandContext commandContext) protected ExecutionEntity
createEmbeddedSubProcessHierarchy
(SubProcess subProcess, ExecutionEntity defaultParentExecution, Map<String, SubProcess> subProcessesToCreate, Set<String> movingExecutionIds, ProcessInstanceChangeState processInstanceChangeState, CommandContext commandContext) protected MoveExecutionEntityContainer
createMoveExecutionEntityContainer
(MoveActivityIdContainer activityContainer, List<ExecutionEntity> executions, CommandContext commandContext) protected ExecutionEntity
deleteDirectParentExecutions
(String parentExecutionId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements, Collection<String> executionIdsNotToDelete, ProcessDefinition procDefToMigrateTo, MoveExecutionEntityContainer moveExecutionContainer, CommandContext commandContext) protected ExecutionEntity
deleteParentExecutions
(String parentExecutionId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements, Collection<String> executionIdsNotToDelete, CommandContext commandContext) protected ExecutionEntity
deleteParentExecutions
(String parentExecutionId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements, CommandContext commandContext) protected void
doMoveExecutionState
(ProcessInstanceChangeState processInstanceChangeState, CommandContext commandContext) protected void
executeBoundaryEvents
(Collection<BoundaryEvent> boundaryEvents, ExecutionEntity execution) protected void
executeBoundaryEvents
(List<BoundaryEvent> boundaryEvents, List<ExecutionEntity> boundaryEventExecutions) protected String
getFlowElementMultiInstanceParentId
(FlowElement flowElement) protected List<FlowElement>
getFlowElementsInSubProcess
(SubProcess subProcess, Collection<FlowElement> flowElements) protected void
handleExternalWorkerServiceTaskJobUpdate
(ExecutionEntity childExecution, CommandContext commandContext) protected void
handleServiceTaskJobUpdate
(ExecutionEntity childExecution, CommandContext commandContext) protected void
handleUserTaskNewAssignee
(ExecutionEntity taskExecution, String newAssigneeId, CommandContext commandContext) protected void
handleUserTaskNewOwner
(ExecutionEntity taskExecution, String newOwnerId, CommandContext commandContext) protected boolean
hasSameMultiInstanceConfig
(FlowElement sourceElement, FlowElement targetElement) protected abstract boolean
isDirectFlowElementExecutionMigration
(FlowElement currentFlowElement, FlowElement newFlowElement) protected boolean
isEventSubProcessStart
(FlowElement flowElement) protected boolean
isExecutionInsideMultiInstance
(ExecutionEntity execution) protected boolean
isExpression
(String variableName) protected boolean
isFlowElementMultiInstance
(FlowElement flowElement) protected boolean
isOnlyRemainingExecutionAtParentScope
(ExecutionEntity executionEntity, Set<String> ignoreExecutionIds, CommandContext commandContext) protected boolean
isSubProcessAncestorOfAnyExecution
(String subProcessId, List<ExecutionEntity> executions) protected boolean
isSubProcessAncestorOfAnyNewFlowElements
(String subProcessId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> flowElements) protected boolean
isSubProcessContainerOfAnyFlowElement
(String subProcessId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements) protected ExecutionEntity
migrateExecutionEntity
(ExecutionEntity parentExecutionEntity, ExecutionEntity childExecution, FlowElement originalElement, FlowElement newFlowElement, CommandContext commandContext) protected void
prepareMoveExecutionEntityContainer
(MoveExecutionEntityContainer moveExecutionContainer, ProcessDefinition migrateToProcessDefinition, CommandContext commandContext) protected void
processCreatedEventSubProcess
(EventSubProcess eventSubProcess, ExecutionEntity eventSubProcessExecution, Set<String> movingExecutionIds, CommandContext commandContext) processDataObjects
(Collection<ValuedDataObject> dataObjects) protected void
processPendingEventSubProcessesStartEvents
(ProcessInstanceChangeState processInstanceChangeState, CommandContext commandContext) protected abstract Map<String,
List<ExecutionEntity>> resolveActiveEmbeddedSubProcesses
(String processInstanceId, CommandContext commandContext) protected ExecutionEntity
resolveActiveExecution
(String executionId, CommandContext commandContext) protected List<ExecutionEntity>
resolveActiveExecutions
(String processInstanceId, String activityId, CommandContext commandContext) resolveEnableActivityContainers
(ChangeActivityStateBuilderImpl changeActivityStateBuilder) protected FlowElement
resolveFlowElementFromBpmnModel
(BpmnModel bpmnModel, String activityId) resolveMoveExecutionEntityContainers
(ChangeActivityStateBuilderImpl changeActivityStateBuilder, Map<String, Object> variables, CommandContext commandContext) protected ExecutionEntity
resolveParentExecutionToDelete
(ExecutionEntity execution, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements) protected ProcessDefinition
resolveProcessDefinition
(String processDefinitionKey, Integer processDefinitionVersion, String tenantId, CommandContext commandContext) protected void
safeDeleteSubProcessInstance
(String processInstanceId, List<ExecutionEntity> executionsPool, String deleteReason, CommandContext commandContext) protected boolean
sameBoundaryEventDefinition
(BoundaryEvent sourceEvent, BoundaryEvent targetEvent)
-
Field Details
-
LOGGER
protected final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
AbstractDynamicStateManager
public AbstractDynamicStateManager()
-
-
Method Details
-
resolveMoveExecutionEntityContainers
public List<MoveExecutionEntityContainer> resolveMoveExecutionEntityContainers(ChangeActivityStateBuilderImpl changeActivityStateBuilder, Map<String, Object> variables, CommandContext commandContext) -
resolveEnableActivityContainers
public List<EnableActivityContainer> resolveEnableActivityContainers(ChangeActivityStateBuilderImpl changeActivityStateBuilder) -
resolveActiveExecution
-
resolveActiveExecutions
protected List<ExecutionEntity> resolveActiveExecutions(String processInstanceId, String activityId, CommandContext commandContext) -
createMoveExecutionEntityContainer
protected MoveExecutionEntityContainer createMoveExecutionEntityContainer(MoveActivityIdContainer activityContainer, List<ExecutionEntity> executions, CommandContext commandContext) -
prepareMoveExecutionEntityContainer
protected void prepareMoveExecutionEntityContainer(MoveExecutionEntityContainer moveExecutionContainer, ProcessDefinition migrateToProcessDefinition, CommandContext commandContext) -
resolveFlowElementFromBpmnModel
-
doMoveExecutionState
protected void doMoveExecutionState(ProcessInstanceChangeState processInstanceChangeState, CommandContext commandContext) -
processPendingEventSubProcessesStartEvents
protected void processPendingEventSubProcessesStartEvents(ProcessInstanceChangeState processInstanceChangeState, CommandContext commandContext) -
resolveActiveEmbeddedSubProcesses
protected abstract Map<String,List<ExecutionEntity>> resolveActiveEmbeddedSubProcesses(String processInstanceId, CommandContext commandContext) -
isDirectFlowElementExecutionMigration
protected abstract boolean isDirectFlowElementExecutionMigration(FlowElement currentFlowElement, FlowElement newFlowElement) -
safeDeleteSubProcessInstance
protected void safeDeleteSubProcessInstance(String processInstanceId, List<ExecutionEntity> executionsPool, String deleteReason, CommandContext commandContext) -
deleteParentExecutions
protected ExecutionEntity deleteParentExecutions(String parentExecutionId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements, CommandContext commandContext) -
deleteParentExecutions
protected ExecutionEntity deleteParentExecutions(String parentExecutionId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements, Collection<String> executionIdsNotToDelete, CommandContext commandContext) -
deleteDirectParentExecutions
protected ExecutionEntity deleteDirectParentExecutions(String parentExecutionId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements, Collection<String> executionIdsNotToDelete, ProcessDefinition procDefToMigrateTo, MoveExecutionEntityContainer moveExecutionContainer, CommandContext commandContext) -
isSubProcessContainerOfAnyFlowElement
protected boolean isSubProcessContainerOfAnyFlowElement(String subProcessId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements) -
resolveParentExecutionToDelete
protected ExecutionEntity resolveParentExecutionToDelete(ExecutionEntity execution, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements) -
createEmbeddedSubProcessAndExecutions
protected List<ExecutionEntity> createEmbeddedSubProcessAndExecutions(Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements, List<ExecutionEntity> movingExecutions, MoveExecutionEntityContainer moveExecutionEntityContainer, ProcessInstanceChangeState processInstanceChangeState, CommandContext commandContext) -
isSubProcessAncestorOfAnyExecution
protected boolean isSubProcessAncestorOfAnyExecution(String subProcessId, List<ExecutionEntity> executions) -
isSubProcessAncestorOfAnyNewFlowElements
protected boolean isSubProcessAncestorOfAnyNewFlowElements(String subProcessId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> flowElements) -
getFlowElementsInSubProcess
protected List<FlowElement> getFlowElementsInSubProcess(SubProcess subProcess, Collection<FlowElement> flowElements) -
createEmbeddedSubProcessHierarchy
protected ExecutionEntity createEmbeddedSubProcessHierarchy(SubProcess subProcess, ExecutionEntity defaultParentExecution, Map<String, SubProcess> subProcessesToCreate, Set<String> movingExecutionIds, ProcessInstanceChangeState processInstanceChangeState, CommandContext commandContext) -
processDataObjects
-
executeBoundaryEvents
protected void executeBoundaryEvents(Collection<BoundaryEvent> boundaryEvents, ExecutionEntity execution) -
createCallActivityInstance
protected ExecutionEntity createCallActivityInstance(CallActivity callActivity, ProcessDefinition subProcessDefinition, ExecutionEntity parentExecution, String initialActivityId, CommandContext commandContext) -
migrateExecutionEntity
protected ExecutionEntity migrateExecutionEntity(ExecutionEntity parentExecutionEntity, ExecutionEntity childExecution, FlowElement originalElement, FlowElement newFlowElement, CommandContext commandContext) -
handleServiceTaskJobUpdate
protected void handleServiceTaskJobUpdate(ExecutionEntity childExecution, CommandContext commandContext) -
handleExternalWorkerServiceTaskJobUpdate
protected void handleExternalWorkerServiceTaskJobUpdate(ExecutionEntity childExecution, CommandContext commandContext) -
handleUserTaskNewAssignee
protected void handleUserTaskNewAssignee(ExecutionEntity taskExecution, String newAssigneeId, CommandContext commandContext) -
handleUserTaskNewOwner
protected void handleUserTaskNewOwner(ExecutionEntity taskExecution, String newOwnerId, CommandContext commandContext) -
isEventSubProcessStart
-
createBoundaryEvents
protected List<ExecutionEntity> createBoundaryEvents(List<BoundaryEvent> boundaryEvents, ExecutionEntity execution, CommandContext commandContext) -
executeBoundaryEvents
protected void executeBoundaryEvents(List<BoundaryEvent> boundaryEvents, List<ExecutionEntity> boundaryEventExecutions) -
isExecutionInsideMultiInstance
-
getFlowElementMultiInstanceParentId
-
isFlowElementMultiInstance
-
hasSameMultiInstanceConfig
-
processCreatedEventSubProcess
protected void processCreatedEventSubProcess(EventSubProcess eventSubProcess, ExecutionEntity eventSubProcessExecution, Set<String> movingExecutionIds, CommandContext commandContext) -
sameBoundaryEventDefinition
-
isOnlyRemainingExecutionAtParentScope
protected boolean isOnlyRemainingExecutionAtParentScope(ExecutionEntity executionEntity, Set<String> ignoreExecutionIds, CommandContext commandContext) -
isExpression
-
resolveProcessDefinition
protected ProcessDefinition resolveProcessDefinition(String processDefinitionKey, Integer processDefinitionVersion, String tenantId, CommandContext commandContext)
-