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 NPE during PI modification #10601
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ement If a command is received in which both the multi instance body, as well as the nested element gets terminated we should be able to handle this without exceptions.
remcowesterhoud
force-pushed
the
10537_pi_modify_npe
branch
from
October 4, 2022 09:22
7bf05d5
to
9ddd9c0
Compare
saig0
approved these changes
Oct 5, 2022
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 looks good. 👍
I have only a minor suggestion regarding the test case.
...io/camunda/zeebe/engine/processing/processinstance/ModifyProcessInstanceTerminationTest.java
Outdated
Show resolved
Hide resolved
A command could contain multiple terminate instruction that result in the termination of the same element instance. For example, when we have a sub process and a nested element. If both this sub process and the nested element are part of the terminate instructions, the nested element will be terminated twice. When we receive the command we verify that all instances exist. However, once the first terminate instruction terminates the element, the instance no longer exist for the second terminate instruction. When this occurs we should ignore the terminate instruction.
remcowesterhoud
force-pushed
the
10537_pi_modify_npe
branch
from
October 5, 2022 08:00
9ddd9c0
to
43b0a1d
Compare
bors merge |
Build succeeded: |
Successfully created backport PR #10608 for |
korthout
added
the
version:8.1.1
Marks an issue as being completely or in parts released in 8.1.1
label
Oct 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Multiple terminate instructions could result in the termination of a specific element instance multiple times. When this happened a NPE would occur, rolling back the modification. When we encounter this issue we can just ignore the second termination of this specific element instance, as we've already processed it as part of a different instruction.
Related issues
closes #10537
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.