Kai Gebhardt [
https://community.jboss.org/people/kg86] created the discussion
"Process in Eclipse Designer with two Script Tasks"
To view the discussion, visit:
https://community.jboss.org/message/717907#717907
--------------------------------------------------------------
Hi,
I tried to create a process in the eclipse designer. I created a global process variable
'anzahl' as Integer. Then I created two script tasks. The first set
'anzahl' as 20. The second print the value of 'anzahl'.
But the result is 'null' and not '20' as I expected. Here is my XML Code
of process:
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="Definition"
targetNamespace="
http://www.jboss.org/drools
http://www.jboss.org/drools"
typeLanguage="
http://www.java.com/javaTypes
http://www.java.com/javaTypes"
expressionLanguage="
http://www.mvel.org/2.0
http://www.mvel.org/2.0"
xmlns="
http://www.omg.org/spec/BPMN/20100524/MODEL
http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.omg.org/spec/BPMN/20100524/MODEL
http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"
xmlns:g="
http://www.jboss.org/drools/flow/gpd
http://www.jboss.org/drools/flow/gpd"
xmlns:bpmndi="
http://www.omg.org/spec/BPMN/20100524/DI
http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="
http://www.omg.org/spec/DD/20100524/DC
http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="
http://www.omg.org/spec/DD/20100524/DI
http://www.omg.org/spec/DD/20100524/DI"
xmlns:tns="
http://www.jboss.org/drools
http://www.jboss.org/drools">
<itemDefinition id="_anzahlItem" structureRef="Integer" />
<process processType="Private" isExecutable="true"
id="com.sample.bpmn.anzahl" name="Anzahltest" >
<!-- process variables -->
<property id="anzahl" itemSubjectRef="_anzahlItem"/>
<!-- nodes -->
<startEvent id="_1" name="StartProcess" />
<endEvent id="_3" name="EndProcess" >
<terminateEventDefinition/>
</endEvent>
<scriptTask id="_5" name="Anzahl ausgeben" scriptFormat="
http://www.java.com/java http://www.java.com/java" >
<script>System.out.println(anzahl);</script>
</scriptTask>
<scriptTask id="_6" name="Anzahl 20" scriptFormat="
http://www.java.com/java http://www.java.com/java" >
<script>anzahl= 20;</script>
</scriptTask>
<!-- connections -->
<sequenceFlow id="_5-_3" sourceRef="_5"
targetRef="_3" />
<sequenceFlow id="_6-_5" sourceRef="_6"
targetRef="_5" />
<sequenceFlow id="_1-_6" sourceRef="_1"
targetRef="_6" />
</process>
<bpmndi:BPMNDiagram>
<bpmndi:BPMNPlane bpmnElement="com.sample.bpmn.anzahl" >
<bpmndi:BPMNShape bpmnElement="_1" >
<dc:Bounds x="16" y="16" width="48"
height="48" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="_3" >
<dc:Bounds x="382" y="17" width="48"
height="48" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="_5" >
<dc:Bounds x="222" y="15" width="125"
height="48" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="_6" >
<dc:Bounds x="100" y="15" width="80"
height="48" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="_5-_3" >
<di:waypoint x="284" y="39" />
<di:waypoint x="406" y="41" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_6-_5" >
<di:waypoint x="140" y="39" />
<di:waypoint x="284" y="39" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_1-_6" >
<di:waypoint x="40" y="40" />
<di:waypoint x="140" y="39" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
Have I made some mistakes?
Thanks a lot!
Cu Kai
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/717907#717907]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]