Class MigrationPlanBuilderImpl
- All Implemented Interfaces:
MigrationInstructionBuilder,MigrationInstructionsBuilder,MigrationPlanBuilder
- Author:
- Thorben Lindhauer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandExecutorprotected List<MigrationInstructionImpl>protected booleanprotected Stringprotected Stringprotected booleanprotected VariableMap -
Constructor Summary
ConstructorsConstructorDescriptionMigrationPlanBuilderImpl(CommandExecutor commandExecutor, String sourceProcessDefinitionId, String targetProcessDefinitionId) -
Method Summary
Modifier and TypeMethodDescriptionbuild()booleanbooleanmapActivities(String sourceActivityId, String targetActivityId) Adds a migration instruction that maps activity instances of the source activity (of the source process definition) to activity instances of the target activity (of the target process definition)Automatically adds a set of instructions for activities that are equivalent in both process definitions.setVariables(Map<String, ?> variables) If the current instruction maps between event-receiving flow nodes that rely on a persistent event trigger, this method can be used to determine whether the event trigger should be updated during migrationToggle whether the instructions should include updating of the respective event triggers where appropriate.
-
Field Details
-
commandExecutor
-
sourceProcessDefinitionId
-
targetProcessDefinitionId
-
explicitMigrationInstructions
-
mapEqualActivities
protected boolean mapEqualActivities -
updateEventTriggersForGeneratedInstructions
protected boolean updateEventTriggersForGeneratedInstructions -
variables
-
-
Constructor Details
-
MigrationPlanBuilderImpl
public MigrationPlanBuilderImpl(CommandExecutor commandExecutor, String sourceProcessDefinitionId, String targetProcessDefinitionId)
-
-
Method Details
-
mapEqualActivities
Description copied from interface:MigrationPlanBuilderAutomatically adds a set of instructions for activities that are equivalent in both process definitions. By default, this is given if two activities are both user tasks, are on the same level of sub process, and have the same id.- Specified by:
mapEqualActivitiesin interfaceMigrationPlanBuilder
-
setVariables
- Specified by:
setVariablesin interfaceMigrationPlanBuilder- Parameters:
variables- which will be set into the process instance scope after the migration
-
mapActivities
Description copied from interface:MigrationPlanBuilderAdds a migration instruction that maps activity instances of the source activity (of the source process definition) to activity instances of the target activity (of the target process definition)- Specified by:
mapActivitiesin interfaceMigrationPlanBuilder
-
updateEventTrigger
Description copied from interface:MigrationInstructionBuilderIf the current instruction maps between event-receiving flow nodes that rely on a persistent event trigger, this method can be used to determine whether the event trigger should be updated during migration
For example, when mapping a message catch event waiting for message A to another message catch waiting for message B, using this option updates the message trigger to B during migration. That means, after migration this process instance can be correlated to using B. If this option is not used, then the message trigger is not updated and A is the message to be received after migration.
Event-receiving flow nodes are:
- intermediate events (signal, message, timer)
- boundary events (signal, message, timer)
- start events (signal, message, timer)
- receive tasks
For other flow nodes, this option must not be used and if so, results in a validation exception when the plan is created
- Specified by:
updateEventTriggerin interfaceMigrationInstructionBuilder- Returns:
- this builder
-
updateEventTriggers
Description copied from interface:MigrationInstructionsBuilderToggle whether the instructions should include updating of the respective event triggers where appropriate. SeeMigrationInstructionBuilder.updateEventTrigger()for details what updating the event trigger means for a single instruction.- Specified by:
updateEventTriggersin interfaceMigrationInstructionsBuilder- Returns:
- this builder
-
getSourceProcessDefinitionId
-
getTargetProcessDefinitionId
-
isMapEqualActivities
public boolean isMapEqualActivities() -
getVariables
-
isUpdateEventTriggersForGeneratedInstructions
public boolean isUpdateEventTriggersForGeneratedInstructions() -
getExplicitMigrationInstructions
-
build
- Specified by:
buildin interfaceMigrationPlanBuilder- Returns:
- a migration plan with all previously specified instructions
-