Class EventStateMachine

java.lang.Object
com.iantapply.orchestra.engine.EventStateMachine

public final class EventStateMachine extends Object
Validates legal transitions between persisted execution states.
  • Constructor Details

    • EventStateMachine

      public EventStateMachine()
      Creates a validator for the fixed Orchestra transition graph.
  • Method Details

    • requireTransition

      public void requireTransition(EventStatus from, EventStatus to)
      Rejects a transition that is not present in the transition graph.
      Parameters:
      from - current status
      to - requested status
      Throws:
      IllegalStateException - when the transition is not allowed