Enum Class WorkflowStateType

java.lang.Object
java.lang.Enum<WorkflowStateType>
io.nflow.engine.workflow.definition.WorkflowStateType
All Implemented Interfaces:
Serializable, Comparable<WorkflowStateType>, Constable

public enum WorkflowStateType extends Enum<WorkflowStateType>
Workflow state types.
  • Enum Constant Details

    • start

      public static final WorkflowStateType start
      Initial states of the workflow.
    • manual

      public static final WorkflowStateType manual
      State that requires manual action. Workflow execution is stopped.
    • normal

      public static final WorkflowStateType normal
      State that can be normally executed.
    • wait

      public static final WorkflowStateType wait
      State for waiting something outside this instance to happen, including (but not limited to) child workflow instances to go to end state. When a child workflow finishes and parent is in wait state, parent is automatically woken up.
    • end

      public static final WorkflowStateType end
      Final state of the workflow. Workflow execution is stopped.
  • Method Details

    • values

      public static WorkflowStateType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static WorkflowStateType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isFinal

      public boolean isFinal()
      Returns true is the state of this type is a final state, e.g. a state after which the workflow processing is stopped. The workflow state can be moved to another state only by manual action.
      Returns:
      True for states of type manual and end, false for states of type start and normal.
    • getStatus

      public WorkflowInstance.WorkflowInstanceStatus getStatus(org.joda.time.DateTime nextActivation)
      Returns the status for this type. This is used when a workflow instance state is updated, the new status of the instance will be determined based on the new state type and next activation time.
      Parameters:
      nextActivation - The next activation for the instance.
      Returns:
      The status resolved for this state type and nextActivation.