[jboss-user] [jBPM] - registerWorkItemHandler workItemName
Tobias Wittur
do-not-reply at jboss.com
Fri Aug 19 06:25:00 EDT 2011
Tobias Wittur [http://community.jboss.org/people/tob1as] created the discussion
"registerWorkItemHandler workItemName"
To view the discussion, visit: http://community.jboss.org/message/621803#621803
--------------------------------------------------------------
Hello,
I was wondering if the workItemName in - *registerWorkItemHandler*( http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true String workItemName, http://docs.jboss.org/jbpm/v5.1/javadocs/org/drools/runtime/process/WorkItemHandler.html WorkItemHandler handler) in public interface *WorkItemManager* can receive any workItemName.
E.g. I created a standard service task and tried to register my own handler:
ksession.getWorkItemManager().registerWorkItemHandler("Test", new MyOwnServiceHandler());
and I get:
Caused by: org.drools.WorkItemHandlerNotFoundException: Could not find work item handler for *Service Task*
If I write this, it works: ksession.getWorkItemManager().registerWorkItemHandler("Service Task", new MyOwnServiceHandler());
Where exactly is the Service Node linked to Service Task? Shouldn't there be something in the XML?
<itemDefinition id="_2_InMessageType" structureRef="java.lang.String" />
<message id="_2_InMessage" itemRef="_2_InMessageType" />
<interface id="_2_ServiceInterface" name="com.sample.loyaltyManagementHelloService">
<operation id="_2_ServiceOperation" name="hello">
<inMessageRef>_2_InMessage</inMessageRef>
</operation>
</interface>
<serviceTask id="_3" name="Hello" operationRef="_2_ServiceOperation" implementation="Other" >
<ioSpecification>
<dataInput id="_2_param" name="Parameter" />
<dataOutput id="_2_result" name="Result" />
<inputSet>
<dataInputRefs>_2_param</dataInputRefs>
</inputSet>
<outputSet>
<dataOutputRefs>_2_result</dataOutputRefs>
</outputSet>
</ioSpecification>
<dataInputAssociation>
<sourceRef>x</sourceRef>
<targetRef>_2_param</targetRef>
</dataInputAssociation>
<dataOutputAssociation>
<sourceRef>_2_result</sourceRef>
<targetRef>x</targetRef>
</dataOutputAssociation>
</serviceTask>
Best regards,
Tobias
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/621803#621803]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110819/ec852bdf/attachment-0001.html
More information about the jboss-user
mailing list