agrz opened a new issue, #1497: URL: https://github.com/apache/incubator-kie-issues/issues/1497
### Problem description: With the Kogito Runtimes rc 10 there is an error with process with multi-instance subprocesse when they are persisted. The error happens when the process is in a state when it waits on the multi instance subprocesses to finish and then is persisted to the database. Then an error shows up: Unknown node instance type: org.jbpm.workflow.instance.node.ForEachNodeInstance$ForEachJoinNodeInstance@.... The problem is connected to the fact that the [ForEachNodeInstance has two subclasses](https://github.com/apache/incubator-kie-kogito-runtimes/blob/34389fe2c21eaa1ea6cc9b58120439884e427725/jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/ForEachNodeInstance.java#L228) and while there is a marshaller for the [ForEachNodeInstance](https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/process-serialization-protobuf/src/main/java/org/jbpm/flow/serialization/impl/marshallers/state/ForEachNodeInstanceWriter.java) there is nothing for the subclasses. It worked in Kogito 2.44.0-alpha without issues. This breaks any of our processes which uses the multi instance for some loop and enabled persistence. We created a [BPMN2-MultiInstanceLoopCharacteristicsProcessWithOutput.bpmn2.zip](https://github.com/user-attachments/files/17131763/BPMN2-MultiInstanceLoopCharacteristicsProcessWithOutput.bpmn2.zip) test process based on the [Test example]( https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/jbpm-tests/src/test/bpmn/org/jbpm/bpmn2/loop/BPMN2-MultiInstanceLoopCharacteristicsProcessWithOutputAndScripts.bpmn2 ) from the jbpm test suite. What the process does: it gets a list of inputs, loops over them into a multi instance subprocess, modifies the inputs with a script and has a user task inside to trigger some human interaction and a state to persist the process. ### How to reproduce: Have a Kogito service with JDBC persistence addon and the above mentioned test process. Start the process with input: `{ "list": [ "one","two" ] }` This will create two subprocesses with a user task each. Call the API to complete one of those user tasks and the process will return a 400 with the above error. Expected behavior: A http status 200 is returned from the complete task and the process waits for completion of the other user task. Current behavior: Returns: Error: response status is 400 with `{ "message": "Unknown node instance type: org.jbpm.workflow.instance.node.ForEachNodeInstance$ForEachJoinNodeInstance@51cb195d" }` -- 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]
