Tobias Wittur [
http://community.jboss.org/people/tob1as] created the discussion
"Re: registerWorkItemHandler workItemName"
To view the discussion, visit:
http://community.jboss.org/message/622283#622283
--------------------------------------------------------------
@Esteban
Thanks Esteban, I already copied the ServiceTaskHandler class and invoked my own java
class with it, similar to the HelloProcess Example. So this works.
The interface was a bit hidden, but already defined in the example above:
<bpmn2:interface id="_2_ServiceInterface"
name="org.jbpm.examples.junit.HelloService">
<bpmn2:operation id="_2_ServiceOperation" name="hello"/>
</bpmn2:interface>
I am successfully invoking a webservice with it and transfering json data in my process.
So finally a feeling of success :)
@Tihomir
I never really had an issue with opening the xml from the BPMN Eclipse 2.0 Editor in Oryx
or vice versa. Oryx and the Eclipse BPMN 2.0 Editor work perfectly together and are in my
opinion also compliant with the BPMN 2.0 spec. My problem is solely the execution of an
Oryx generated xml code in eclipse with a processTest.java file.
I wrote the whole xml again by hand and now it works (The example below is a bit more
advance at this stage already). I think I will go on coding it by hand for now.
However, it would be nice if the example (working in oryx and eclipse editor plugin) that
I posted above would be executable. It is the same semantic structure as the xml below. So
it must be a syntax issue.
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="Definition"
targetNamespace="http://www.example.org/MinimalExample"
typeLanguage="http://www.java.com/javaTypes"
expressionLanguage="http://www.mvel.org/2.0"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL
BPMN20.xsd"
xmlns:g="http://www.jboss.org/drools/flow/gpd"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:tns="http://www.jboss.org/drools">
<itemDefinition id="xItemDef" />
<itemDefinition id="bItemDef" />
<itemDefinition id="StartProcessMessageType"
structureRef="java.lang.String" />
<itemDefinition id="requestBadgeMessageType"
structureRef="java.lang.Object" />
<itemDefinition id="requestLoyaltyStatusMessageType"
structureRef="java.lang.Object" />
<message id="StartProcessMessage"
itemRef="StartProcessMessageType" />
<message id="requestLoyaltyStatusMessage"
itemRef="requestLoyaltyStatusMessageType" />
<message id="requestBadgeMessage"
itemRef="requestBadgeMessageType" />
<interface id="requestLoyaltyStatusInterface"
name="loyaltyManagement2.requestLoyaltyStatus">
<operation id="requestLoyaltyStatusOperation" name="hello">
<inMessageRef>requestLoyaltyStatusMessage</inMessageRef>
</operation>
</interface>
<interface id="requestBadgeInterface"
name="loyaltyManagement2.requestBadge">
<operation id="requestBadgeOperation" name="hello">
<inMessageRef>requestBadgeMessage</inMessageRef>
</operation>
</interface>
<process processType="Private" id="ServiceProcess"
name="Service Process" isExecutable="true"
tns:packageName="com.sample" >
<property id="s" itemSubjectRef="xItemDef"/>
<property id="b" itemSubjectRef="bItemDef"/>
<!-- Start Event-->
<startEvent id="messageStartEvent" name="StartProcess" >
<dataOutput id="messageStartEventOutput" />
<dataOutputAssociation>
<sourceRef>messageStartEventOutput</sourceRef>
<targetRef>s</targetRef>
</dataOutputAssociation>
<outputSet>
<dataOutputRefs>messageStartEventOutput</dataOutputRefs>
</outputSet>
<messageEventDefinition messageRef="StartProcessMessage"/>
</startEvent>
<!-- Script Task-->
<scriptTask id="_2" name="Scipt Task - Value Printer" >
<script>System.out.println("s = " + s);</script>
</scriptTask>
<!-- Service Task -->
<serviceTask id="_4" name="requestLoyaltyStatus"
operationRef="requestLoyaltyStatusOperation" implementation="Other"
>
<ioSpecification>
<dataInput id="requestLoyaltyStatusParam" name="Parameter"
/>
<dataOutput id="requestLoyaltyStatusResult" name="Result"
/>
<inputSet>
<dataInputRefs>requestLoyaltyStatusParam</dataInputRefs>
</inputSet>
<outputSet>
<dataOutputRefs>requestLoyaltyStatusResult</dataOutputRefs>
</outputSet>
</ioSpecification>
<dataInputAssociation>
<sourceRef>s</sourceRef>
<targetRef>requestLoyaltyStatusParam</targetRef>
</dataInputAssociation>
<dataOutputAssociation>
<sourceRef>requestLoyaltyStatusResult</sourceRef>
<targetRef>s</targetRef>
</dataOutputAssociation>
</serviceTask>
<!-- Service Task -->
<serviceTask id="_5" name="requestBadge"
operationRef="requestBadgeOperation" implementation="Other" >
<ioSpecification>
<dataInput id="requestBadgeParam" name="Parameter" />
<dataOutput id="requestBadgeResult" name="Result" />
<inputSet>
<dataInputRefs>requestBadgeParam</dataInputRefs>
</inputSet>
<outputSet>
<dataOutputRefs>requestBadgeResult</dataOutputRefs>
</outputSet>
</ioSpecification>
<dataInputAssociation>
<sourceRef>s</sourceRef>
<targetRef>requestBadgeParam</targetRef>
</dataInputAssociation>
<dataOutputAssociation>
<sourceRef>requestBadgeResult</sourceRef>
<targetRef>b</targetRef>
</dataOutputAssociation>
</serviceTask>
<!-- Script Task-->
<scriptTask id="_6" name="Scipt Task - Value Printer" >
<script>System.out.println("b = " + b);</script>
</scriptTask>
<!-- End Event-->
<endEvent id="_3" name="EndProcess" >
<terminateEventDefinition/>
</endEvent>
<!-- Connections-->
<sequenceFlow id="messageStartEvent-_2"
sourceRef="messageStartEvent" targetRef="_2" />
<sequenceFlow id="_2-_4" sourceRef="_2"
targetRef="_4" />
<sequenceFlow id="_4-_5" sourceRef="_4"
targetRef="_5" />
<sequenceFlow id="_5-_6" sourceRef="_5"
targetRef="_6" />
<sequenceFlow id="_6-_3" sourceRef="_6"
targetRef="_3" />
</process>
</definitions>
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/622283#622283]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]