Class ProcessInstanceMigrationManagerImpl
java.lang.Object
org.flowable.engine.impl.dynamic.AbstractDynamicStateManager
org.flowable.engine.impl.migration.ProcessInstanceMigrationManagerImpl
- All Implemented Interfaces:
ProcessInstanceMigrationManager
public class ProcessInstanceMigrationManagerImpl
extends AbstractDynamicStateManager
implements ProcessInstanceMigrationManager
-
Field Summary
Fields inherited from class org.flowable.engine.impl.dynamic.AbstractDynamicStateManager
LOGGER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbatchMigrateProcessInstancesOfProcessDefinition
(String procDefKey, int procDefVer, String procDefTenantId, ProcessInstanceMigrationDocument document, CommandContext commandContext) batchMigrateProcessInstancesOfProcessDefinition
(String sourceProcDefId, ProcessInstanceMigrationDocument document, CommandContext commandContext) protected void
changeProcessDefinitionReferenceOfHistory
(ProcessInstance processInstance, ProcessDefinition processDefinition, CommandContext commandContext) protected void
doMigrateProcessInstance
(ProcessInstance processInstance, ProcessDefinition procDefToMigrateTo, ProcessInstanceMigrationDocument document, CommandContext commandContext) protected void
doValidateActivityMappings
(String processInstanceId, List<ActivityMigrationMapping> activityMappings, BpmnModel newModel, ProcessInstanceMigrationDocument document, ProcessInstanceMigrationValidationResult validationResult, CommandContext commandContext) protected void
doValidateProcessInstanceMigration
(String processInstanceId, String tenantId, BpmnModel newModel, ProcessInstanceMigrationDocument document, ProcessInstanceMigrationValidationResult validationResult, CommandContext commandContext) protected void
executeExpression
(ProcessInstance processInstance, ProcessDefinition procDefToMigrateTo, String preUpgradeJavaDelegateExpression, CommandContext commandContext) protected void
executeJavaDelegate
(ProcessInstance processInstance, ProcessDefinition procDefToMigrateTo, String preUpgradeJavaDelegate, CommandContext commandContext) protected void
executeScript
(ProcessInstance processInstance, ProcessDefinition procDefToMigrateTo, Script script, CommandContext commandContext) protected boolean
hasSameLoopCharacteristics
(Activity currentActivity, Activity newActivity) protected boolean
hasSameStringValue
(String currentValue, String newValue) protected boolean
hasSameSubProcessContent
(SubProcess currentSubProcess, SubProcess newSubProcess) protected boolean
isActivityIdInProcessDefinitionModel
(String activityId, BpmnModel bpmnModel) protected boolean
isDirectAsyncServiceTaskExecutionMigration
(FlowElement currentFlowElement, FlowElement newFlowElement) protected boolean
isDirectCallActivityExecutionMigration
(FlowElement currentFlowElement, FlowElement newFlowElement) protected boolean
isDirectExternalWorkerServiceTaskExecutionMigration
(FlowElement currentFlowElement, FlowElement newFlowElement) protected boolean
isDirectFlowElementExecutionMigration
(FlowElement currentFlowElement, FlowElement newFlowElement) protected boolean
isDirectReceiveTaskExecutionMigration
(FlowElement currentFlowElement, FlowElement newFlowElement) protected boolean
isDirectUserTaskExecutionMigration
(FlowElement currentFlowElement, FlowElement newFlowElement) protected boolean
isSameOrDefaultTenant
(String processInstanceTenantId, String processDefinitionKey, String processDefinitionTenantId, ProcessEngineConfigurationImpl processEngineConfiguration) protected boolean
isSubProcessAncestorOfAnyExecution
(String subProcessId, List<ExecutionEntity> currentExecutions) protected boolean
isSubProcessContainerOfAnyFlowElement
(String subProcessId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements) void
migrateProcessInstance
(String processInstanceId, ProcessInstanceMigrationDocument document, CommandContext commandContext) void
migrateProcessInstancesOfProcessDefinition
(String procDefKey, int procDefVer, String procDefTenantId, ProcessInstanceMigrationDocument document, CommandContext commandContext) void
migrateProcessInstancesOfProcessDefinition
(String processDefinitionId, ProcessInstanceMigrationDocument document, CommandContext commandContext) protected List<ChangeActivityStateBuilderImpl>
prepareChangeStateBuilders
(ExecutionEntity processInstanceExecution, ProcessDefinition procDefToMigrateTo, ProcessInstanceMigrationDocument document, CommandContext commandContext) protected String
protected boolean
referToSameCalledElement
(CallActivity callActivity1, CallActivity callActivity2) protected Map<String,
List<ExecutionEntity>> resolveActiveEmbeddedSubProcesses
(String processInstanceId, CommandContext commandContext) protected ProcessDefinition
resolveProcessDefinition
(ProcessInstanceMigrationDocument document, CommandContext commandContext) protected void
splitMigrationMappingByCallActivitySubProcessScope
(ActivityMigrationMapping activityMigrationMapping, HashMap<String, ActivityMigrationMapping> mainProcessActivityMappingByFromActivityId, HashMap<String, HashMap<String, ActivityMigrationMapping>> subProcessActivityMappingsByCallActivityIdAndFromActivityId) validateMigrateProcessInstance
(String processInstanceId, ProcessInstanceMigrationDocument document, CommandContext commandContext) validateMigrateProcessInstancesOfProcessDefinition
(String procDefKey, int procDefVer, String procDefTenantId, ProcessInstanceMigrationDocument document, CommandContext commandContext) validateMigrateProcessInstancesOfProcessDefinition
(String processDefinitionId, ProcessInstanceMigrationDocument document, CommandContext commandContext) Methods inherited from class org.flowable.engine.impl.dynamic.AbstractDynamicStateManager
createBoundaryEvents, createCallActivityInstance, createEmbeddedSubProcessAndExecutions, createEmbeddedSubProcessHierarchy, createMoveExecutionEntityContainer, deleteDirectParentExecutions, deleteParentExecutions, deleteParentExecutions, doMoveExecutionState, executeBoundaryEvents, executeBoundaryEvents, getFlowElementMultiInstanceParentId, getFlowElementsInSubProcess, handleExternalWorkerServiceTaskJobUpdate, handleServiceTaskJobUpdate, handleUserTaskNewAssignee, handleUserTaskNewOwner, hasSameMultiInstanceConfig, isEventSubProcessStart, isExecutionInsideMultiInstance, isExpression, isFlowElementMultiInstance, isOnlyRemainingExecutionAtParentScope, isSubProcessAncestorOfAnyNewFlowElements, migrateExecutionEntity, prepareMoveExecutionEntityContainer, processCreatedEventSubProcess, processDataObjects, processPendingEventSubProcessesStartEvents, resolveActiveExecution, resolveActiveExecutions, resolveEnableActivityContainers, resolveFlowElementFromBpmnModel, resolveMoveExecutionEntityContainers, resolveParentExecutionToDelete, resolveProcessDefinition, safeDeleteSubProcessInstance, sameBoundaryEventDefinition
-
Constructor Details
-
ProcessInstanceMigrationManagerImpl
public ProcessInstanceMigrationManagerImpl()
-
-
Method Details
-
validateMigrateProcessInstancesOfProcessDefinition
public ProcessInstanceMigrationValidationResult validateMigrateProcessInstancesOfProcessDefinition(String procDefKey, int procDefVer, String procDefTenantId, ProcessInstanceMigrationDocument document, CommandContext commandContext) - Specified by:
validateMigrateProcessInstancesOfProcessDefinition
in interfaceProcessInstanceMigrationManager
-
validateMigrateProcessInstancesOfProcessDefinition
public ProcessInstanceMigrationValidationResult validateMigrateProcessInstancesOfProcessDefinition(String processDefinitionId, ProcessInstanceMigrationDocument document, CommandContext commandContext) - Specified by:
validateMigrateProcessInstancesOfProcessDefinition
in interfaceProcessInstanceMigrationManager
-
validateMigrateProcessInstance
public ProcessInstanceMigrationValidationResult validateMigrateProcessInstance(String processInstanceId, ProcessInstanceMigrationDocument document, CommandContext commandContext) - Specified by:
validateMigrateProcessInstance
in interfaceProcessInstanceMigrationManager
-
doValidateProcessInstanceMigration
protected void doValidateProcessInstanceMigration(String processInstanceId, String tenantId, BpmnModel newModel, ProcessInstanceMigrationDocument document, ProcessInstanceMigrationValidationResult validationResult, CommandContext commandContext) -
doValidateActivityMappings
protected void doValidateActivityMappings(String processInstanceId, List<ActivityMigrationMapping> activityMappings, BpmnModel newModel, ProcessInstanceMigrationDocument document, ProcessInstanceMigrationValidationResult validationResult, CommandContext commandContext) -
batchMigrateProcessInstancesOfProcessDefinition
public Batch batchMigrateProcessInstancesOfProcessDefinition(String procDefKey, int procDefVer, String procDefTenantId, ProcessInstanceMigrationDocument document, CommandContext commandContext) - Specified by:
batchMigrateProcessInstancesOfProcessDefinition
in interfaceProcessInstanceMigrationManager
-
batchMigrateProcessInstancesOfProcessDefinition
public Batch batchMigrateProcessInstancesOfProcessDefinition(String sourceProcDefId, ProcessInstanceMigrationDocument document, CommandContext commandContext) - Specified by:
batchMigrateProcessInstancesOfProcessDefinition
in interfaceProcessInstanceMigrationManager
-
migrateProcessInstancesOfProcessDefinition
public void migrateProcessInstancesOfProcessDefinition(String procDefKey, int procDefVer, String procDefTenantId, ProcessInstanceMigrationDocument document, CommandContext commandContext) - Specified by:
migrateProcessInstancesOfProcessDefinition
in interfaceProcessInstanceMigrationManager
-
migrateProcessInstancesOfProcessDefinition
public void migrateProcessInstancesOfProcessDefinition(String processDefinitionId, ProcessInstanceMigrationDocument document, CommandContext commandContext) - Specified by:
migrateProcessInstancesOfProcessDefinition
in interfaceProcessInstanceMigrationManager
-
migrateProcessInstance
public void migrateProcessInstance(String processInstanceId, ProcessInstanceMigrationDocument document, CommandContext commandContext) - Specified by:
migrateProcessInstance
in interfaceProcessInstanceMigrationManager
-
doMigrateProcessInstance
protected void doMigrateProcessInstance(ProcessInstance processInstance, ProcessDefinition procDefToMigrateTo, ProcessInstanceMigrationDocument document, CommandContext commandContext) -
resolveActiveEmbeddedSubProcesses
protected Map<String,List<ExecutionEntity>> resolveActiveEmbeddedSubProcesses(String processInstanceId, CommandContext commandContext) - Specified by:
resolveActiveEmbeddedSubProcesses
in classAbstractDynamicStateManager
-
isDirectFlowElementExecutionMigration
protected boolean isDirectFlowElementExecutionMigration(FlowElement currentFlowElement, FlowElement newFlowElement) - Specified by:
isDirectFlowElementExecutionMigration
in classAbstractDynamicStateManager
-
isDirectCallActivityExecutionMigration
protected boolean isDirectCallActivityExecutionMigration(FlowElement currentFlowElement, FlowElement newFlowElement) -
isDirectUserTaskExecutionMigration
protected boolean isDirectUserTaskExecutionMigration(FlowElement currentFlowElement, FlowElement newFlowElement) -
isDirectAsyncServiceTaskExecutionMigration
protected boolean isDirectAsyncServiceTaskExecutionMigration(FlowElement currentFlowElement, FlowElement newFlowElement) -
isDirectReceiveTaskExecutionMigration
protected boolean isDirectReceiveTaskExecutionMigration(FlowElement currentFlowElement, FlowElement newFlowElement) -
isDirectExternalWorkerServiceTaskExecutionMigration
protected boolean isDirectExternalWorkerServiceTaskExecutionMigration(FlowElement currentFlowElement, FlowElement newFlowElement) -
executeScript
protected void executeScript(ProcessInstance processInstance, ProcessDefinition procDefToMigrateTo, Script script, CommandContext commandContext) -
executeJavaDelegate
protected void executeJavaDelegate(ProcessInstance processInstance, ProcessDefinition procDefToMigrateTo, String preUpgradeJavaDelegate, CommandContext commandContext) -
executeExpression
protected void executeExpression(ProcessInstance processInstance, ProcessDefinition procDefToMigrateTo, String preUpgradeJavaDelegateExpression, CommandContext commandContext) -
prepareChangeStateBuilders
protected List<ChangeActivityStateBuilderImpl> prepareChangeStateBuilders(ExecutionEntity processInstanceExecution, ProcessDefinition procDefToMigrateTo, ProcessInstanceMigrationDocument document, CommandContext commandContext) -
isSameOrDefaultTenant
protected boolean isSameOrDefaultTenant(String processInstanceTenantId, String processDefinitionKey, String processDefinitionTenantId, ProcessEngineConfigurationImpl processEngineConfiguration) -
changeProcessDefinitionReferenceOfHistory
protected void changeProcessDefinitionReferenceOfHistory(ProcessInstance processInstance, ProcessDefinition processDefinition, CommandContext commandContext) -
resolveProcessDefinition
protected ProcessDefinition resolveProcessDefinition(ProcessInstanceMigrationDocument document, CommandContext commandContext) -
isActivityIdInProcessDefinitionModel
-
printProcessDefinitionIdentifierMessage
-
isSubProcessAncestorOfAnyExecution
protected boolean isSubProcessAncestorOfAnyExecution(String subProcessId, List<ExecutionEntity> currentExecutions) - Overrides:
isSubProcessAncestorOfAnyExecution
in classAbstractDynamicStateManager
-
isSubProcessContainerOfAnyFlowElement
protected boolean isSubProcessContainerOfAnyFlowElement(String subProcessId, Collection<MoveExecutionEntityContainer.FlowElementMoveEntry> moveToFlowElements) - Overrides:
isSubProcessContainerOfAnyFlowElement
in classAbstractDynamicStateManager
-
referToSameCalledElement
-
hasSameLoopCharacteristics
-
hasSameSubProcessContent
-
splitMigrationMappingByCallActivitySubProcessScope
protected void splitMigrationMappingByCallActivitySubProcessScope(ActivityMigrationMapping activityMigrationMapping, HashMap<String, ActivityMigrationMapping> mainProcessActivityMappingByFromActivityId, HashMap<String, HashMap<String, ActivityMigrationMapping>> subProcessActivityMappingsByCallActivityIdAndFromActivityId) -
hasSameStringValue
-