SUNILathulya commented on code in PR #4334:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4334#discussion_r3628303680


##########
jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/EscalationEventTest.java:
##########
@@ -253,8 +262,11 @@ public void 
testInterruptingEscalationBoundaryEventOnTask() throws Exception {
             workItem = workItems.get(1);
         }
 
-        
kruntime.getKogitoWorkItemManager().completeWorkItem(workItem.getStringId(), 
Collections.emptyMap(), SecurityPolicy.of("john", Collections.emptyList()));
-        assertProcessInstanceFinished(processInstance, kruntime);
+        // completing john's task throws escalation which interrupts mary's 
UserTask via boundary event
+        ProcessTestHelper.completeWorkItem(processInstance, 
Collections.emptyMap(), "john");
+        // mary's task is interrupted by the boundary event, completing 
remaining work item

Review Comment:
   @martinweiler  Same root cause as the comment above. In v7, completing 
john's task was sufficient: the escalation end event fired BoundaryEvent_1 
(interrupting, cancelActivity="true") on mary's UserTask_1, which cancelled it 
automatically, allowing the process to finish.
   
   In v9, the interrupting escalation boundary event does not cancel Mary's 
pending task. Removing the second completeWorkItem call results in expected: 2 
but was: 1 — the process stays active. This is the same missing feature that 
the testEscalationBoundaryEventInterruptsTask test documents. The second 
completion is a workaround until v9 implements work-item cancellation via 
interrupting escalation boundary events.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to