Open bsutton opened 4 years ago
To help with debugging I'm currently adding an onEnter and onExit method to each state.
It would be much nice if this could be done globally.
The GraphBuilder.onTransition listener seems an natural place to hook all transitions and log these events.
The problem is that the Transition object that the listener passes has little information that is of use.
Ideally the Transition object should contain:
Prior state New state Event SideEffect.
This would then allow it to be used for debug logging and reduce clutter in the state machine declaration.
Yeah, makes sense. I'll take a look at it, thank you!
To help with debugging I'm currently adding an onEnter and onExit method to each state.
It would be much nice if this could be done globally.
The GraphBuilder.onTransition listener seems an natural place to hook all transitions and log these events.
The problem is that the Transition object that the listener passes has little information that is of use.
Ideally the Transition object should contain:
Prior state New state Event SideEffect.
This would then allow it to be used for debug logging and reduce clutter in the state machine declaration.