martinweiler commented on code in PR #3649:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3649#discussion_r1737232650


##########
jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/EscalationEventTest.java:
##########
@@ -181,12 +183,16 @@ public void testEscalationBoundaryEvent() {
     }
 
     @Test
-    public void testEscalationBoundaryEventInterrupting() throws Exception {
-        kruntime = 
createKogitoProcessRuntime("org/jbpm/bpmn2/escalation/BPMN2-EscalationBoundaryEventInterrupting.bpmn2");
-        TestWorkItemHandler handler = new TestWorkItemHandler();
-        kruntime.getKogitoWorkItemManager().registerWorkItemHandler("MyTask", 
handler);
-        KogitoProcessInstance processInstance = 
kruntime.startProcess("EscalationBoundaryEventInterrupting");
-        assertProcessInstanceCompleted(processInstance);
+    public void testEscalationBoundaryEventInterrupting() {
+        Application app = ProcessTestHelper.newApplication();
+        ProcessTestHelper.registerHandler(app, "MyTask", new 
TestWorkItemHandler());
+        
org.kie.kogito.process.Process<EscalationBoundaryEventInterruptingModel> 
processDefinition = EscalationBoundaryEventInterruptingProcess.newProcess(app);
+        EscalationBoundaryEventInterruptingModel model = 
processDefinition.createModel();
+        
org.kie.kogito.process.ProcessInstance<EscalationBoundaryEventInterruptingModel>
 instance = processDefinition.createInstance(model);
+        instance.start();
+        instance.workItems().forEach(workItem -> 
instance.completeWorkItem(workItem.getId(), null));

Review Comment:
   It does not seem to be right that we need this here. Isn't the idea of this 
test to check if the escalation event terminates the process instance?



-- 
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