Interface Transitions


public interface Transitions
Manages transitions within a workflow definition. Transitions represent the possible state changes and actions that can be executed in a workflow.

This interface provides methods to manage different types of transitions:

  • Global Transitions - Available from any state
  • Initial Transitions - Used to start workflow instances
  • Common Transitions - Available from states referencing them
  • State Transitions - Specific to individual states
Since:
1.0
See Also:
  • Method Details

    • getGlobalTransition

      Optional<Transition> getGlobalTransition(TransitionId id)
      Gets a global transition by its ID. Global transitions are available from any state in the workflow.
      Parameters:
      id - the ID of the global transition to retrieve
      Returns:
      an Optional containing the transition if found
    • getInitialTransition

      Optional<Transition> getInitialTransition(TransitionId id)
      Gets an initial transition by its ID. Initial transitions are used to start workflow instances.
      Parameters:
      id - the ID of the initial transition to retrieve
      Returns:
      an Optional containing the transition if found
    • addCommonTransition

      void addCommonTransition(Transition transition)
      Adds a common transition to the workflow. Common transitions are available from multiple states but not all states.
      Parameters:
      transition - the transition to add
    • getCommonTransition

      Optional<Transition> getCommonTransition(TransitionId transitionId)
      Gets a common transition by its ID.
      Parameters:
      transitionId - the ID of the common transition to retrieve
      Returns:
      an Optional containing the transition if found
    • removeCommonTransition

      void removeCommonTransition(TransitionId transitionId)
      Removes a common transition by its ID.
      Parameters:
      transitionId - the ID of the common transition to remove
    • getStateTransition

      Optional<Transition> getStateTransition(TransitionId id)
      Gets a state transition by its ID. State transitions are specific to individual states.
      Parameters:
      id - the ID of the state transition to retrieve
      Returns:
      an Optional containing the transition if found
    • addGlobalTransition

      void addGlobalTransition(Transition transition)
      Adds a global transition to the workflow.
      Parameters:
      transition - the global transition to add
    • addInitialTransition

      void addInitialTransition(Transition transition)
      Adds an initial transition to the workflow.
      Parameters:
      transition - the initial transition to add
    • updateInitialTransition

      void updateInitialTransition(Transition transition)
      Updates an existing initial transition.
      Parameters:
      transition - the updated initial transition
    • removeInitialTransition

      void removeInitialTransition(TransitionId transitionId)
      Removes an initial transition by its ID.
      Parameters:
      transitionId - the ID of the initial transition to remove
    • removeTransition

      boolean removeTransition(Transition transitionToRemove)
      Removes a transition from the workflow.
      Parameters:
      transitionToRemove - the transition to remove
      Returns:
      true if the transition was successfully removed, false otherwise