SUNILathulya opened a new pull request, #6849: URL: https://github.com/apache/incubator-kie-drools/pull/6849
closes https://github.com/apache/incubator-kie-issues/issues/2383 Migrated testEventBasedSplit5 in StandaloneBPMNProcessTest from the legacy v7 runtime-based API to the v9 code generation approach. The test can be identified by referring to StandaloneBPMNProcessTest.java: https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/StandaloneBPMNProcessTest.java ## Tests Migrated **testEventBasedSplit5()** - Line 455 - Migrates EventBasedGateway routing behaviour validation - Converts from v7 createKogitoProcessRuntime() to v9 generated classes - Uses EventBasedSplit5Process and EventBasedSplit5Model from org.jbpm.bpmn2.intermediate - Tests two scenarios — "Yes" path and "No" path — through an EventBasedGateway with two competing ReceiveTask nodes - Validates that the process completes after the first matching receive task is completed with the correct message data ## Migration Changes - Replaced createKogitoProcessRuntime() with generated process class EventBasedSplit5Process.newProcess(app) - Used ProcessTestHelper for application and handler registration — handlers registered once instead of being re-registered repeatedly (v7 quirk) - Replaced receiveTaskHandler.getWorkItemId().stream().findFirst().ifPresent(...) with ProcessTestHelper.completeWorkItem(processInstance, Map.of(...)) — no need to track work item IDs externally - Replaced assertProcessInstanceCompleted(id, kruntime) with direct processInstance.status() check - Removed cleanup of cancelled receive task work items — v9 engine automatically cancels the other branch when one completes - Updated state constants from KogitoProcessInstance.STATE_* to ProcessInstance.STATE_* ## BPMN Files - `BPMN2-EventBasedSplit5.bpmn2` -- 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]
