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
Boundary Event can't be triggered after EventSubProcess is triggered #6874
Comments
I had a closer look why this happens and I think the bad guy is this https://github.com/camunda-cloud/zeebe/blob/develop/engine/src/main/java/io/camunda/zeebe/engine/processing/common/EventTriggerBehavior.java#L106 We unsubscribe for all kind of events, when we triggered a event sub process, which is in general ok because we don't want to trigger other interrupting event sub processes. On root level it is no problem because the flow scope is the process instance and for a boundary event it has the activity as scope. But for embedded sub processes it is an issue, since here the scopes are the same. So either we don't unsubscribe, since interrupting should be enough. Or we somehow detect that one subscription is for a boundary event, which we don't delete then. Appreciate your input @saig0 |
Discussed with @saig0: First it looked promising with not subscribing for event sub processes, but later we realized that it can cause issues with messages, since they are marked as correlated but not really trigger anything in the process execution. We will use the other approach to only unsubscribe for other event sub processes. In order to do that we add a new property to the TimerRecord and ProcessMessageSubscriptionRecord, which allows us to determine the target element type. Next steps:
This is something which makes it probably not into 1.0, so we should also handle the case where the element type is not available. We should handle the default value as before that we just unsubscribe. |
9175: Trigger boundary events after an interrupting event subprocess is triggered r=saig0 a=saig0 ## Description Fixing the issue that boundary events can't be triggered after an interrupting event subprocess is triggered on the scope. Solve the issue by: * avoid that event subscriptions of boundary event are removed when an interrupting event scope is triggered * introduce a filter when removing the event subscriptions * filter by event subprocesses and ignore other event subscriptions * extend the event scope instance state to distinguish interrupting event subscriptions from boundary events * add the property `boundaryElementIds` for event scopes to distinguish boundary events from other events in the scope * add the property `interrupted` for event scopes to mark if an interrupting event (subprocess) is triggered * if the event scope is interrupted then no other interrupting or non-interrupting events can be triggered * only boundary events can be triggered for an interrupted event scope * if an interrupting boundary event is triggered then the event scope doesn't accept any other event Maintenance: * remove methods from the event scope state that are not used in production code * migrate the event scope state test to JUnit 5 ## Related issues closes #6874 Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
9175: Trigger boundary events after an interrupting event subprocess is triggered r=saig0 a=saig0 ## Description Fixing the issue that boundary events can't be triggered after an interrupting event subprocess is triggered on the scope. Solve the issue by: * avoid that event subscriptions of boundary event are removed when an interrupting event scope is triggered * introduce a filter when removing the event subscriptions * filter by event subprocesses and ignore other event subscriptions * extend the event scope instance state to distinguish interrupting event subscriptions from boundary events * add the property `boundaryElementIds` for event scopes to distinguish boundary events from other events in the scope * add the property `interrupted` for event scopes to mark if an interrupting event (subprocess) is triggered * if the event scope is interrupted then no other interrupting or non-interrupting events can be triggered * only boundary events can be triggered for an interrupted event scope * if an interrupting boundary event is triggered then the event scope doesn't accept any other event Maintenance: * remove methods from the event scope state that are not used in production code * migrate the event scope state test to JUnit 5 ## Related issues closes #6874 Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
Describe the bug
Imagine following process:
We first trigger the EventSubProcess and afterwards the boundary event. The boundary event should terminate the scope but it can't be triggered since the Timer is canceled.
To Reproduce
Model:
diagram_1.bpmn.txt
Test:
Unfortunately I cant use the Bpmn Model API to write the test
Expected behavior
Log/Stacktrace
Full Stacktrace
Environment:
The text was updated successfully, but these errors were encountered: