-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Workflow] State machine is blocked by marking #34489
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
Comments
This looks expected to me. If you specify multiple froms, the workflow needs to be in all of them in order to be able to apply the transition. For your case it seeems to me that using two transitions would be the solution. |
Im not sure, the graph is correctly generated (nor did we get any compile errors for invalid workflow config 🤔 ) Looking at https://symfony.com/doc/current/workflow/workflow-and-state-machine.html#state-machines For our business im not sure we can split 1 transition into 2, as we allow The idea was to not let callers choose between |
The docs demo this usecase as well. Now looking at symfony/src/Symfony/Component/Workflow/Tests/StateMachineTest.php Lines 86 to 108 in dab6732
ref #28432 This works as expected, but |
Hello, Could you give me a reproducer ? Thanks |
Hi @lyrixx here's a failing test (based on current master): https://github.com/ro0NL/symfony/commit/fbe0a5a26cb1708e92019fee5c9d578abecbeb16 invocation
i figured the bug(?) lies in |
Thanks for the reproducer. I was able to find and fix the issue. I did not applied the same conditions between the I reused your tests 👍 and I make theme passed. |
…apply() and the buildTransitionBlockerList() method (lyrixx) This PR was merged into the 4.3 branch. Discussion ---------- [Workflow] Apply the same logic of precedence between the apply() and the buildTransitionBlockerList() method | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #34489 | License | MIT | Doc PR | Commits ------- 2ff3496 [Workflow] Apply the same logic of precedence between the apply() and the buildTransitionBlockerList() method
Symfony version(s) affected: encountered on 4.3
We have a state machine with some transition having multiple "froms":
Then we have a guard event for this transition, at this point the current marking is e.g. A.
We add a transition blocker.
During
apply
we seeThe marking does not enable the transition.
, where our custom "explanation" from the transition blocker was expected.I think a bug lies in
https://github.com/symfony/symfony/blob/4.3/src/Symfony/Component/Workflow/Workflow.php#L257-L278
Our current place is "A", but it expects A and B to be set in the marking 🤔
Is this something Petri net specific still?
cc @lyrixx :) maybe im missing it.
The text was updated successfully, but these errors were encountered: