SUNILathulya opened a new pull request, #4318: URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4318
Migrated error event handling tests which are being compiled using legacy v7 to code generation approach. The tests can be identified by referring to ErrorEventTest.java: https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/ErrorEventTest.java ### Tests Migrated 1. **testErrorBoundaryEventOnTask()** - Line 103 - Migrates error boundary event on human task - Converts from v7 `createKogitoProcessRuntime()` to v9 generated classes - Uses `ErrorBoundaryEventOnTaskProcess` and `ErrorBoundaryEventOnTaskModel` - Updates assertions to match v9 behavior (STATE_COMPLETED for caught errors) 2. **testCatchErrorBoundaryEventOnTask()** - Line 125 - Migrates selective error throwing based on actor - Tests error boundary event catches error from "mary" while "john" task remains pending - Process ends in STATE_ACTIVE (john's task still pending) 3. **testEventSubprocessErrorThrowOnTask()** - Line 147 - Migrates event subprocess error handling - Uses `EventSubprocessErrorProcess` and `EventSubprocessErrorModel` - Tests event subprocess catches task error and aborts process - Process ends in STATE_ABORTED ### Migration Changes - Replaced `createKogitoProcessRuntime()` with generated process classes - Used `ProcessTestHelper` for application and handler setup - Updated assertions to match v9 behavior - Removed event listeners and `assertNodeTriggered()` calls (implementation details) - Preserved original test intent and validation logic ### BPMN Files - `BPMN2-ErrorBoundaryEventOnTask.bpmn2` (tests 1 & 2) - `BPMN2-EventSubprocessError.bpmn2` (test 3) Issue: https://github.com/apache/incubator-kie-issues/issues/2345 -- 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]
