You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behaviour _reset input is only sent to the deepest child FSM.
If there're 3 or more levels of FSMs, the middle ones are not reset.
Expected behaviour
Immediate child FSM should handle _reset input regardless whether it has a child of its own.
Likely use story
Consider a TCP server FSM, which handles one client at a time.
Possible transitions: uninitialized -> listening -> connected -> listening ...
The actual business logic is a hierarchical FSM, which is itself a child of connected state.
If the client disconnects or connection is lost, it would be nice if the whole business logic FSM is reset for the next client.
Notes
The _reset input seems to special because it is not bubbled to the parent.
So, if there's no handler for that in the 3rd level FSM, this input gets lost even if the 2nd level FSM has a handler for it.
I think there should be a special case for the _reset input in the handle function to check if current level has a handler for it and let it only be handled by child if not.
The text was updated successfully, but these errors were encountered:
Current behaviour
_reset
input is only sent to the deepest child FSM.If there're 3 or more levels of FSMs, the middle ones are not reset.
Expected behaviour
Immediate child FSM should handle
_reset
input regardless whether it has a child of its own.Likely use story
Consider a TCP server FSM, which handles one client at a time.
Possible transitions: uninitialized -> listening -> connected -> listening ...
The actual business logic is a hierarchical FSM, which is itself a child of connected state.
If the client disconnects or connection is lost, it would be nice if the whole business logic FSM is reset for the next client.
Notes
The
_reset
input seems to special because it is not bubbled to the parent.So, if there's no handler for that in the 3rd level FSM, this input gets lost even if the 2nd level FSM has a handler for it.
I think there should be a special case for the
_reset
input in thehandle
function to check if current level has a handler for it and let it only be handled by child if not.The text was updated successfully, but these errors were encountered: