You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "SUNILathulya (via GitHub)" <gi...@apache.org> on 2026/07/15 08:44:15 UTC

[PR] [incubator-kie-issues-2376] Migrate FlowTest methods from v7 legacy runtime to code generation [incubator-kie-kogito-runtimes]

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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues-2376] Migrate FlowTest methods from v7 legacy runtime to code generation [incubator-kie-kogito-runtimes]

Posted by "martinweiler (via GitHub)" <gi...@apache.org>.
martinweiler merged PR #4343:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4343


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org