Package org.flowable.cmmn.api.reactivation

# Interface CaseReactivationBuilder

public interface CaseReactivationBuilder
The case reactivation builder is used to create all the necessary and optional information for an archived / finished case to be reactivated. It is obtained through `CmmnHistoryService.createCaseReactivationBuilder(String)`.

Author:
  Micha Kiener

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CaseReactivationBuilder`
  `addTerminatedPlanItemInstanceForPlanItemDefinition(String planItemDefinitionId)`
  Adds a plan item instance for a new plan item definition.
  `CaseInstance`
  `reactivate()`
  After having entered all necessary information for the reactivation, this method actually triggers the reactivation and returns the reactivated case instance from the runtime.
  `CaseReactivationBuilder`
  `transientVariable(String name, Object value)`
  Adds a transient variable to the case before triggering the reactivation event which is available only during that first transaction.
  `CaseReactivationBuilder`
  `transientVariables(Map<String,Object> variables)`
  Adds a map of transient variables to the case before triggering the reactivation event which are available only during that first transaction.
  `CaseReactivationBuilder`
  `variable(String name, Object value)`
  Adds a variable to be added to the case before triggering the reactivation event.
  `CaseReactivationBuilder`
  `variables(Map<String,Object> variables)`
  Adds the map of variables to the case before triggering the reactivation event.

- ## Method Details

  - ### addTerminatedPlanItemInstanceForPlanItemDefinition

    CaseReactivationBuilder addTerminatedPlanItemInstanceForPlanItemDefinition(String planItemDefinitionId)
    Adds a plan item instance for a new plan item definition. This is mainly needed when no reactivation listener was present in the old case definition id.
    Parameters:
      `planItemDefinitionId` - the plan item definition id for which a new plan item instance will be created in available state
    Returns:
      the builder for method chaining

  - ### variable

    CaseReactivationBuilder variable(String name, Object value)
    Adds a variable to be added to the case before triggering the reactivation event.
    Parameters:
      `name` - the name of the variable to be added
      `value` - the value of the variable to be added
    Returns:
      the builder for method chaining

  - ### variables

    CaseReactivationBuilder variables(Map<String,Object> variables)
    Adds the map of variables to the case before triggering the reactivation event.
    Parameters:
      `variables` - the map of variables to be added to the case
    Returns:
      the builder for method chaining

  - ### transientVariable

    CaseReactivationBuilder transientVariable(String name, Object value)
    Adds a transient variable to the case before triggering the reactivation event which is available only during that first transaction.
    Parameters:
      `name` - the name of the variable to be added
      `value` - the value of the variable to be added
    Returns:
      the builder for method chaining

  - ### transientVariables

    CaseReactivationBuilder transientVariables(Map<String,Object> variables)
    Adds a map of transient variables to the case before triggering the reactivation event which are available only during that first transaction.
    Parameters:
      `variables` - the map of variables to be added to the case
    Returns:
      the builder for method chaining

  - ### reactivate

    CaseInstance reactivate()
    After having entered all necessary information for the reactivation, this method actually triggers the reactivation and returns the reactivated case instance from the runtime.
    Returns:
      the reactivated case instance copied back to the runtime