Interface ProcessInstanceMigrationBuilder


public interface ProcessInstanceMigrationBuilder
  • Method Details

    • fromProcessInstanceMigrationDocument

      ProcessInstanceMigrationBuilder fromProcessInstanceMigrationDocument(ProcessInstanceMigrationDocument processInstanceMigrationDocument)
      Creates a ProcessInstanceMigrationBuilder using the values of a ProcessInstanceMigrationDocument
      Parameters:
      processInstanceMigrationDocument -
      Returns:
      See Also:
    • migrateToProcessDefinition

      ProcessInstanceMigrationBuilder migrateToProcessDefinition(String processDefinitionId)
      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

      ProcessInstanceMigrationBuilder preUpgradeScript(Script script)
      The script executed before process instance migration
      Parameters:
      script - the script to execute
      Returns:
      process instance migration builder
    • preUpgradeJavaDelegate

      ProcessInstanceMigrationBuilder preUpgradeJavaDelegate(String javaDelegateClassName)
      The java delegate class name executed before process instance migration
      Parameters:
      javaDelegateClassName - the java delegate to execute
      Returns:
      process instance migration builder
    • preUpgradeJavaDelegateExpression

      ProcessInstanceMigrationBuilder preUpgradeJavaDelegateExpression(String expressionString)
      The java delegate expression executed before process instance migration
      Parameters:
      expressionString - string which resolves into java delegate instance
      Returns:
      process instance migration builder
    • postUpgradeScript

      ProcessInstanceMigrationBuilder postUpgradeScript(Script script)
      The script executed after process instance migration
      Parameters:
      script - the script to execute
      Returns:
      process instance migration builder
    • postUpgradeJavaDelegate

      ProcessInstanceMigrationBuilder postUpgradeJavaDelegate(String javaDelegateClassName)
      The java delegate class name executed after process instance migration
      Parameters:
      javaDelegateClassName - the java delegate to execute
      Returns:
      process instance migration builder
    • postUpgradeJavaDelegateExpression

      ProcessInstanceMigrationBuilder postUpgradeJavaDelegateExpression(String expressionString)
      The java delegate expression executed after process instance migration
      Parameters:
      expressionString - string which resolves into java delegate instance
      Returns:
      process instance migration builder
    • addActivityMigrationMapping

      ProcessInstanceMigrationBuilder addActivityMigrationMapping(ActivityMigrationMapping mapping)
      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

      ProcessInstanceMigrationBuilder addEnableEventSubProcessStartEvent(EnableActivityMapping mapping)
      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

      ProcessInstanceMigrationBuilder withProcessInstanceVariables(Map<String,Object> variables)
      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

      void migrate(String processInstanceId)
      Starts the process instance migration for a process identified with the submitted processInstanceId
      Parameters:
      processInstanceId -
    • validateMigration

      ProcessInstanceMigrationValidationResult validateMigration(String processInstanceId)
      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

      void migrateProcessInstances(String processDefinitionId)
      Asynchronously starts the process instance migration for each process instances of a given process definition identified by the process definition id.
      Parameters:
      processDefinitionId -
    • batchMigrateProcessInstances

      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.
      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: