-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[incubator-kie-issues-1131] test migration from V7 to code generation-7 #3583
Conversation
PR job Reproducerbuild-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3583 --skipParallelCheckout NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3583/1/display/redirect Test results:
Those are the test failures: io.quarkus.it.kogito.devmode.DevMojoIT.testDRLHotReloadCondition with io.quarkus.it.kogito.devmode.DevMojoIT was not fulfilled within 2 minutes. |
Hi the test is not correct. You need to access the process instance created by the engine, not your process instance like you are doing in here. |
@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 :
|
event.getProcessInstance().getId() btw... the ProcessInstance kogito api is not the same as the ProcessInstance kie api (engine). it will throw you a class cast |
Hi @elguardian Can you guide me on how to obtain the org.kie.kogito.process.ProcessInstance<org.jbpm.bpmn2.subprocess.ErrorsBetweenSubProcessModel> object from the event object using a listener? Additionally, is the process instance id the same in both kie api and kogito api? If so, how can we retrieve the org.kie.kogito.process.ProcessInstance<org.jbpm.bpmn2.subprocess.ErrorsBetweenSubProcessModel> object using that id or is there any other alternative to get the sub-process instance? |
@Abhitocode yes the id is the same. you can access the ProcessInstances from the definition to get the process instance |
Hi @elguardian , I've implemented a ProcessEventListener to capture the process instance created by the engine, but I'm facing an issue. The beforeProcessStarted and afterProcessStarted methods of the listener are not being executed. Can you please help me understand if I'm missing something in the configuration or implementation? Application app = ProcessTestHelper.newApplication(); |
you are registering the listener after registering the process... listener should be register before. |
ActivityTest.testErrorBetweenProcessesProcess failures related. please fix |
Il be submitting this particular test testErrorBetweenProcessesProcess in the upcoming pr related to DataTest.java. Removing it from this as of now. |
1c941d9
to
c0d9cdd
Compare
In addition to previous changes associated,
Migrated test case
testErrorBetweenProcessesProcess
but the test seems to have issue where expected state of sub process should be aborted but we are getting state pendingThe test can be identified by referring to Activitytest.java:
https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/ActivityTest.java
Closes apache/incubator-kie-issues#1131.
NOTE : This pr contains test which is yet to be resolved, commented the issues for particular tests, will update and push once resolved.