-
Notifications
You must be signed in to change notification settings - Fork 554
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
feat(engine): support inside properties for multi-instance completion #9334
feat(engine): support inside properties for multi-instance completion #9334
Conversation
Hi @korthout. Please take a moment to review this code. 🙇 |
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 @lzgabel 🚀 I really like the changes.
❌ The numberOfTerminatedInstances
will not really be useful to the completion condition, because when an instance has terminated we will terminate the multi-instance as well, so we'll never get to evaluate the completion condition again. Nevertheless, it's good to add the logic for it because we can use it for other things. To make it useful, let's keep track of the value instead of calculating it, similar to numberOfCompletedInstances
.
PS: please ignore the failed automated checks. There appears to be something wrong with the CI, and we're looking into it.
EDIT: We've found a solution for the problems with the CI. Please rebase the PR on the current main
branch.
...ain/java/io/camunda/zeebe/engine/state/appliers/ProcessInstanceElementCompletingApplier.java
Outdated
Show resolved
Hide resolved
.../main/java/io/camunda/zeebe/engine/processing/bpmn/container/MultiInstanceBodyProcessor.java
Outdated
Show resolved
Hide resolved
30991b2
to
b272d1f
Compare
Hi @korthout , I've fixed all review comments, please check this out. 🙇 |
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.
That looks great @lzgabel 👍
❌ I see now that I missed 1 thing on the last review. We should only increment the numberOfCompletedInstances
on completed elements, not on completing elements. The same goes for the numberOfTerminatedInstances
(should be done on terminated elements, not on terminating).
.../main/java/io/camunda/zeebe/engine/processing/bpmn/container/MultiInstanceBodyProcessor.java
Outdated
Show resolved
Hide resolved
Hi @korthout. I've fixed all review comments, please check this out. 🙇 |
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.
Well done @lzgabel 👏 I really like it
bors merge
Description
The BPMN 2.0 specification defined the following properties of a multi-instance body instance:
This PR makes
numberOfCompletedInstances
andnumberOfTerminatedInstances
available for use in the completion condition expression. Although they are available in that expression, they do not exist as process variables. These properties take precedence over process variables with the same name.Out of scope: using these properties in other expressions
Related issues
closes #2893
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/0.25
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation: