Package org.flowable.cmmn.api.runtime

# Interface PlanItemInstanceTransitionBuilder

public interface PlanItemInstanceTransitionBuilder
A builder that allows to execute a transition for a plan item instance from one state to another, optionally passing variables before the transition.

Author:
  Joram Barrez

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PlanItemInstanceTransitionBuilder`
  `childTaskFormVariables(Map<String,Object> variables, org.flowable.form.api.FormInfo formInfo, String outcome)`
  The form variables that should be used when creating a new 'child entity'.
  `PlanItemInstanceTransitionBuilder`
  `childTaskVariable(String variableName, Object variableValue)`
  Behaviors that create a new 'child entity' can take in specialized variables.
  `PlanItemInstanceTransitionBuilder`
  `childTaskVariables(Map<String,Object> childTaskVariables)`
  See `childTaskVariable(String, Object)`.
  `void`
  `completeStage()`
  Completes the plan item instance, which needs to be a stage instance.
  `void`
  `disable()`
  Disables a manually activated plan item instance.
  `void`
  `enable()`
  Enables a manually activated plan item instance.
  `void`
  `forceCompleteStage()`
  Completes the plan item instance, which needs to be a stage instance.
  `PlanItemInstanceTransitionBuilder`
  `formVariables(Map<String,Object> variables, org.flowable.form.api.FormInfo formInfo, String outcome)`
  The form variables that should be set before the transition is executed.
  `PlanItemInstanceTransitionBuilder`
  `localVariable(String variableName, Object variableValue)`
  Sets a local variable before the transition is executed.
  `PlanItemInstanceTransitionBuilder`
  `localVariables(Map<String,Object> localVariables)`
  See `localVariable(String, Object)`.
  `void`
  `start()`
  Starts a plan item instance, this typically will executes it associated behavior.
  `void`
  `terminate()`
  Manually terminates a plan item instance.
  `PlanItemInstanceTransitionBuilder`
  `transientVariable(String variableName, Object variableValue)`
  Sets a non-persisted variable before the transition is executed.
  `PlanItemInstanceTransitionBuilder`
  `transientVariables(Map<String,Object> transientVariables)`
  See `transientVariable(String, Object)`.
  `void`
  `trigger()`
  Triggers a plan item to continue, e.g. a human task completion, a service task wait state that continues, etc.
  `PlanItemInstanceTransitionBuilder`
  `variable(String variableName, Object variableValue)`
  Sets a variable before the transition is executed.
  `PlanItemInstanceTransitionBuilder`
  `variables(Map<String,Object> variables)`
  See `variable(String, Object)`.

- ## Method Details

  - ### variable

    PlanItemInstanceTransitionBuilder variable(String variableName, Object variableValue)
    Sets a variable before the transition is executed. The variable will be stored on the case instance.

  - ### variables

    PlanItemInstanceTransitionBuilder variables(Map<String,Object> variables)
    See `variable(String, Object)`.

  - ### formVariables

    PlanItemInstanceTransitionBuilder formVariables(Map<String,Object> variables, org.flowable.form.api.FormInfo formInfo, String outcome)
    The form variables that should be set before the transition is executed.

  - ### localVariable

    PlanItemInstanceTransitionBuilder localVariable(String variableName, Object variableValue)
    Sets a local variable before the transition is executed. The variable will be stored locally on the plan item instance.

  - ### localVariables

    PlanItemInstanceTransitionBuilder localVariables(Map<String,Object> localVariables)
    See `localVariable(String, Object)`.

  - ### transientVariable

    PlanItemInstanceTransitionBuilder transientVariable(String variableName, Object variableValue)
    Sets a non-persisted variable before the transition is executed. The transient variable will not be persisted at the end of the database transaction.

  - ### transientVariables

    PlanItemInstanceTransitionBuilder transientVariables(Map<String,Object> transientVariables)
    See `transientVariable(String, Object)`.

  - ### childTaskVariable

    PlanItemInstanceTransitionBuilder childTaskVariable(String variableName, Object variableValue)
    Behaviors that create a new 'child entity' can take in specialized variables. For example: the case task can pass variables that will be set on the child case instance and not on the parent case instance. Only allowed when starting a plan item instance.

  - ### childTaskVariables

    PlanItemInstanceTransitionBuilder childTaskVariables(Map<String,Object> childTaskVariables)
    See `childTaskVariable(String, Object)`.

  - ### childTaskFormVariables

    PlanItemInstanceTransitionBuilder childTaskFormVariables(Map<String,Object> variables, org.flowable.form.api.FormInfo formInfo, String outcome)
    The form variables that should be used when creating a new 'child entity'.
    See Also:
      - `childTaskVariable(String, Object)`

  - ### completeStage

    void completeStage()
    Completes the plan item instance, which needs to be a stage instance. The stage needs to be completable, otherwise an exception will be thrown.

  - ### forceCompleteStage

    void forceCompleteStage()
    Completes the plan item instance, which needs to be a stage instance. The stage is completed, irregardless whether it is completable or not.

  - ### trigger

    void trigger()
    Triggers a plan item to continue, e.g. a human task completion, a service task wait state that continues, etc.

  - ### enable

    void enable()
    Enables a manually activated plan item instance.

  - ### disable

    void disable()
    Disables a manually activated plan item instance.

  - ### start

    void start()
    Starts a plan item instance, this typically will executes it associated behavior.

  - ### terminate

    void terminate()
    Manually terminates a plan item instance.