-
Notifications
You must be signed in to change notification settings - Fork 768
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
Check available transitions #450
Comments
i create MVP for reproduce that case
so the problem is guard for action. stateless try to invoke guard any idea to fix this? |
i created pull request #451 for that case |
I do not understand your MVP. You have a string as a trigger parameter but want to use a Guid instead? Stateless throwing an
Since this your main requirement, it should be trivial to add an overload to |
i post only code for reproduce. in real case i have more transition: so, than i try to check is transition available ithe argumentexception was throwed UPD: |
additional notice - method with name GetPermittedTriggers shouldn't throw exception if argument type does not much guard type. If there is no guard for that type then trigger is not permitted. by convention. |
I've created a pull request to resolve the exception when GetPermittedTriggers #457 |
@HenningNT May you please pick one of the pull requests to fix this issue? |
up |
I need to have method which return true if transition with specified trigger and parameters available for current state.
because there are parameters i can't use CanFire, so i write following code:
and it works perfectly, but not always.
for example i have state machine with following transitions:
now, then i call CanApply method with SendToWork as trigger and Guid as argument the ArgumentException was throwed. Stateless try to convert Guid to string.
i can't find any workaround to get available transition.
The PermittedTriggers property also throw exception (but another - NullReference)
Environment:
The text was updated successfully, but these errors were encountered: