Class MigrateProcessInstanceCmd
- java.lang.Object
-
- org.camunda.bpm.engine.impl.migration.AbstractMigrationCmd
-
- org.camunda.bpm.engine.impl.migration.MigrateProcessInstanceCmd
-
public class MigrateProcessInstanceCmd extends AbstractMigrationCmd implements Command<Void>
How migration works:- Validate migration instructions.
- Delete activity instances that are not going to be migrated, invoking execution listeners and io mappings. This is performed in a bottom-up fashion in the activity instance tree and ensures that the "upstream" tree is always consistent with respect to the old process definition.
- Migrate and create activity instances. Creation invokes execution listeners and io mappings. This is performed in a top-down fashion in the activity instance tree and ensures that the "upstream" tree is always consistent with respect to the new process definition.
- Author:
- Thorben Lindhauer
-
-
Field Summary
Fields Modifier and Type Field Description protected static MigrationLogger
LOGGER
protected boolean
skipJavaSerializationFormatCheck
-
Fields inherited from class org.camunda.bpm.engine.impl.migration.AbstractMigrationCmd
executionBuilder
-
-
Constructor Summary
Constructors Constructor Description MigrateProcessInstanceCmd(MigrationPlanExecutionBuilderImpl migrationPlanExecutionBuilder, boolean skipJavaSerializationFormatCheck)
-
Method Summary
-
Methods inherited from class org.camunda.bpm.engine.impl.migration.AbstractMigrationCmd
checkAuthorizations, collectProcessInstanceIds, getProcessDefinition, resolveSourceProcessDefinition, resolveTargetProcessDefinition, writeUserOperationLog
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.impl.interceptor.Command
isRetryable
-
-
-
-
Field Detail
-
LOGGER
protected static final MigrationLogger LOGGER
-
skipJavaSerializationFormatCheck
protected boolean skipJavaSerializationFormatCheck
-
-
Constructor Detail
-
MigrateProcessInstanceCmd
public MigrateProcessInstanceCmd(MigrationPlanExecutionBuilderImpl migrationPlanExecutionBuilder, boolean skipJavaSerializationFormatCheck)
-
-
Method Detail
-
execute
public Void execute(CommandContext commandContext)
-
migrateProcessInstance
public Void migrateProcessInstance(CommandContext commandContext, String processInstanceId, MigrationPlan migrationPlan, ProcessDefinitionEntity targetProcessDefinition, boolean skipJavaSerializationFormatCheck)
-
executeInContext
protected <T> void executeInContext(Runnable runnable, ProcessDefinitionEntity contextDefinition)
-
deleteUnmappedActivityInstances
protected void deleteUnmappedActivityInstances(MigratingProcessInstance migratingProcessInstance)
delete unmapped instances in a bottom-up fashion (similar to deleteCascade and regular BPMN execution)
-
collectLeafInstances
protected Set<MigratingScopeInstance> collectLeafInstances(MigratingProcessInstance migratingProcessInstance)
-
validateInstructions
protected void validateInstructions(CommandContext commandContext, MigratingProcessInstance migratingProcessInstance, MigratingProcessInstanceValidationReportImpl processInstanceReport)
-
validateActivityInstance
protected MigratingActivityInstanceValidationReportImpl validateActivityInstance(MigratingActivityInstance migratingActivityInstance, MigratingProcessInstance migratingProcessInstance, List<MigratingActivityInstanceValidator> migratingActivityInstanceValidators)
-
validateTransitionInstance
protected MigratingTransitionInstanceValidationReportImpl validateTransitionInstance(MigratingTransitionInstance migratingTransitionInstance, MigratingProcessInstance migratingProcessInstance, List<MigratingTransitionInstanceValidator> migratingTransitionInstanceValidators)
-
validateEventScopeInstance
protected void validateEventScopeInstance(MigratingEventScopeInstance eventScopeInstance, MigratingProcessInstance migratingProcessInstance, List<MigratingCompensationInstanceValidator> migratingTransitionInstanceValidators, MigratingActivityInstanceValidationReportImpl instanceReport)
-
validateCompensateSubscriptionInstance
protected void validateCompensateSubscriptionInstance(MigratingCompensationEventSubscriptionInstance eventSubscriptionInstance, MigratingProcessInstance migratingProcessInstance, List<MigratingCompensationInstanceValidator> migratingTransitionInstanceValidators, MigratingActivityInstanceValidationReportImpl instanceReport)
-
migrateProcessInstance
protected void migrateProcessInstance(MigratingProcessInstance migratingProcessInstance)
Migrate activity instances to their new activities and process definition. Creates new scope instances as necessary.
-
ensureProcessInstanceExist
protected void ensureProcessInstanceExist(String processInstanceId, ExecutionEntity processInstance)
-
ensureSameProcessDefinition
protected void ensureSameProcessDefinition(ExecutionEntity processInstance, String processDefinitionId)
-
ensureOperationAllowed
protected void ensureOperationAllowed(CommandContext commandContext, ExecutionEntity processInstance, ProcessDefinitionEntity targetProcessDefinition)
-
-