-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop/abort passive state machine #57
Comments
Can you proved more information why stop didn't work? Was it an active or passive, an async or synchronous state machine? The behaviour of Stops is different for the 4 kinds of machines. For exceptions, you can introduce a global transition (pack all states into a superstate that has this transition) for exceptions and fire an event representing this scenario with |
It's AsyncPassiveStateMachine. As it transitions though states, I see TransitionExceptionThrown event triggering, but it keep going without stopping. I tried to call Stop in TransitionExceptionThrown handler, but state machine does not stop. |
Yes, the passive state machines continue executing the current "stack" of events and will only stop once they are all executed. |
Question: Is there a way to abort the state machine to prevent any further transitions? I used the Stop() method, but it doesn't stop it. I understand it may not be recommended to do so, but there's no need to keep transitioning if there's an transient exceptions and whatnot... Could you please suggest a recommended way to deal with such cases?
The text was updated successfully, but these errors were encountered: