Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Workflow] The workflow is un-deterministic when there a many transition with the same name #29140
When many transitions have the same name, the workflow because un-deterministic. This is not cool.
I propose to update the interface:
- can(object $subject, string $transitionName) +can(object $subject, Transition $transition) - apply(object $subject, string $transitionName) +apply(object $subject, Transition $transition)
I will add some helper to get the best transition for a transition name.
This will fix :
This was referenced
Nov 8, 2018
Or another fix could be to forbid the use of the same transition name.
User could easilly leverage metadata
What do you think ?
Note: I think I prefer the last option because it's much more simple, the BC layer will be much more easier to achieve, and there will be less code
Well, for a full-featured workflow, I think we already enforce transition name uniqueness.
If there are issues currently, they are not due to inherent non-determinism, but to implementation bugs (as the initial implementation had unique transition names, we may still have some code relying on this gone assumption)
Yes, may be ;) I'm trying to solve them ATM ;)