-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Workflow] Use Enum as places #57193
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
Labels
Comments
Did you search for earlier issues and PRs on that topic? |
My bad, I looked into issues (apparently not well), not PRs ^^" |
Closing as duplicate of #44211. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Workflow yaml configuration waits for string values to configure places and transitions. Also, the marking store key needs a property/method to access.
Since enums exist, I think using them for workflows fits pretty well.
But the only way to achieve this is by following what's described here : https://www.strangebuzz.com/en/blog/using-php-enumerations-with-your-symfony-workflows
Places
I suggest to make enums compatible with the workflow component based on these rules:
Transitions
For transitions, maybe a new way to configure them could be better with enums.
Before
After
Please feel free to give me your point of view about this idea.
I would be glad to contribute on this feature if you think it's relevant 😃
Example
Example of new workflow config:
The text was updated successfully, but these errors were encountered: