Closed patternleaf closed 6 years ago
Hey, so sorry I've only just seen this!
I haven't looked at this project for ages.
Did you solve the problem?
Hey thanks for commenting. I wound up building my own state machine. :) Feel free to close the issue.
It's a fun challenge isn't it! I have lots of ideas for v2. If I ever get the time :P
Howdy - I was starting to integrate state-machine into a project but it seems to be lacking a feature I wanted: at simplest, it's the ability to capture and propagate the cause of a transition cancellation.
My actual desire is the ability to treat a call to
fsm.do('action')
like a promise: if the transition succeeds, do X, if the transition fails, do Y, with an argument explaining why the transition failed. I think I could probably emulate this with an argument passable tofsm.cancel(error)
that is then propagated to thecancel
transition event. (I'd also appreciate a system-levelcancel
event to hook into.)Anyway I'll probably just implement my own (far simpler) state machine but this project seems to have a lot of care behind it so thought you might appreciate the idea. No worries if it is not a use case you are interested in supporting. Thanks!