Abhitocode commented on PR #3583:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3583#issuecomment-2243236964
@elguardian I have implemented the listener and registered, that allows me
to get the sub-process instance of type
'**org.kie.api.runtime.process.ProcessInstance**', however in order to check
the status in migrated test I need sub-process instance of type
'**org.kie.kogito.process.ProcessInstance<org.jbpm.bpmn2.subprocess.ErrorsBetweenSubProcessModel>**'
. An alternative solution might be to get the process instance by the id
(which we can obtain from listener event) if there is any way to do so. But
however I'm not sure how to retrieve the process instance by id.
This is how I implemented and registered the listener :
`DefaultKogitoProcessEventListener listener = new
DefaultKogitoProcessEventListener() {
@Override
public void afterProcessStarted(ProcessStartedEvent event) {
subProcessInstanceList.add((ProcessInstance<ErrorsBetweenSubProcessModel>)
event.getProcessInstance());
}
};
ProcessTestHelper.registerProcessEventListener(app, listener);
`
--
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]