1

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:

  1. Registering that trigger with every state
  2. Creating an "Every" parent state that every class is a subclass of and registering the trigger there
Devon Bessemer
  • 34,461
  • 9
  • 69
  • 95
JasonC
  • 139
  • 8

0 Answers0