Class EventStateMachine
java.lang.Object
com.iantapply.orchestra.engine.EventStateMachine
Validates legal transitions between persisted execution states.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a validator for the fixed Orchestra transition graph. -
Method Summary
Modifier and TypeMethodDescriptionvoidrequireTransition(EventStatus from, EventStatus to) Rejects a transition that is not present in the transition graph.
-
Constructor Details
-
EventStateMachine
public EventStateMachine()Creates a validator for the fixed Orchestra transition graph.
-
-
Method Details
-
requireTransition
Rejects a transition that is not present in the transition graph.- Parameters:
from- current statusto- requested status- Throws:
IllegalStateException- when the transition is not allowed
-