JBPM 5
aminmc Dec 17, 2010 1:28 PMHi
I am trying to build a prototype application using JBPM 5 however I am struggling to implement my usecase. Is there any documentation which explains some of the core concepts of how to use the BPMN 2 notations? I have tried developing on the examples provided in the test source directory however i seem to get the strange behaviour. The following shows the issues i'm having:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<definitions
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:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"
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 structureRef="InputData"/>
<itemDefinition structureRef="OutputData"/>
<message itemRef="_aBreak"/>
<interface>
<operation>
<inMessageRef>_aBreakInput</inMessageRef>
</operation>
</interface>
<process processType="Private" isExecutable="true"
>
<property itemSubjectRef="_aBreak"/>
<property itemSubjectRef="_workItem"/>
<startEvent/>
<scriptTask>
<script><![CDATA[
System.out.println("Received new break with account number "+ break.getAccountNumber() + " and description " + break.getDescription());
]]>
</script>
</scriptTask>
<serviceTask operationRef="breakToWorkItem" implementation="Other">
<ioSpecification>
<dataInput/>
<dataOutput/>
<inputSet>
<dataInputRefs>breakInputParam</dataInputRefs>
</inputSet>
<outputSet>
<dataOutputRefs>workItemResult</dataOutputRefs>
</outputSet>
</ioSpecification>
<dataInputAssociation>
<sourceRef>break</sourceRef>
<targetRef>breakInputParam</targetRef>
</dataInputAssociation>
<dataOutputAssociation>
<sourceRef>workItemResult</sourceRef>
<targetRef>workItem</targetRef>
</dataOutputAssociation>
</serviceTask>
<endEvent />
<intermediateCatchEvent>
<signalEventDefinition signalRef="MyMessage"/>
</intermediateCatchEvent>
<scriptTask>
<script>
<![CDATA[
System.out.println(workItem);
]]>
</script>
</scriptTask>
<endEvent>
<terminateEventDefinition/>
</endEvent>
<sequenceFlow sourceRef="_1" targetRef="_2"/>
<sequenceFlow sourceRef="_2" targetRef="_3"/>
<sequenceFlow sourceRef="_3" targetRef="_4"/>
<sequenceFlow sourceRef="_5" targetRef="_6"/>
<sequenceFlow sourceRef="_6" targetRef="_7"/>
</process>
</definitions>
{code}
As I would expect that the process instance should not complete until there is an event signalled in signalEventDefinition signalRef="MyMessage". I would expect that only when I do a session.signalEvent(...) with the MyMessage then the process will complete based on the sequence flow and as I've seen in the example. However not matter what my process completes without signalling the event. Can some please provide some advice. I have been looking at this for 3 days now.....
Any help would be appreciated.
Thanks
Amin