Bug 796654 - No way to set a WorkItemHandler to StatelessKnowledgeSession
Summary: No way to set a WorkItemHandler to StatelessKnowledgeSession
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER7
: BRMS 5.3.0.GA
Assignee: Mark Proctor
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-23 11:58 UTC by Tomas Schlosser
Modified: 2025-02-10 03:19 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:19:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBRULES-3476 0 Major Closed Add NewRegisterWorkItemHandlerCommand to CommandFactory with unit test 2013-11-24 00:29:43 UTC

Description Tomas Schlosser 2012-02-23 11:58:39 UTC
Description of problem:
API does not provide any way to register work item handler in StatelessKnowledgeSession. If the process containing WorkItem node is started, the exception is thrown saying "Could not find work item handler for <whatever>".

Version-Release number of selected component (if applicable):
BRMS-5.3.0-ER4

Comment 1 Kris Verlaenen 2012-02-28 23:45:43 UTC
When using a stateless session, the session is always created upon request and disposed at the end of the invocation.  There are however two ways to set a handler:

 - using a configuration file in the classpath that defines handlers
 - by adding a RegisterWorkItemHandlerCommand as part of the commands you are sending to the stateless service to first register the handler and then execute the rest of the commands

Would this be sufficient?

Kris

Comment 2 Tomas Schlosser 2012-02-29 07:13:41 UTC
That should dod the trick. Thank you Kris.
However I have one more request: could it be added to CommandFactory? I use it (since it is the official API) and don't search for Command implementations anywhere else. If it would not be possible, please add it to documentation.
Thank you.

Comment 3 Mark Proctor 2012-04-06 00:41:52 UTC
I'll take this one.

Comment 4 Mark Proctor 2012-04-20 17:18:08 UTC
fixed with unit test.
applied to master, 5.4.x and 5.3.x

5.3.x commit below:
https://github.com/droolsjbpm/drools/commit/fd655f726d491fd18ab42dc2aa5eb80e5da2d198

Comment 6 JBoss JIRA Server 2012-04-20 17:19:52 UTC
Mark Proctor <mproctor> updated the status of jira JBRULES-3476 to Resolved

Comment 7 JBoss JIRA Server 2012-04-20 17:19:58 UTC
Mark Proctor <mproctor> updated the status of jira JBRULES-3476 to Closed

Comment 8 Ryan Zhang 2012-04-23 07:37:44 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 10 Tomas Schlosser 2012-05-02 13:47:06 UTC
The method newRegisterWorkItemHandler() is still unavailable in ER6. Ryan, did this code make it into ER6?

Comment 11 Ryan Zhang 2012-05-14 08:17:07 UTC
The fixed for this issue should be included in ER7. Please do verification on it.

Comment 12 Tomas Schlosser 2012-05-21 08:15:59 UTC
This feature is included in ER7 build. Thank you

Comment 18 Red Hat Bugzilla 2025-02-10 03:19:07 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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