Bug 1128597

Summary: PerProcessInstanceRuntimeManager fails with dependent subprocess abort
Product: [Retired] JBoss BPMS Platform 6 Reporter: Toshiya Kobayashi <tkobayas>
Component: jBPM CoreAssignee: Alessandro Lazarotti <alazarot>
Status: CLOSED EOL QA Contact: Marek Baluch <mbaluch>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.2CC: kverlaen, mbaluch, tkobayas
Target Milestone: DR3   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1281673 (view as bug list) Environment:
Last Closed: 2020-03-27 20:00:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1281673    

Description Toshiya Kobayashi 2014-08-11 07:46:53 UTC
Description of problem:

Platform BZ for https://issues.jboss.org/browse/JBPM-4422


Steps to Reproduce:
1. See unit tests in the pull request referred in JBPM-4422

Actual results:

ksession.abortProcessInstance() throws "java.lang.IllegalStateException: Invalid session was used for this context org.kie.internal.runtime.manager.context.ProcessInstanceIdContext"

Expected results:

Parent/Sub processes are aborted without Exception.

Comment 1 JBoss JIRA Server 2014-08-27 17:02:06 UTC
Maciej Swiderski <swiderski.maciej> updated the status of jira JBPM-4422 to Resolved

Comment 2 Maciej Swiderski 2014-08-27 17:08:34 UTC
fixed on master by making sure correct ksession/runtime engine is used

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/fc7158f83b1008d8d781ede64a92b388af2c6148
https://github.com/droolsjbpm/jbpm/commit/babb028b86df3501cbc90cd08079febe7a2edb57

Comment 3 Jiri Svitak 2014-09-25 14:25:46 UTC
I used the provided unit test and it passes with BPMS 6.1.0.DR3.

However, I've tried to reproduce the problem with BPMS 6.1.0.DR2 (sync-6.2.x-2014.08.08) and the test still passed, therefore I am not sure if the reproducer [1] is valid and verified the problem correctly.

I've also tried to import files BPMN2-DependentCallActivity.bpmn2 and BPMN2-DependentCallActivitySubProcess.bpmn2 into business central of version 6.1.0.DR2 and 6.0.2.CR2 and still was unable to reproduce the issue. (Btw I only had to fix bpmndi reference to 'DependentParentProcess' and 'DependentSubProcess' before import, otherwise designer refused the files). I've tried to run the parent process and abort it, but still I couldn't see any exceptions nor problems.

Toshiya, can you please check on your end that the fix works as you want with DR3 build [2]?

You can also try my DR3 'reproducer' based on your one:
git clone git.lab.eng.bos.redhat.com:bxms/brms.git
cd brms
touch build.properties
mvn clean install -Dtest=BZ1128597PpiManagerWithDependentSubprocessTest -Pjbpm-regression

[1] https://gitlab.mw.lab.eng.bos.redhat.com/bxms/brms/commit/ac1945f2dd2bc2fbbbd3beb5d24f3b84b1ec783e

[2]
http://dev138.mw.lab.eng.bos.redhat.com/candidate/bpms-6.1.0-DR3/

Comment 4 Jiri Svitak 2014-09-25 15:51:45 UTC
Verified in BPMS 6.1.0.DR3.

Please ignore my previous comment. I forgot to change dependency version on two places in pom.xml.

Test regression has been added:
https://gitlab.mw.lab.eng.bos.redhat.com/bxms/brms/commit/ac1945f2dd2bc2fbbbd3beb5d24f3b84b1ec783e