Interface LifeCyclePhase


public interface LifeCyclePhase
Definition of the life cycle phase that work item can be connected to.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    apply(WorkItem workitem, Transition<?> transition)
    Optional extra work to be applied on work item upon transition to this phase
    boolean
    Returns if given life cycle phase can be transitioned to this phase
    id()
    Returns unique id of this life cycle phase
    boolean
    Returns if given state is the completing phase (final state) for given work item
    boolean
    Returns if given state is the terminating phase (final state) for given work item
    Returns status associated with this life cycle phase
  • Method Details

    • id

      String id()
      Returns unique id of this life cycle phase
      Returns:
      phase id
    • status

      String status()
      Returns status associated with this life cycle phase
      Returns:
      phase status
    • isCompleting

      boolean isCompleting()
      Returns if given state is the completing phase (final state) for given work item
      Returns:
      true if this is final phase otherwise false
    • isTerminating

      boolean isTerminating()
      Returns if given state is the terminating phase (final state) for given work item
      Returns:
      true if this is final phase otherwise false
    • canTransition

      boolean canTransition(LifeCyclePhase phase)
      Returns if given life cycle phase can be transitioned to this phase
      Parameters:
      phase - phase to be transitioned from
      Returns:
      true if phase can be transitioned from to this one otherwise false
    • apply

      default void apply(WorkItem workitem, Transition<?> transition)
      Optional extra work to be applied on work item upon transition to this phase
      Parameters:
      workitem - work item that is being transitioned
      transition - actual transition