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
Guarded Transition for not changing State #41
Comments
I encountered the exact same problem, posted here, but then figured out the answer. For me the solution was to create two complimentary gate clauses. In one instance (the positive you-may-proceed scenario) I had a "positive" gate clause on the '.permitIf()', then a "negative" gate clause on the '.ignoreIf()'. A snippet of my configuration for the state machine where this is used looks like the following ...
Note that I had to include complimentary pairs for both the "DependenciesReady" event as well as the "HealthOk" event. Both must be true to allow the state machine controlling the life cycle for this situation progress to a READY state. Hope this helps. |
This is obviously a /very/ lame way of working around this issue. So I'll figure out a way to work this into the code so that users no longer run into this. Thanks for submitting and thanks for helping out @rv7akro |
Turns out that if we implement this any other way, we end up removing some portion of the functionality. I'll update the error message to reflect what I've found. Edit: Err-- I'll see if I can just create a simplified way to fixing this issue such as |
As titled, permits the transition if guard true, but ignores the transition if guard is false
When I configure a state transition with permitIf and the guard function doesn't allow the transition
I'm getting following exception. However I except the state unchanged.
The text was updated successfully, but these errors were encountered: