-
Notifications
You must be signed in to change notification settings - Fork 602
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
Interrupt flow scope when a terminate end event is reached #11178
Conversation
The terminate end event should mark its flow scope as interrupted when it's completed. Having an interrupted flow scope means other elements in this scope can no longer be activated or completed. Any ACTIVATE/COMPLETE command will be rejected. If we do not interrupt the flowscope it is possible for the engine write a TERMINATE command as a result of the end event. It could then go on to process a COMPLETE command. This will not be rejected, and it will take outgoing sequence flows for this element. The TERMINATE will then be rejected as the element is no longer active. Since the flowscope now has an outgoing sequence flows it is considered to have active elements, it will not be terminated, as it should upon reaching a terminate end event.
The terminate end event will have marked the process as interrupted. When a terminate end event is reached we expect its flowscope to be completed, not terminated. Therefore, we need to check if the process was interrupted because of a terminate end event. If this is the case we should try to complete the process.
…te end event The terminate end event will have marked the (event) sub process as interrupted. When a terminate end event is reached we expect its flowscope to be completed, not terminated. Therefore, we need to check if the (event) sub process was interrupted because of a terminate end event. If this is the case we should complete it
@koevskinikola As we discussed last week during the flaky test session I'll assign this review to you. Don't hesitate to reach out if anything is unclear. I'm happy to explain it 🙂 |
I'm not having this PR close #11121 yet. I believe there is more flaky scenarios that are not covered by this bug fix |
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.
👍 @remcowesterhoud, the changes look good to me, but I'd like to do a short call to ensure that I understood everything correctly.
🔧 Should we re-enable the Escalation event Block builder within this PR since it was disabled here? => Answered in the previous comment.
Let's do a call tomorrow. I want to wait re-enabling this block builders. I believe there is another bug hidden somewhere for which I will make a PR tomorrow 😄 |
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.
👍 Thanks for the explanation @remcowesterhoud. I have a better understanding on what is happening now.
LGTM 🚀
bors merge
Build succeeded: |
Successfully created backport PR #11214 for |
Description
The terminate end event should mark its flow scope as interrupted when it's completed. Having an interrupted flow scope means other elements in this scope can no longer be activated or completed. Any ACTIVATE/COMPLETE command will be rejected.
If we do not interrupt the flowscope it is possible for the engine write a TERMINATE command as a result of the end event. It could then go on to process a COMPLETE command. This will not be rejected, and it will take outgoing sequence flows for this element. The TERMINATE will then be rejected as the element is no longer active. Since the flowscope now has an outgoing sequence flows it is considered to have active elements, it will not be terminated, as it should upon reaching a terminate end event.
Since the flow scope gets interrupted we will also have to change the logic in the processors of these possible flow scopes (
ProcessProcessor
,SubProcessProcessors
,EventSubProcessProcessor
). Here we need to verify that the scope was interrupted by a terminate end event, and if it is we need to make sure the scope gets completed, instead of terminated.Related issues
relates to #11121
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/1.3
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation:
Please refer to our review guidelines.