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
[Workflow] Method buildTransitionBlockerList returns TransitionBlockerList of incorrect transition #28432
Comments
I found exact place where is transition broken into many same name transitions. And I'm suspicious that there may be more problems around method buildTransitionBlockerListForTransition in state_machine settings. |
Methods buildTransitionBlockerList and can does not even return same result in this case.
|
After few hours I figured that real bug is in method Workflow::buildTransitionBlockerList because it returns TransitionBlockerList of last transition of the given name. Expected return is TransitionBlockerList of transition from current place. If I use example from previous comment then this method returns TransitionBlockerList of transition from place b to place c instead of transition from place a to place c. |
Hello. @Tetragramat About your first issue, this is the expected behavior. |
I saw your PR. but this is not good. Anyway, thanks for it. |
…ny transition are enabled (Tetragramat, lyrixx) This PR was merged into the 4.1 branch. Discussion ---------- [Workflow] Fixed bug of buildTransitionBlockerList when many transition are enabled | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28429 #28432 #28493 | License | MIT | Doc PR | <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 732f343 [Workflow] Made code simpler db69ccc method buildTransitionBlockerList returns TransitionBlockerList of expected transition
Symfony version(s) affected: 4.1.4
Description
When using multiple places for transition in from, generated transitions are broken.
Following configuration
generates these correct places
and multiple incorrect cancelled transitions
Expected result is single cancelled transition with froms containing places created, pending and verified.
So I would be able to make cancelled transition from created place without generated TransitionBlocker::createBlockedByMarking.
Code is basically same as in following docs https://symfony.com/doc/4.1/workflow/state-machines.html
So I suppose it is bug not feature.
The text was updated successfully, but these errors were encountered: