<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" xmlns:camunda="http://activiti.org/bpmn">
  <bpmn:process id="Process_1" isExecutable="false">
    <bpmn:startEvent id="StartEvent_1" name="Start">
      <bpmn:extensionElements>
        <camunda:executionListener event="start">
          <camunda:script scriptFormat="groovy">${sourceCode}</camunda:script>
        </camunda:executionListener>
      </bpmn:extensionElements>
      <bpmn:outgoing>SequenceFlow_1</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:serviceTask id="ServiceTask_1" name="ServiceTask_1">
      <bpmn:incoming>SequenceFlow_1</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_2</bpmn:outgoing>
      <bpmn:outgoing>SequenceFlow_3</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sequenceFlow id="SequenceFlow_1" sourceRef="StartEvent_1" targetRef="ServiceTask_1" />
    <bpmn:endEvent id="EndEvent_1" name="End_1">
      <bpmn:incoming>SequenceFlow_5</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="SequenceFlow_2" sourceRef="ServiceTask_1" targetRef="ScriptTask_1">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${foo.id()}]]></bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:scriptTask id="ScriptTask_1" name="ScriptTask_1" scriptFormat="groovy">
      <script>
        printf('hello world')
      </script>
      <bpmn:incoming>SequenceFlow_3</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_4</bpmn:outgoing>
    </bpmn:scriptTask>
    <bpmn:sequenceFlow id="SequenceFlow_3" sourceRef="ServiceTask_1" targetRef="ScriptTask_Resource" />
    <bpmn:endEvent id="EndEvent_2" name="End_2">
      <bpmn:incoming>SequenceFlow_4</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="SequenceFlow_4" sourceRef="ScriptTask_Resource" targetRef="EndEvent_2">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="groovy"><![CDATA[status == 'complete']]></bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:scriptTask id="ScriptTask_Resource" name="ScriptTask_Resource" scriptFormat="dmn" 
      camunda:resource="org/camunda/bpm/DmnScriptTaskTest.dmn10.xml" camunda:resultVariable="decisionResult">
      <bpmn:incoming>SequenceFlow_2</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_5</bpmn:outgoing>
    </bpmn:scriptTask>
    <bpmn:sequenceFlow id="SequenceFlow_5" sourceRef="ScriptTask_Resource" targetRef="EndEvent_1">
        <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="groovy" camunda:resource="org/camunda/bpm/condition.groovy" />
    </bpmn:sequenceFlow>
    <bpmn:scriptTask id="ScriptTask_Empty" name="ScriptTask_Empty" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="249" y="296" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="222" y="332" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ServiceTask_1_di" bpmnElement="ServiceTask_1">
        <dc:Bounds x="345" y="274" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1_di" bpmnElement="SequenceFlow_1">
        <di:waypoint xsi:type="dc:Point" x="285" y="314" />
        <di:waypoint xsi:type="dc:Point" x="345" y="314" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="270" y="304" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="EndEvent_1_di" bpmnElement="EndEvent_1">
        <dc:Bounds x="674" y="254" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="647" y="290" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_2_di" bpmnElement="SequenceFlow_2">
        <di:waypoint xsi:type="dc:Point" x="445" y="294" />
        <di:waypoint xsi:type="dc:Point" x="497" y="294" />
        <di:waypoint xsi:type="dc:Point" x="497" y="272" />
        <di:waypoint xsi:type="dc:Point" x="545" y="272" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="476" y="282" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ScriptTask_1_di" bpmnElement="ScriptTask_1">
        <dc:Bounds x="545" y="331" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_3_di" bpmnElement="SequenceFlow_3">
        <di:waypoint xsi:type="dc:Point" x="445" y="329" />
        <di:waypoint xsi:type="dc:Point" x="495" y="329" />
        <di:waypoint xsi:type="dc:Point" x="495" y="371" />
        <di:waypoint xsi:type="dc:Point" x="545" y="371" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="428" y="353.5" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="EndEvent_2_di" bpmnElement="EndEvent_2">
        <dc:Bounds x="674" y="353" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="647" y="389" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_4_di" bpmnElement="SequenceFlow_4">
        <di:waypoint xsi:type="dc:Point" x="645" y="371" />
        <di:waypoint xsi:type="dc:Point" x="674" y="371" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="597" y="403" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ScriptTask_Resource_di" bpmnElement="ScriptTask_Resource">
        <dc:Bounds x="545" y="232" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ScriptTask_Empty_di" bpmnElement="ScriptTask_Empty">
        <dc:Bounds x="80" y="280" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_5_di" bpmnElement="SequenceFlow_5">
        <di:waypoint xsi:type="dc:Point" x="645" y="272" />
        <di:waypoint xsi:type="dc:Point" x="674" y="272" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="660" y="262" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
