Package avail. utility. fsm
Types
An ExecutionContext represents a running finite state machine. In order to execute a step, it maintains a reference to the executor, the current state, and a client-provided memento which will be passed as the sole argument of every action invocation.
Exception thrown during a state transition when an invalid execution context is detected.
Exception raised during an invalid transition.
A finite state machine (FSM) comprises a finite set of states, a table of transitions between those states, and a table of actions to be performed when states are entered, exited, or transitioned between. Each transition may have a guard, allowing conditional selection among transitions for the same event. A transition may have null for its event, in which case the transition is traversed immediately after arriving if the guard permits.
A StateMachineFactory enables a client to dynamically specify and assemble a finite state machine. In particular, the factory allows a client to flexibly define a particular FSM while ignoring specification and evaluation order dependency. Validation is postponed until final assembly time, at which time a ValidationException will be thrown in the event of incorrect or incomplete specification; otherwise, the constructed FSM provably reflects the client specification.
Exception thrown by the factory's validation process in the event that the client-specified state machine fails validation.