Interface CaseInstanceMigrationBuilder


public interface CaseInstanceMigrationBuilder
Author:
Valentin Zickner
  • 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

      CaseInstanceMigrationBuilder migrateToCaseDefinition(String caseDefinitionId)
      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 to
      caseDefinitionVersion - 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 to
      caseDefinitionVersion - Version of the case to migrate to
      caseDefinitionTenantId - Tenant id of the case definition, must be part of the same tenant
      Returns:
      Returns the builder
      See Also:
    • withMigrateToCaseDefinitionTenantId

      CaseInstanceMigrationBuilder withMigrateToCaseDefinitionTenantId(String caseDefinitionTenantId)
      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

      CaseInstanceMigrationBuilder addChangePlanItemIdMapping(ChangePlanItemIdMapping mapping)
      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

      CaseInstanceMigrationBuilder withPreUpgradeExpression(String preUpgradeExpression)
      Specifies an expression which is executed before the migration starts.
      Parameters:
      preUpgradeExpression - the expression e.g. ${mySpringBean.doSomething()}
      Returns:
      Returns the builder
    • withPostUpgradeExpression

      CaseInstanceMigrationBuilder withPostUpgradeExpression(String postUpgradeExpression)
      Specifies an expression which is executed after the migration is finished.
      Parameters:
      postUpgradeExpression - the expression e.g. ${mySpringBean.doSomething()}
      Returns:
      Returns the builder
    • withCaseInstanceVariable

      CaseInstanceMigrationBuilder withCaseInstanceVariable(String variableName, Object variableValue)
      Specifies a case instance variable that will also be available during the case migration
      Parameters:
      variableName - Name of the variable
      variableValue - Value of the variable
      Returns:
      Returns the builder
    • withCaseInstanceVariables

      CaseInstanceMigrationBuilder withCaseInstanceVariables(Map<String,Object> variables)
      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

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

      CaseInstanceMigrationValidationResult validateMigration(String caseInstanceId)
      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

      void migrateCaseInstances(String caseDefinitionId)
      Asynchronously starts the case instance migration for each case instances of a given case definition identified by the case definition id.
      Parameters:
      caseDefinitionId -
    • batchMigrateCaseInstances

      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.
      Parameters:
      caseDefinitionId -
    • validateMigrationOfCaseInstances

      CaseInstanceMigrationValidationResult validateMigrationOfCaseInstances(String caseDefinitionId)
      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: