Bug 804054 - MessageEndEvent causes an exception
MessageEndEvent causes an exception
Status: NEW
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Kris Verlaenen
Tomas Schlosser
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-16 08:28 EDT by Tomas Schlosser
Modified: 2012-07-03 18:47 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Schlosser 2012-03-16 08:28:34 EDT
Description of problem:
The exception was quite unclear at the beginning as it said "Could not find exception handler for org.drools.WorkItemHandlerNotFoundException while executing node 3". From the System.err I found out that "Could not find work item handler for Send Task" was the root. The trick is there was no human task nor anything else that would require work item handler. However as I found out later there is a static code in message end event that executes work item.
I expected sending the messages to work the similar way as receiving them - via ksession.signalEvent().
Furthermore the workItem created always has name "Send Task" which causes confusion as I would expect it to have messageRef as a name.

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

How reproducible:
Every time

Steps to Reproduce:
1. start 'BPMN2-MessageEndEvent.bpmn2' process without setting the WorkItem handler
  
Actual results:
java.lang.IllegalArgumentException: Could not find exception handler for org.drools.WorkItemHandlerNotFoundException while executing node 3

Expected results:
More clear exception, ideally none

Additional info: static code in EndNode action generated from EndEventHandler (lines 152-157)

org.drools.process.instance.impl.WorkItemImpl workItem = new org.drools.process.instance.impl.WorkItemImpl();
workItem.setName("Send Task");
workItem.setParameter("MessageType", "java.lang.Object");
((org.drools.process.instance.WorkItemManager) kcontext.getKnowledgeRuntime().getWorkItemManager()).internalExecuteWorkItem(workItem);
Comment 1 Maciej Swiderski 2012-04-18 03:47:50 EDT
Improved exception will be added with following pull request https://github.com/droolsjbpm/jbpm/pull/82

In my opinion work item based solution is required to be able to provide flexible and pluggable way of handling messaging in and out of the engine so users could decide how the message will be transmitted to the destination. And signal is more for communication inside the engine.

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