Bug 766081

Summary: JMSTaskClientConnector does not respect 'removeEvent' during TaskEventKey registration
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Jeffrey Bride <jbride2001>
Component: jBPM 5Assignee: Kris Verlaenen <kverlaen>
Status: VERIFIED --- QA Contact: Lukáš Petrovický <lpetrovi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: lpetrovi
Target Milestone: ER4   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jeffrey Bride 2011-12-10 00:17:00 UTC
Hi,
   When registering for specific TaskEvents (ie:  TaskCompletedEvent) it's possible to instruct the JMSTaskClientConnector *NOT* to terminate immediately after having processed that corresponding event back from the human task server.

Regardless, org.jbpm.task.service.jms.JMSTaskClientConnector.Responder.run() *always* terminates after processing a response back from the jbpm5 human task server. 

What I've encountered is that after having registered a TaskCompletedEvent with the HumanTask server with 'removeEvent' = false, only the first taskCompletedEvent sent by the HumanTask server is processed by JMSTaskClientConnector.  After processing this first TaskCompletedEvent, the 'Responder' thread terminates and no subsequent TaskCompletedEvents are ever processed.  Instead, those corresponding TaskCompletedEvent (buried in an ObjectMessage) linger around in the task client queue.


  When instructing the JMSTaskClientConnector not to terminate immediately (ie:  such as registering for TaskCompletedEvents, the JMSTaskClientConnector should block on the 'consumer.receive()' call within an infinite loop.

please see the following for a refactored implementation of JMSTaskClientConnector that can continually process the various TaskEvents :

https://github.com/jbride/jbpm/blob/gbd/jbpm-human-task/src/main/java/org/jbpm/task/service/jms/JMSTaskClientConnector.java

thanks,
jeff

Comment 1 Kris Verlaenen 2012-01-27 15:06:19 UTC
Fixed in community, should be available in next build.

Comment 2 Ryan Zhang 2012-02-15 09:12:46 UTC
Please verify the issue on 5.3 ER4.

Comment 3 Lukáš Petrovický 2012-05-21 07:34:11 UTC
VERIFIED in source code. ER7.