Package org.flowable.engine.migration
Interface ProcessInstanceMigrationBuilder
public interface ProcessInstanceMigrationBuilder
-
Method Summary
Modifier and TypeMethodDescriptionAdds an activity mapping to the process instance migration plan.Adds an event sub process start event to enable for the migration.org.flowable.batch.api.Batch
batchMigrateProcessInstances
(String processDefinitionId) Starts the process instance migration for all process instances of a given process definition identified by the process definition id.org.flowable.batch.api.Batch
batchMigrateProcessInstances
(String processDefinitionKey, int processDefinitionVersion, String processDefinitionTenantId) Asynchronously starts the process instance migration for each process instances of a given process definition identified by the process definition key and version (optional tenantId).fromProcessInstanceMigrationDocument
(ProcessInstanceMigrationDocument processInstanceMigrationDocument) Creates a ProcessInstanceMigrationBuilder using the values of a ProcessInstanceMigrationDocumentBuilds a ProcessInstanceMigrationDocumentvoid
Starts the process instance migration for a process identified with the submitted processInstanceIdvoid
migrateProcessInstances
(String processDefinitionId) Asynchronously starts the process instance migration for each process instances of a given process definition identified by the process definition id.void
migrateProcessInstances
(String processDefinitionKey, int processDefinitionVersion, String processDefinitionTenantId) Starts the process instance migration for all process instances of a given process definition identified by the process definition key and version (optional tenantId).migrateToProcessDefinition
(String processDefinitionId) Specifies the process definition to migrate to, using the process definition idmigrateToProcessDefinition
(String processDefinitionKey, int processDefinitionVersion) Specifies the process definition to migrate to, identified by its key and versionmigrateToProcessDefinition
(String processDefinitionKey, int processDefinitionVersion, String processDefinitionTenantId) Specifies the process definition to migrate to, identified by its key and version and tenantIdpostUpgradeJavaDelegate
(String javaDelegateClassName) The java delegate class name executed after process instance migrationpostUpgradeJavaDelegateExpression
(String expressionString) The java delegate expression executed after process instance migrationpostUpgradeScript
(Script script) The script executed after process instance migrationpreUpgradeJavaDelegate
(String javaDelegateClassName) The java delegate class name executed before process instance migrationpreUpgradeJavaDelegateExpression
(String expressionString) The java delegate expression executed before process instance migrationpreUpgradeScript
(Script script) The script executed before process instance migrationvalidateMigration
(String processInstanceId) Validates this process instance migration instructions for a given process instance identified by its processInstanceIdvalidateMigrationOfProcessInstances
(String processDefinitionId) Validates this process instance migration instruction for each process instance of a given process definition identified by the process definition id.validateMigrationOfProcessInstances
(String processDefinitionKey, int processDefinitionVersion, String processDefinitionTenantId) Validates this process instance migration instruction for each process instance of a given process definition identified by the process definition key and version (optional tenantId).withMigrateToProcessDefinitionTenantId
(String processDefinitionTenantId) Specifies the tenantId of the process definition to migrate towithProcessInstanceVariable
(String variableName, Object variableValue) Specifies a process instance variable that will also be available during the process migration (ie. to resolve callActivity calledElement expressions of the new process definition - if any)withProcessInstanceVariables
(Map<String, Object> variables) Specified process instances variables that will also be available during process migration
-
Method Details
-
fromProcessInstanceMigrationDocument
ProcessInstanceMigrationBuilder fromProcessInstanceMigrationDocument(ProcessInstanceMigrationDocument processInstanceMigrationDocument) Creates a ProcessInstanceMigrationBuilder using the values of a ProcessInstanceMigrationDocument- Parameters:
processInstanceMigrationDocument
-- Returns:
- See Also:
-
migrateToProcessDefinition
Specifies the process definition to migrate to, using the process definition id- Parameters:
processDefinitionId
-- Returns:
- See Also:
-
migrateToProcessDefinition
ProcessInstanceMigrationBuilder migrateToProcessDefinition(String processDefinitionKey, int processDefinitionVersion) Specifies the process definition to migrate to, identified by its key and version- Parameters:
processDefinitionKey
-processDefinitionVersion
-- Returns:
- See Also:
-
migrateToProcessDefinition
ProcessInstanceMigrationBuilder migrateToProcessDefinition(String processDefinitionKey, int processDefinitionVersion, String processDefinitionTenantId) Specifies the process definition to migrate to, identified by its key and version and tenantId- Parameters:
processDefinitionKey
-processDefinitionVersion
-processDefinitionTenantId
-- Returns:
- See Also:
-
withMigrateToProcessDefinitionTenantId
ProcessInstanceMigrationBuilder withMigrateToProcessDefinitionTenantId(String processDefinitionTenantId) Specifies the tenantId of the process definition to migrate to- Parameters:
processDefinitionTenantId
-- Returns:
-
preUpgradeScript
The script executed before process instance migration- Parameters:
script
- the script to execute- Returns:
- process instance migration builder
-
preUpgradeJavaDelegate
The java delegate class name executed before process instance migration- Parameters:
javaDelegateClassName
- the java delegate to execute- Returns:
- process instance migration builder
-
preUpgradeJavaDelegateExpression
The java delegate expression executed before process instance migration- Parameters:
expressionString
- string which resolves into java delegate instance- Returns:
- process instance migration builder
-
postUpgradeScript
The script executed after process instance migration- Parameters:
script
- the script to execute- Returns:
- process instance migration builder
-
postUpgradeJavaDelegate
The java delegate class name executed after process instance migration- Parameters:
javaDelegateClassName
- the java delegate to execute- Returns:
- process instance migration builder
-
postUpgradeJavaDelegateExpression
The java delegate expression executed after process instance migration- Parameters:
expressionString
- string which resolves into java delegate instance- Returns:
- process instance migration builder
-
addActivityMigrationMapping
Adds an activity mapping to the process instance migration plan. Addition order is relevant and "auto-mapping" has priority. There can only be one mapping for a given "from" activity.- Parameters:
mapping
-- Returns:
- See Also:
-
addEnableEventSubProcessStartEvent
Adds an event sub process start event to enable for the migration.- Parameters:
mapping
-- Returns:
- See Also:
-
withProcessInstanceVariable
ProcessInstanceMigrationBuilder withProcessInstanceVariable(String variableName, Object variableValue) Specifies a process instance variable that will also be available during the process migration (ie. to resolve callActivity calledElement expressions of the new process definition - if any)- Parameters:
variableName
-variableValue
-- Returns:
-
withProcessInstanceVariables
Specified process instances variables that will also be available during process migration- Parameters:
variables
-- Returns:
-
getProcessInstanceMigrationDocument
ProcessInstanceMigrationDocument getProcessInstanceMigrationDocument()Builds a ProcessInstanceMigrationDocument- Returns:
- See Also:
-
migrate
Starts the process instance migration for a process identified with the submitted processInstanceId- Parameters:
processInstanceId
-
-
validateMigration
Validates this process instance migration instructions for a given process instance identified by its processInstanceId- Parameters:
processInstanceId
-- Returns:
- a ProcessInstanceMigrationValidationResult that contains validation error messages - if any
-
migrateProcessInstances
Asynchronously starts the process instance migration for each process instances of a given process definition identified by the process definition id.- Parameters:
processDefinitionId
-
-
batchMigrateProcessInstances
Starts the process instance migration for all process instances of a given process definition identified by the process definition id.- Parameters:
processDefinitionId
-
-
validateMigrationOfProcessInstances
ProcessInstanceMigrationValidationResult validateMigrationOfProcessInstances(String processDefinitionId) Validates this process instance migration instruction for each process instance of a given process definition identified by the process definition id.- Parameters:
processDefinitionId
-- Returns:
- a ProcessInstanceMigrationValidationResult that contains validation error messages - if any
- See Also:
-
migrateProcessInstances
void migrateProcessInstances(String processDefinitionKey, int processDefinitionVersion, String processDefinitionTenantId) Starts the process instance migration for all process instances of a given process definition identified by the process definition key and version (optional tenantId).- Parameters:
processDefinitionKey
-processDefinitionVersion
-processDefinitionTenantId
-
-
batchMigrateProcessInstances
org.flowable.batch.api.Batch batchMigrateProcessInstances(String processDefinitionKey, int processDefinitionVersion, String processDefinitionTenantId) Asynchronously starts the process instance migration for each process instances of a given process definition identified by the process definition key and version (optional tenantId).- Parameters:
processDefinitionKey
-processDefinitionVersion
-processDefinitionTenantId
-- Returns:
- an id of the created batch entity
-
validateMigrationOfProcessInstances
ProcessInstanceMigrationValidationResult validateMigrationOfProcessInstances(String processDefinitionKey, int processDefinitionVersion, String processDefinitionTenantId) Validates this process instance migration instruction for each process instance of a given process definition identified by the process definition key and version (optional tenantId).- Parameters:
processDefinitionKey
-processDefinitionVersion
-processDefinitionTenantId
-- Returns:
- a ProcessInstanceMigrationValidationResult that contains validation error messages - if any
- See Also:
-