Patterns
State Machine
Modeling event-driven state transitions with recursive Vadalog rules.
A state machine is simply a system that exists in one of a number of states. That system changes states — it “transitions” — due to some input into the system, resulting in another state.
In order to model a state machine’s transitions, you’ll need to keep track of the time (or order) of the events, otherwise Prometheux will not know how to apply the events in which order.
The expected output set of facts is:
Note that the order of output states is not guaranteed.

