Clarify complex exclusive scenarios for OnEvents #594
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Ricardo Zanini zanini@redhat.com
Many thanks for submitting your Pull Request ❤️!
Please specify parts of this PR updates:
What this PR does / why we need it:
The Event state
exclusive
attribute had some margin for interpretation. This PR adds a more complex example to clarify such a scenario.Additional information (if needed):
I understand that the
exclusive
property should be moved to theOnEvent
definition. This way, the user could fine-tune their event consumption.Right now, what we have is:
I'm assuming that we want that all the actions defined in the
eventRefs
definition should be consumed to transition the state.Having the
exclusive
property defined onOnEvents
, we would have:Thus, a more controlled definition of how the events should be consumed.
I can propose a PR adding this modification if we agree with that.
Additionally, we could also control if all the actions should be executed to transition to the next state or not. This new property could be in the
Event
state definition to replace theexclusive
attribute. This way, we would also have this possibility:Cheers!