-
Notifications
You must be signed in to change notification settings - Fork 557
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
PI Modification: Reject direct termination of child process #10352
Merged
zeebe-bors-camunda
merged 3 commits into
main
from
10347_reject_termination_of_child_instance
Sep 15, 2022
Merged
PI Modification: Reject direct termination of child process #10352
zeebe-bors-camunda
merged 3 commits into
main
from
10347_reject_termination_of_child_instance
Sep 15, 2022
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
It is possible to terminate a process instance using a modification command. This is done by adding terminate instructions for all of the active element instances of the process. When this happens the process will be fully terminated. However, it could be the case that a process is started with a call activity. This causes a complex situation. Terminating the child process would mean the parent process is "stuck". There is a few ways around this. 1. We could terminate the parent process. This could have unintended consequence for the user. 2. An incident is created on the parent process. The problem here is that the current incident logic makes it impossible to resolve these incidents. These could be worked around by doing another modification. That leaves the question why the user wouldn't modify the parent process in the first place. 3. We reject the command and advice the user to modify the parent process if the child process needs to be terminated. The option we are going for is option 3. When we detect that we are trying to terminate a process which is called by a parent process, the command will be rejected. The user received a message with the advice to modify the parent process instead.
remcowesterhoud
force-pushed
the
10347_reject_termination_of_child_instance
branch
from
September 14, 2022 13:36
9157799
to
30a27a8
Compare
It is possible to terminate a process instance using a modification command. This is done by adding terminate instructions for all of the active element instances of the process. When this happens the process will be fully terminated. However, it could be the case that a process is started with a call activity. This causes a complex situation. Terminating the child process would mean the parent process is "stuck". There is a few ways around this. 1. We could terminate the parent process. This could have unintended consequence for the user. 2. An incident is created on the parent process. The problem here is that the current incident logic makes it impossible to resolve these incidents. These could be worked around by doing another modification. That leaves the question why the user wouldn't modify the parent process in the first place. 3. We reject the command and advice the user to modify the parent process if the child process needs to be terminated. The option we are going for is option 3. When we detect that we are trying to terminate a process which is called by a parent process, the command will be rejected. The user received a message with the advice to modify the parent process instead.
remcowesterhoud
force-pushed
the
10347_reject_termination_of_child_instance
branch
from
September 14, 2022 14:12
30a27a8
to
a0aa73e
Compare
saig0
approved these changes
Sep 15, 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 one suggestion for the rejection message. Please have a look if you like it.
...io/camunda/zeebe/engine/processing/processinstance/ProcessInstanceModificationProcessor.java
Outdated
Show resolved
Hide resolved
Explicitly mention call activity to make the exception more concrete for the user.
bors merge |
Build succeeded: |
zeebe-bors-camunda
bot
deleted the
10347_reject_termination_of_child_instance
branch
September 15, 2022 07:50
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
It is possible to terminate a process instance using a modification command. This is done by adding terminate instructions for all of the active element instances of the process. When this happens the process will be fully terminated.
However, it could be the case that a process is started with a call activity. This causes a complex situation. Terminating the child process would mean the parent process is "stuck". There is a few ways around this.
The option we are going for is option 3. When we detect that we are trying to terminate a process which is called by a parent process, the command will be rejected. The user received a message with the advice to modify the parent process instead.
Related issues
closes #10347
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.