SUNILathulya opened a new pull request, #4334: URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4334
Migrated escalation event handling tests which are being compiled using legacy v7 to code generation approach. The tests can be identified by referring to EscalationEventTest.java: https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/EscalationEventTest.java ## Tests Migrated **testEscalationBoundaryEventInterrupting()** - Migrates escalation boundary event on a subprocess - Uses `EscalationBoundaryEventInterruptingProcess` and `EscalationBoundaryEventInterruptingModel` - Boundary event is interrupting (`cancelActivity=true`) — cancels the subprocess - Explicitly completes the `MyTask` work item via `ProcessTestHelper.completeWorkItem()` - BPMN: `BPMN2-EscalationBoundaryEventInterrupting.bpmn2` **testInterruptingEscalationBoundaryEventOnTask()** - Migrates interrupting escalation boundary event on a parallel user task flow - Uses `EscalationBoundaryEventOnTaskInterruptingProcess` and model - Parallel gateway splits into john's task (throws escalation) and mary's task (interrupted by boundary) - Completes john's task first (triggers escalation), then mary's task (interrupted path) - Replaces `SecurityPolicy.of("john", ...)` with user name string directly in `ProcessTestHelper` - BPMN: `BPMN2-EscalationBoundaryEventOnTaskInterrupting.bpmn2` ## Migration Changes - Replaced `createKogitoProcessRuntime()` with generated process classes - Used `ProcessTestHelper` for application, handler and event listener setup - Replaced `kruntime.startProcess()` with `processDefinition.createInstance(model).start()` - Replaced `kruntime.getKogitoWorkItemManager().completeWorkItem()` with `ProcessTestHelper.completeWorkItem()` - Replaced `SecurityPolicy.of()` with user name string directly - Replaced `assertProcessInstanceCompleted()` and `assertProcessInstanceFinished()` with direct `processInstance.status()` check ## BPMN Files - `BPMN2-EscalationBoundaryEventInterrupting.bpmn2` (test 1) - `BPMN2-EscalationBoundaryEventOnTaskInterrupting.bpmn2` (test 2) -- 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]
