Package org.flowable.cmmn.api.migration
Interface CaseInstanceMigrationBuilder
public interface CaseInstanceMigrationBuilder
- Author:
- Valentin Zickner
-
Method Summary
Modifier and TypeMethodDescriptionAdds an activate plan item definition mapping to the case instance migration plan.addChangePlanItemDefinitionWithNewTargetIdsMapping
(ChangePlanItemDefinitionWithNewTargetIdsMapping mapping) Adds a mapping for a plan item definition id to a new plan item id and definition id to change the plan item id.Adds a mapping for a plan item id to new plan item id.Adds a mapping for a plan item definition id to a new plan item definition id to change the plan item id.Adds a move to available plan item definition mapping to the case instance migration plan.Adds a terminate plan item definition mapping to the case instance migration plan.addWaitingForRepetitionPlanItemDefinitionMapping
(WaitingForRepetitionPlanItemDefinitionMapping mapping) Adds a waiting for repetition plan item definition mapping to the case instance migration plan.org.flowable.batch.api.Batch
batchMigrateCaseInstances
(String caseDefinitionId) Starts the case instance migration for all case instances of a given case definition identified by the case definition id.org.flowable.batch.api.Batch
batchMigrateCaseInstances
(String caseDefinitionKey, int caseDefinitionVersion, String caseDefinitionTenantId) Asynchronously starts the case instance migration for each case instances of a given case definition identified by the case definition key and version (optional tenantId).fromCaseInstanceMigrationDocument
(CaseInstanceMigrationDocument caseInstanceMigrationDocument) Creates a CaseInstanceMigrationBuilder using the values of a CaseInstanceMigrationDocumentBuilds a CaseInstanceMigrationDocumentvoid
Starts the case instance migration for a case identified with the submitted caseInstanceIdvoid
migrateCaseInstances
(String caseDefinitionId) Asynchronously starts the case instance migration for each case instances of a given case definition identified by the case definition id.void
migrateCaseInstances
(String caseDefinitionKey, int caseDefinitionVersion, String caseDefinitionTenantId) Starts the case instance migration for all case instances of a given case definition identified by the case definition key and version (optional tenantId).migrateToCaseDefinition
(String caseDefinitionId) Specifies the case definition to migrate to, using the case definition idmigrateToCaseDefinition
(String caseDefinitionKey, int caseDefinitionVersion) Specifies the case definition to migrate to, identified by its key and versionmigrateToCaseDefinition
(String caseDefinitionKey, int caseDefinitionVersion, String caseDefinitionTenantId) Specifies the case definition to migrate to, identified by its key and version and tenantIdremoveWaitingForRepetitionPlanItemDefinitionMapping
(RemoveWaitingForRepetitionPlanItemDefinitionMapping mapping) Removes a waiting for repetition plan item definition mapping to the case instance migration plan.validateMigration
(String caseInstanceId) Validates this case instance migration instructions for a given case instance identified by its caseInstanceIdvalidateMigrationOfCaseInstances
(String caseDefinitionId) Validates this case instance migration instruction for each case instance of a given case definition identified by the case definition id.validateMigrationOfCaseInstances
(String caseDefinitionKey, int caseDefinitionVersion, String caseDefinitionTenantId) Validates this case instance migration instruction for each case instance of a given case definition identified by the case definition key and version (optional tenantId).withCaseInstanceVariable
(String variableName, Object variableValue) Specifies a case instance variable that will also be available during the case migrationwithCaseInstanceVariables
(Map<String, Object> variables) Specified case instances variables that will also be available during case migrationwithMigrateToCaseDefinitionTenantId
(String caseDefinitionTenantId) Specifies the tenantId of the case definition to migrate towithPostUpgradeExpression
(String postUpgradeExpression) Specifies an expression which is executed after the migration is finished.withPreUpgradeExpression
(String preUpgradeExpression) Specifies an expression which is executed before the migration starts.
-
Method Details
-
fromCaseInstanceMigrationDocument
CaseInstanceMigrationBuilder fromCaseInstanceMigrationDocument(CaseInstanceMigrationDocument caseInstanceMigrationDocument) Creates a CaseInstanceMigrationBuilder using the values of a CaseInstanceMigrationDocument- Parameters:
caseInstanceMigrationDocument
- Migration document with pre-filled case information- Returns:
- Returns the builder
- See Also:
-
migrateToCaseDefinition
Specifies the case definition to migrate to, using the case definition id- Parameters:
caseDefinitionId
- ID of the case definition to migrate to- Returns:
- Returns the builder
- See Also:
-
migrateToCaseDefinition
CaseInstanceMigrationBuilder migrateToCaseDefinition(String caseDefinitionKey, int caseDefinitionVersion) Specifies the case definition to migrate to, identified by its key and version- Parameters:
caseDefinitionKey
- Key of the case definition to migrate tocaseDefinitionVersion
- Version of the case to migrate to- Returns:
- Returns the builder
- See Also:
-
migrateToCaseDefinition
CaseInstanceMigrationBuilder migrateToCaseDefinition(String caseDefinitionKey, int caseDefinitionVersion, String caseDefinitionTenantId) Specifies the case definition to migrate to, identified by its key and version and tenantId- Parameters:
caseDefinitionKey
- Key of the case definition to migrate tocaseDefinitionVersion
- Version of the case to migrate tocaseDefinitionTenantId
- Tenant id of the case definition, must be part of the same tenant- Returns:
- Returns the builder
- See Also:
-
withMigrateToCaseDefinitionTenantId
Specifies the tenantId of the case definition to migrate to- Parameters:
caseDefinitionTenantId
- Tenant id of the case definition, must be part of the same tenant- Returns:
- Returns the builder
-
addActivatePlanItemDefinitionMapping
CaseInstanceMigrationBuilder addActivatePlanItemDefinitionMapping(ActivatePlanItemDefinitionMapping mapping) Adds an activate plan item definition mapping to the case instance migration plan.- Parameters:
mapping
- Mapping for a specific plan item definition- Returns:
- Returns the builder
- See Also:
-
addTerminatePlanItemDefinitionMapping
CaseInstanceMigrationBuilder addTerminatePlanItemDefinitionMapping(TerminatePlanItemDefinitionMapping mapping) Adds a terminate plan item definition mapping to the case instance migration plan.- Parameters:
mapping
- Mapping for a specific plan item definition- Returns:
- Returns the builder
- See Also:
-
addMoveToAvailablePlanItemDefinitionMapping
CaseInstanceMigrationBuilder addMoveToAvailablePlanItemDefinitionMapping(MoveToAvailablePlanItemDefinitionMapping mapping) Adds a move to available plan item definition mapping to the case instance migration plan.- Parameters:
mapping
- Mapping for a specific plan item definition- Returns:
- Returns the builder
- See Also:
-
addWaitingForRepetitionPlanItemDefinitionMapping
CaseInstanceMigrationBuilder addWaitingForRepetitionPlanItemDefinitionMapping(WaitingForRepetitionPlanItemDefinitionMapping mapping) Adds a waiting for repetition plan item definition mapping to the case instance migration plan.- Parameters:
mapping
- Mapping for a specific plan item definition- Returns:
- Returns the builder
- See Also:
-
removeWaitingForRepetitionPlanItemDefinitionMapping
CaseInstanceMigrationBuilder removeWaitingForRepetitionPlanItemDefinitionMapping(RemoveWaitingForRepetitionPlanItemDefinitionMapping mapping) Removes a waiting for repetition plan item definition mapping to the case instance migration plan.- Parameters:
mapping
- Mapping for a specific plan item definition- Returns:
- Returns the builder
- See Also:
-
addChangePlanItemIdMapping
Adds a mapping for a plan item id to new plan item id. This should not be needed in general, but there are cases where the plan item can have a new plan item id between different versions, and that's why this option is added.- Parameters:
mapping
- Mapping from an existing plan item id to a new plan item id- Returns:
- Returns the builder
- See Also:
-
addChangePlanItemIdWithDefinitionIdMapping
CaseInstanceMigrationBuilder addChangePlanItemIdWithDefinitionIdMapping(ChangePlanItemIdWithDefinitionIdMapping mapping) Adds a mapping for a plan item definition id to a new plan item definition id to change the plan item id. This should not be needed in general, but there are cases where the plan item can have a new plan item id between different versions, and that's why this option is added.- Parameters:
mapping
- Mapping from an existing plan item definition id to a new plan item definition id to change the plan item id- Returns:
- Returns the builder
- See Also:
-
addChangePlanItemDefinitionWithNewTargetIdsMapping
CaseInstanceMigrationBuilder addChangePlanItemDefinitionWithNewTargetIdsMapping(ChangePlanItemDefinitionWithNewTargetIdsMapping mapping) Adds a mapping for a plan item definition id to a new plan item id and definition id to change the plan item id. This should not be needed in general, but there are cases where the plan item can have a new plan item id between different versions, and that's why this option is added.- Parameters:
mapping
- Mapping from an existing plan item definition id to a new plan item id and definition id to change the plan item id- Returns:
- Returns the builder
- See Also:
-
withPreUpgradeExpression
Specifies an expression which is executed before the migration starts.- Parameters:
preUpgradeExpression
- the expression e.g. ${mySpringBean.doSomething()}- Returns:
- Returns the builder
-
withPostUpgradeExpression
Specifies an expression which is executed after the migration is finished.- Parameters:
postUpgradeExpression
- the expression e.g. ${mySpringBean.doSomething()}- Returns:
- Returns the builder
-
withCaseInstanceVariable
Specifies a case instance variable that will also be available during the case migration- Parameters:
variableName
- Name of the variablevariableValue
- Value of the variable- Returns:
- Returns the builder
-
withCaseInstanceVariables
Specified case instances variables that will also be available during case migration- Parameters:
variables
-- Returns:
- Returns the builder
-
getCaseInstanceMigrationDocument
CaseInstanceMigrationDocument getCaseInstanceMigrationDocument()Builds a CaseInstanceMigrationDocument- Returns:
- Returns the builder
- See Also:
-
migrate
Starts the case instance migration for a case identified with the submitted caseInstanceId- Parameters:
caseInstanceId
-
-
validateMigration
Validates this case instance migration instructions for a given case instance identified by its caseInstanceId- Parameters:
caseInstanceId
-- Returns:
- a CaseInstanceMigrationValidationResult that contains validation error messages - if any
-
migrateCaseInstances
Asynchronously starts the case instance migration for each case instances of a given case definition identified by the case definition id.- Parameters:
caseDefinitionId
-
-
batchMigrateCaseInstances
Starts the case instance migration for all case instances of a given case definition identified by the case definition id.- Parameters:
caseDefinitionId
-
-
validateMigrationOfCaseInstances
Validates this case instance migration instruction for each case instance of a given case definition identified by the case definition id.- Parameters:
caseDefinitionId
-- Returns:
- a CaseInstanceMigrationValidationResult that contains validation error messages - if any
- See Also:
-
migrateCaseInstances
void migrateCaseInstances(String caseDefinitionKey, int caseDefinitionVersion, String caseDefinitionTenantId) Starts the case instance migration for all case instances of a given case definition identified by the case definition key and version (optional tenantId).- Parameters:
caseDefinitionKey
-caseDefinitionVersion
-caseDefinitionTenantId
-
-
batchMigrateCaseInstances
org.flowable.batch.api.Batch batchMigrateCaseInstances(String caseDefinitionKey, int caseDefinitionVersion, String caseDefinitionTenantId) Asynchronously starts the case instance migration for each case instances of a given case definition identified by the case definition key and version (optional tenantId).- Parameters:
caseDefinitionKey
-caseDefinitionVersion
-caseDefinitionTenantId
-- Returns:
- an id of the created batch entity
-
validateMigrationOfCaseInstances
CaseInstanceMigrationValidationResult validateMigrationOfCaseInstances(String caseDefinitionKey, int caseDefinitionVersion, String caseDefinitionTenantId) Validates this case instance migration instruction for each case instance of a given case definition identified by the case definition key and version (optional tenantId).- Parameters:
caseDefinitionKey
-caseDefinitionVersion
-caseDefinitionTenantId
-- Returns:
- a CaseInstanceMigrationValidationResult that contains validation error messages - if any
- See Also:
-