-
Bug Report
-
Resolution: Won't Fix
-
L3 - Default
-
None
-
7.16.0, 7.17.0
-
None
Environment (Required on creation):
Any supported environment. The issue was reproduced in a JUnit test using H2.
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
Camunda documents in the modification instruction execution order section (last paragraph) that performing start-before and cancel modifications (in that order) on a sub process instance will preserve that sub process instance. This doesn't seem the case for the following use-case.
Steps to reproduce (Required on creation):
- Start an instance of test_bpmn.bpmn
with a variable is_user_task set to true.
- Perform a process instance modification
- Start before activity Event_10xama1 (the intermediate throw event)
- Cancel All for Activity Activity_0rt2g8k (the user task)
Observed Behavior (Required on creation):
The process is terminated. The execution doesn't reach the End event (Event_12hdndv) successfully.
Expected behavior (Required on creation):
- The process is modified successfully.
- The process is in a COMPLETED state.
Root Cause (Required on prioritization):
When the "Start before" instruction is executed, the ancestor scope is incorrectly determined to be the execution that is canceled in the next modification instruction (the user task in the example).
The new execution (the intermediate throw event) is not created correctly in the execution tree, leading to a termination of the process instance.
Note:
The modification works successfullt if the ancestor id is explicitly set.
This is not a bug. The reason is the following:
When a process instance modification instruction is performed, the execution continues until a wait state is reached, or the execution is completed (i.e. the execution token is consumed in BPMN terms).
The above actions happen before the next process instance modification instruction is performed.
So in the example provided to reproduce this issue, the following steps are performed:
Therefore, I'm closing this ticket.