A generic and customizable finite state machine (FSM). An FSM is characterized by a set of FsmStates. It is intended to be periodically activated by some external agent. When it is activated, the FSM executes the actions associated to the current state and performs any required state transitions.
See the Finite State Machine design pattern.