Always wanted to build an alarm system as a state machine. Project I'm working on (alarm system for a yacht) required me to do it, so I put together an example using Stateless.
I needed support for "temporary" states (i.e. PreArmed, a state between Disarmed and Armed (to allow for some configurable pre-arm delay)), which I've implemented using timers triggered via OnEntry() and OnExit() methods. These temporary states have a pre-defined TimeOut transition/command that progresses/regresses them to the relevant state.
Always wanted to build an alarm system as a state machine. Project I'm working on (alarm system for a yacht) required me to do it, so I put together an example using Stateless.
I needed support for "temporary" states (i.e. PreArmed, a state between Disarmed and Armed (to allow for some configurable pre-arm delay)), which I've implemented using timers triggered via OnEntry() and OnExit() methods. These temporary states have a pre-defined TimeOut transition/command that progresses/regresses them to the relevant state.
PR #516 raised.