-
Notifications
You must be signed in to change notification settings - Fork 565
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
Fix 4099 by opening event subscriptions after start event's output mappings were applied #9047
Conversation
author: Philipp Ossler The subscriptions will now be opened after the output mappings of the start event have been applied. This is in line with user expectations and fixes issue #4099
Should be merged into |
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.
Nice work @pihme 👍
❌ The test case shows clearly that the bug has been resolved. I think the only thing that's missing is a test case that shows that the output mappings of a start event are applied before the subscriptions are opened. Since this is the behavior that changes for users, I'd like to have a test for it.
🔧 Next to that, I just have a few nitpick suggestions.
Lastly, please open a bug that output mappings of a none start event don't allow to modify how the variables are merged into the process. This is the bug we discovered when we played around with none start event.
engine/src/main/java/io/camunda/zeebe/engine/processing/bpmn/event/StartEventProcessor.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/io/camunda/zeebe/engine/processing/bpmn/event/StartEventProcessor.java
Outdated
Show resolved
Hide resolved
@korthout If you have an idea for a short commit message, please let me know These test covers the following scenario: A process has a message/none start event (A) with output mappings. This process also has an event subprocess with a message start event (B) which references a variable that is only created after the output mapping of (A) has been applied. The expectation is that the output mapping for A will be applied, and only after that the message subscription for B will be opened. At this point the message subscription can be opened. If it were opened earlier, it would produce a "variable not found" incident.
No longer necessary. The fix solved this. I added another test with none start event. Please double check. |
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 changes @pihme LGTM 👍
Note that the additional bug we discovered is not fixed by these changes. If you create a process instance with some variables and the none start event has output mappings, then variables that were passed in are still copied into the process instance. This shouldn't happen as the output mappings should allow to completely redefine how and which variables are merged into the process instance. Please open an issue for it. If you want we can also discuss it F2F.
engine/src/main/java/io/camunda/zeebe/engine/processing/bpmn/event/StartEventProcessor.java
Show resolved
Hide resolved
.../test/java/io/camunda/zeebe/engine/processing/message/MessageStartEventSubscriptionTest.java
Show resolved
Hide resolved
Bug created: #9061 |
bors merge |
9047: Fix 4099 by opening event subscriptions after start event's output mappings were applied r=pihme a=pihme ## Description This moves the step when event subscriptions are opened from `ProcessProcessor` and `SubprocessProcessor` to `StartEventProcessor`. This way, subscriptions and the values used for them will only be evaluated after output mappings of the start event have been applied. This fits better to user expectations and fixes #4099 ## Related issues closes #4099 Co-authored-by: pihme <pihme@users.noreply.github.com>
Build failed: |
bors merge |
Successfully created backport PR #9064 for |
Successfully created backport PR #9065 for |
Description
This moves the step when event subscriptions are opened from
ProcessProcessor
andSubprocessProcessor
toStartEventProcessor
. This way, subscriptions and the values used for them will only be evaluated after output mappings of the start event have been applied.This fits better to user expectations and fixes #4099
Related issues
closes #4099
Definition of Done
Code changes:
backport stable/1.3
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation: