martinweiler commented on code in PR #3641:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3641#discussion_r1737278981


##########
jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/StandaloneBPMNProcessTest.java:
##########
@@ -230,25 +258,24 @@ public void testUserTask() {
 
     @Test
     public void testLane() throws Exception {
-        kruntime = 
createKogitoProcessRuntime("org/jbpm/bpmn2/flow/BPMN2-Lane.bpmn2");
-
+        Application app = ProcessTestHelper.newApplication();
         TestWorkItemHandler workItemHandler = new TestWorkItemHandler();
-        kruntime.getKogitoWorkItemManager().registerWorkItemHandler("Human 
Task", workItemHandler);
-        KogitoProcessInstance processInstance = kruntime.startProcess("Lane");
-        
assertThat(processInstance.getState()).isEqualTo(KogitoProcessInstance.STATE_ACTIVE);
-        kruntime.getKogitoWorkItemManager().registerWorkItemHandler("Human 
Task", workItemHandler);
+        ProcessTestHelper.registerHandler(app, "Human Task", workItemHandler);
+        org.kie.kogito.process.Process<LaneModel> definition = 
LaneProcess.newProcess(app);
+        LaneModel model = definition.createModel();
+        ProcessInstance<LaneModel> processInstance = 
definition.createInstance(model);
+        processInstance.start();
+        
assertThat(processInstance.status()).isEqualTo(ProcessInstance.STATE_ACTIVE);
         KogitoWorkItem workItem = workItemHandler.getWorkItem();
         assertThat(workItem).isNotNull();
         assertThat(workItem.getParameter("ActorId")).isEqualTo("john");
         Map<String, Object> results = new HashMap<>();
         ((InternalHumanTaskWorkItem) workItem).setActualOwner("mary");
-        
kruntime.getKogitoWorkItemManager().completeWorkItem(workItem.getStringId(), 
results);
-        kruntime.getKogitoWorkItemManager().registerWorkItemHandler("Human 
Task", workItemHandler);
+        processInstance.completeWorkItem(workItem.getStringId(), results);
         workItem = workItemHandler.getWorkItem();
         assertThat(workItem).isNotNull();
-        assertThat(workItem.getParameter("SwimlaneActorId")).isEqualTo("mary");

Review Comment:
   I don't think converting this test case without the check for the swimlane 
makes sense. If there is an underlying issue that needs to be investigated, I'd 
propose to:
   1. Raise a JIRA to address this issue
   2. Remove this test case from the current PR and convert it once 1. is fixed



-- 
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