Bug 804054 - MessageEndEvent causes an exception
Summary: MessageEndEvent causes an exception
Keywords:
Status: NEW
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: ---
: ---
Assignee: Kris Verlaenen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-16 12:28 UTC by Tomas Schlosser
Modified: 2023-05-31 22:24 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomas Schlosser 2012-03-16 12:28:34 UTC
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 07:47:50 UTC
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.