I am using stateless and have the following states:
- Foo
- Bar
- Faulted
When the fault trigger happens, I want the state machine to transition to the Faulted state, regardless of the previous state. Is there a way to do that something like:
machine.RegisterGlobalTrigger(Trigger.Fault, State.Faulted)
Note: I have thought of the following options, but looking for a "cleaner" solution:
- Registering that trigger with every state
- Creating an "Every" parent state that every class is a subclass of and registering the trigger there