-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Terminal state #49
Comments
Hi, thanks for using the library. Terminal state is not different from any other state therefore you should be able to use standard callbacks: state_machine.on_enter :failed do |event|
...
end Currently the |
Thank you for your answer. PS. Is it possible do something like this:
? Because I didn't find anywhere this case. |
I agree it would be great. Currently there are few quite important issues to address first. The callbacks currently work with single state names due to dynamic method definitions. However, the underlying code accepts any number of arguments so I would just test if your callback gets fired for two different states. Unfortunately I'm without internet now and my provider is less than helpful restoring it so may be unavailable for couple days. |
This was actually always implemented, the terminal :failed, :finished I've updated docs to explain multiple terminal states. |
Hi,
I have a little problem because I would like read terminated state but I can't If:
terminal [:failed, :finished]
Thanks
Peter
The text was updated successfully, but these errors were encountered: