Package com.orchestranetworks.workflow

# Interface ProcessInstanceHistory

public interface ProcessInstanceHistory
Interface that represents the history of a workflow. If that workflow is not completed, this interface also specifies the current step.

Since:
  5.4.1
See Also:
  - `ProcessInstanceStep`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static enum`
  `ProcessInstanceHistory.TerminationType`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ProcessInstanceStep`
  `getCurrentStep()`
  If the process instance is not completed, returns the current step.
  `List<ProcessInstanceStep>`
  `getSteps()`
  Returns the list of process instance steps that have already been executed, as well as the current step if the process is not yet complete.
  `ProcessInstanceHistory.TerminationType`
  `getTerminationType()`
  Returns the termination type of the workflow.

- ## Method Details

  - ### getSteps

    List<ProcessInstanceStep> getSteps()
    Returns the list of process instance steps that have already been executed, as well as the current step if the process is not yet complete. The steps are sorted by ascending order (oldest step first).

    A step can be:

    - a script task,
    - a condition,
    - a user task,
    - a sub-workflow invocation.

    If the workflow is complete and the history has been cleaned, the list of steps will be empty.

    Returns:
      a `List` of `ProcessInstanceStep`.

  - ### getCurrentStep

    ProcessInstanceStep getCurrentStep()
    If the process instance is not completed, returns the current step. Otherwise, returns `null`.

  - ### getTerminationType

    ProcessInstanceHistory.TerminationType getTerminationType()
    Returns the termination type of the workflow.

    If the workflow is not yet terminated, this method returns `ProcessInstanceHistory.TerminationType.NOT_TERMINATED`.

    Since:
      5.8.0