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 1071144 - BPMS cluster with deployment unit using PER_PROCESS_INSTANCE session strategy throws java.lang.IllegalStateException
Summary: BPMS cluster with deployment unit using PER_PROCESS_INSTANCE session strategy...
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: CR1
: 6.0.1
Assignee: Maciej Swiderski
QA Contact: Radovan Synek
Depends On: 1079982
TreeView+ depends on / blocked
Reported: 2014-02-28 07:06 UTC by Radovan Synek
Modified: 2014-08-06 20:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-08-06 20:03:16 UTC
Type: Bug

Attachments (Terms of Use)
error stacktrace (deleted)
2014-02-28 07:06 UTC, Radovan Synek
no flags Details
process definition (deleted)
2014-03-04 18:04 UTC, Radovan Synek
no flags Details

Description Radovan Synek 2014-02-28 07:06:44 UTC
Created attachment 868882 [details]
error stacktrace

Take a look at bug 1057188.

Having BPMS cluster with two EAP nodes and deployment unit with PER_PROCESS_INSTANCE session strategy, the exception "java.lang.IllegalStateException: Invalid session was used for this context org.kie.internal.runtime.manager.context.ProcessInstanceIdContext@2deb02a5" is still present on the second node in the moment of its shutdown.

See the attached stacktrace.

Comment 1 Maciej Swiderski 2014-02-28 13:53:47 UTC
this error means that you try to use session that is not mapped to given process instance. After reading the other bug looks like ksession is somehow used after process has been completed and that is not allowed as ksession mapped to process instance will be completely removed from db when process instance is completed or aborted.

So I see this as it works as expected but I'll check with Marco on how rest uses it.

Comment 2 Maciej Swiderski 2014-02-28 17:09:32 UTC

could you please provide more details on how this happens? As described in comment #1, per process instance strategy is very strict to allow only executing process instances assigned to it and not other.

Based on stack trace there is execution of some runtime related operation and not history. Moreover I checked code for REST history operations and couldn't find any code that would use runtime operation.

Comment 3 Radovan Synek 2014-03-04 18:03:40 UTC
The issue happened during a fail-over of simple start->signal event->end process, which has been started on node one and signal sent to node two after killing the node one. I should add that the error message in server log is not the only problem, the process instance was not completed - the signalling failed.

Process definition I used is in the attachment.

Please note that the process has to be deployed with session strategy = PER_PROCESS_INSTANCE and the signal was sent via REST client [1].

Going through the same steps manually via UI was successful - process has been completed and there was no error in the server logs.


Comment 4 Radovan Synek 2014-03-04 18:04:33 UTC
Created attachment 870563 [details]
process definition

Comment 6 Michael 2014-03-17 09:46:51 UTC
Ticket cherry-picked into 6.0.1.CR1. 

jbpm: 3552dfc41cff8d0bafbc05fe45044727e9e1045f
droolsjbpm-integration: 4923aea7e0055b1f7a1a66d9e29affcd36d0b668
droolsjbpm-integration: 0c7c86a4abde6b7f97db7b4f9146ecd124ac5a9b

Comment 7 Radovan Synek 2014-03-31 06:57:37 UTC
Verified with BPMS-6.0.1.CR2

Note You need to log in before you can comment on or make changes to this bug.