-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Workflow] Allow transition when many places in transition froms #22017
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
Conversation
$this->assertCount(1, $transitions); | ||
$this->assertSame('t5', $transitions[0]->getName()); | ||
$this->assertCount(2, $transitions); | ||
$this->assertSame('t2', $transitions[0]->getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sebdec this change is not valid. To apply t2, the subject must be in all froms, in this case "b" and "c", but only "c" is marked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking it was a bug
Is there a solution to apply t2 if the subject is at least in one from ("b" or "c")?
Hello. Thanks for trying to solve a bug but there are no bug here. This is indeed the right behaviour. You are currently using the workflow net implementation and it works like that. It means that a transition becomes enabled if and only if:
It looks like you want to use a |
This PR was merged into the 3.2 branch. Discussion ---------- [Workflow] Added more tests | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22017 | License | MIT | Doc PR | - --- It's not the first time that people try to fix the workflow because they don't understand how it works. Basically, it's because the default configuration is using the "workflow" and not the "state_machine" type. It was a mistake but it's too late because it will be BC break. May be we could solve that by triggering a deprecation if the type is not explicit. But nobody will see it because it will be triggered during the compilation. It could also be fixed with more documentation. Anyway, I want to add more tests to cover that with a little comment in the test suite. Right now, only one tests failed. With this PR more tests are failing. Commits ------- e47cfe9 [Workflow] Added more tests
ok thank you lyrixx for your answer and the tests added |
It is about the workflow component
Actually a permission with multiple places in froms can not be applied
This PR solve that