Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1057188

Summary: Query for process history via REST in jbpm cluster using PER_PROCESS_INSTANCE session strategy fails
Product: [Retired] JBoss BPMS Platform 6 Reporter: Radovan Synek <rsynek>
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED CURRENTRELEASE QA Contact: Radovan Synek <rsynek>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: kverlaen, rsynek, smcgowan
Target Milestone: ER1   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:03:27 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:
Attachments:
Description Flags
REST response for query for process instance history
none
stacktrace from server node two - server shutdown
none
stacktrace node two, 6.0.1.ER1 none

Description Radovan Synek 2014-01-23 15:35:24 UTC
Created attachment 854448 [details]
REST response for query for process instance history

Description of problem:
Having a jbpm cluster with two nodes (EAP 6.1.1 domain), following query for process history via REST API fails with response "No session found for context 6" (see an attachment):
/business-central/rest/runtime/org.jboss.qa.bpms:clustering:1.0.0.Final/history/instance/6

Corresponding deployment unit has session strategy PER_PROCESS_INSTANCE, I don't get this error with other session strategies

Steps to Reproduce:
1. Configure 2 node jbpm cluster on EAP 6.1.1 with a production DB
2. Clone repository git://git.app.eng.bos.redhat.com/bpms-assets.git to your BPMS installation.
3. Build and deploy project clustering (org.jboss.qa.bpms:clustering:1.0.0.Final) with session strategy PER_PROCESS_INSTANCE
4. Try to start any process from the project via REST API on the first node
5. Shut the first down and complete the process on the second node
6. After the process instance has been completed, query for its history (again, on the second node).

Additional info:
when the cluster is shutting down, error message appears in server log of the second node saying that "java.lang.IllegalStateException: Invalid session was used for this context org.kie.internal.runtime.manager.context.ProcessInstanceIdContext@2deb02a5". Full stacktrace is attached.

Comment 1 Radovan Synek 2014-01-23 15:36:34 UTC
Created attachment 854449 [details]
stacktrace from server node two - server shutdown

Comment 3 Radovan Synek 2014-02-27 16:34:47 UTC
Although querying for process history via REST works now, I suspect some part of the issue persists, because I can see the same error message in the node two server log (attaching).

Comment 4 Radovan Synek 2014-02-27 16:36:01 UTC
Created attachment 868634 [details]
stacktrace node two, 6.0.1.ER1

Comment 5 Marco Rietveld 2014-02-28 02:25:33 UTC
Radovan, I agree that there's still an issue -- but not that it is related to this bugzilla. 

Could you please create a new issue? The exception shown in the logs is *not* related to the REST performance.

If you think that it is a REST issue, please let me know why!

Comment 6 Radovan Synek 2014-02-28 07:07:49 UTC
Agree, this is more likely a separate issue, here is the new BZ: bug 1071144. Thanks for the notice.

Verified with BPMS-6.0.1.ER1 (As the query for process instance history via REST works.)