Class MigrationPlanBuilderImpl
java.lang.Object
io.camunda.zeebe.client.api.command.MigrationPlanBuilderImpl
- All Implemented Interfaces:
MigrationPlan.MigrationPlanBuilderFinalStep
,MigrationPlan.MigrationPlanBuilderStep1
,MigrationPlan.MigrationPlanBuilderStep2
public final class MigrationPlanBuilderImpl
extends Object
implements MigrationPlan.MigrationPlanBuilderStep1, MigrationPlan.MigrationPlanBuilderStep2, MigrationPlan.MigrationPlanBuilderFinalStep
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddMappingInstruction
(String sourceElementId, String targetElementId) Add a mapping instruction to the migration for describing how to map elements from the source process definition to the target process definition.build()
Build theMigrationPlan
object after filling the object with migration datawithTargetProcessDefinitionKey
(long targetProcessDefinitionKey) Set the key of target process definition.
-
Constructor Details
-
MigrationPlanBuilderImpl
public MigrationPlanBuilderImpl()
-
-
Method Details
-
withTargetProcessDefinitionKey
public MigrationPlan.MigrationPlanBuilderStep2 withTargetProcessDefinitionKey(long targetProcessDefinitionKey) Description copied from interface:MigrationPlan.MigrationPlanBuilderStep1
Set the key of target process definition. targetProcessDefinitionKey indicates which process definition to use for the migration.- Specified by:
withTargetProcessDefinitionKey
in interfaceMigrationPlan.MigrationPlanBuilderStep1
- Returns:
- the next step of the builder
-
addMappingInstruction
public MigrationPlan.MigrationPlanBuilderFinalStep addMappingInstruction(String sourceElementId, String targetElementId) Description copied from interface:MigrationPlan.MigrationPlanBuilderStep2
Add a mapping instruction to the migration for describing how to map elements from the source process definition to the target process definition.For example, let's consider a source process definition with a service task with id
"task1"
and the target process definition with a service task with id"task2"
. The mapping instruction could be:
This mapping would migrate instances of the service task with id{ "sourceElementId": "task1", "targetElementId": "task2" }
"task1"
to the service task with id"task2"
.- Specified by:
addMappingInstruction
in interfaceMigrationPlan.MigrationPlanBuilderStep2
- Parameters:
sourceElementId
- element to migratetargetElementId
- element to migrate into- Returns:
- the next step of the builder
-
build
Description copied from interface:MigrationPlan.MigrationPlanBuilderFinalStep
Build theMigrationPlan
object after filling the object with migration data- Specified by:
build
in interfaceMigrationPlan.MigrationPlanBuilderFinalStep
- Returns:
- a reusable migration plan
-