<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" 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:camunda="http://camunda.org/schema/1.0/bpmn" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
  <bpmn2:collaboration id="Collaboration_1wyskvn">
    <bpmn2:participant id="Participant_0h30cr9" processRef="Process_1" />
  </bpmn2:collaboration>
  <bpmn2:process id="Process_1" isExecutable="false">
    <bpmn2:startEvent id="StartEvent_1" name="Start">
      <bpmn2:extensionElements>
        <camunda:executionListener event="start">
          <camunda:script scriptFormat="JavaScript">console.log(this.token.execution.appDelegate.sendEmail("ME","msg","body"));
            console.log("Start Event start",data);</camunda:script>
        </camunda:executionListener>
      </bpmn2:extensionElements>
      <bpmn2:outgoing>Flow_0u58jdx</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:sequenceFlow id="Flow_0u58jdx" sourceRef="StartEvent_1" targetRef="Activity_0mdkke6" />
    <bpmn2:sequenceFlow id="Flow_0y5vzx6" sourceRef="Activity_0mdkke6" targetRef="Event_1vehlkg" />
    <bpmn2:endEvent id="Event_1vehlkg" name="End">
      <bpmn2:extensionElements>
        <camunda:executionListener event="start">
          <camunda:script scriptFormat="JavaScript">output.result=data.var3;</camunda:script>
        </camunda:executionListener>
      </bpmn2:extensionElements>
      <bpmn2:incoming>Flow_0y5vzx6</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:scriptTask id="Activity_0mdkke6" name="Script" scriptFormat="JavaScript">
      <bpmn2:incoming>Flow_0u58jdx</bpmn2:incoming>
      <bpmn2:outgoing>Flow_0y5vzx6</bpmn2:outgoing>
      <bpmn2:script>data.var3=data.input1+data.input2;
console.log("Simple-Script", data);</bpmn2:script>
    </bpmn2:scriptTask>
  </bpmn2:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1wyskvn">
      <bpmndi:BPMNShape id="Participant_0h30cr9_di" bpmnElement="Participant_0h30cr9" isHorizontal="true">
        <dc:Bounds x="180" y="70" width="600" height="250" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_0y5vzx6_di" bpmnElement="Flow_0y5vzx6">
        <di:waypoint x="420" y="190" />
        <di:waypoint x="462" y="190" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0u58jdx_di" bpmnElement="Flow_0u58jdx">
        <di:waypoint x="278" y="190" />
        <di:waypoint x="320" y="190" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="242" y="172" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="248" y="215" width="25" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1vehlkg_di" bpmnElement="Event_1vehlkg">
        <dc:Bounds x="462" y="172" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="470" y="215" width="20" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0i3iypy_di" bpmnElement="Activity_0mdkke6">
        <dc:Bounds x="320" y="150" width="100" height="80" />
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>
