SUNILathulya opened a new pull request, #4343:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4343

   closes https://github.com/apache/incubator-kie-issues/issues/2376
   
   Migrated multi-instance loop characteristics test from the legacy v7 runtime 
to the code generation approach.
   
   The test can be identified by referring to FlowTest.java:
   
https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/FlowTest.java
   
   ## Tests Migrated
   
   **`testMultiInstanceLoopCharacteristicsProcess2()`**
   - Migrates a multi-instance user task loop where each instance produces an 
output collected into a list
   - Uses `MultiInstanceProcessWithOutputOnTaskProcess` and 
`MultiInstanceProcessWithOutputOnTaskModel`
   - Sets process input `miinput` with `["John", "Mary"]` — spawns 2 parallel 
Human Task work items
   - Verifies `mioutput` remains `null` until all instances complete, then 
contains both reply strings
   - Completes a final sequential `User Task 4` work item after the 
multi-instance task finishes
   - Replaces `GetProcessVariableCommand` + 
`kruntime.getKieSession().execute()` with direct 
`processInstance.variables().getMioutput()` access
   - BPMN: `BPMN2-MultiInstanceProcessWithOutputOnTask.bpmn2`
   
   ## Migration Changes
   - Replaced `createKogitoProcessRuntime()` with generated process classes 
(`MultiInstanceProcessWithOutputOnTaskProcess.newProcess(app)`)
   - Used `ProcessTestHelper` for application and handler setup
   - Replaced `kruntime.startProcess()` with 
`processDefinition.createInstance(model).start()`
   - Replaced `kruntime.getKogitoWorkItemManager().completeWorkItem()` with 
`processInstance.completeWorkItem()`
   - Replaced `kruntime.getKieSession().execute(new 
GetProcessVariableCommand(...))` with 
`processInstance.variables().getMioutput()`
   - Replaced `assertProcessInstanceFinished()` with direct 
`processInstance.status()` check against `ProcessInstance.STATE_COMPLETED`
   
   ## BPMN Files
   - `BPMN2-MultiInstanceProcessWithOutputOnTask.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]

Reply via email to