<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="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="Definitions_0fqpje6" targetNamespace="http://bpmn.io/schema/bpmn" exporter="bpmn-js (https://demo.bpmn.io)" exporterVersion="7.2.0">
  <bpmn:collaboration id="Collaboration_0q44ppb">
    <bpmn:participant id="Participant_0zpon3h" processRef="Process_1so81jg" />
  </bpmn:collaboration>
  <bpmn:process id="Process_1so81jg" isExecutable="false">
    <bpmn:startEvent id="start">
      <bpmn:extensionElements>
        <camunda:executionListener event="start">
          <camunda:script scriptFormat="JavaScript">console.log("This is the start event");
          this.token.appendData({records:[1,2,3,4,5]});
          console.log('=====from script',this.token.data);
          this.log("====This is the start event");</camunda:script>
        </camunda:executionListener>
      </bpmn:extensionElements>
      <bpmn:outgoing>Flow_18xinq3</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_18xinq3" sourceRef="start" targetRef="sub" />
    <bpmn:subProcess id="sub">
      <bpmn:incoming>Flow_18xinq3</bpmn:incoming>
      <bpmn:outgoing>Flow_15aym3t</bpmn:outgoing>
      <bpmn:multiInstanceLoopCharacteristics camunda:collection="[1,2,3]" />
      <bpmn:startEvent id="sub-start">
        <bpmn:outgoing>Flow_09jx33a</bpmn:outgoing>
      </bpmn:startEvent>
      <bpmn:sequenceFlow id="Flow_09jx33a" sourceRef="sub-start" targetRef="sub-script" />
      <bpmn:endEvent id="sub-end">
        <bpmn:incoming>Flow_11vm03q</bpmn:incoming>
      </bpmn:endEvent>
      <bpmn:sequenceFlow id="Flow_0yr8zl8" sourceRef="sub-script" targetRef="Event_0al22mg" />
      <bpmn:scriptTask id="sub-script" name="script">
        <bpmn:incoming>Flow_09jx33a</bpmn:incoming>
        <bpmn:outgoing>Flow_0yr8zl8</bpmn:outgoing>
      </bpmn:scriptTask>
      <bpmn:sequenceFlow id="Flow_11vm03q" sourceRef="Event_0al22mg" targetRef="sub-end" />
      <bpmn:intermediateCatchEvent id="Event_0al22mg">
        <bpmn:incoming>Flow_0yr8zl8</bpmn:incoming>
        <bpmn:outgoing>Flow_11vm03q</bpmn:outgoing>
        <bpmn:timerEventDefinition id="TimerEventDefinition_1tnq9nn">
          <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT1S</bpmn:timeDuration>
        </bpmn:timerEventDefinition>
      </bpmn:intermediateCatchEvent>
    </bpmn:subProcess>
    <bpmn:endEvent id="end">
      <bpmn:incoming>Flow_15aym3t</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_15aym3t" sourceRef="sub" targetRef="end" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_0q44ppb">
      <bpmndi:BPMNShape id="Participant_0zpon3h_di" bpmnElement="Participant_0zpon3h" isHorizontal="true">
        <dc:Bounds x="180" y="0" width="664" height="510" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_15aym3t_di" bpmnElement="Flow_15aym3t">
        <di:waypoint x="670" y="150" />
        <di:waypoint x="742" y="150" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_18xinq3_di" bpmnElement="Flow_18xinq3">
        <di:waypoint x="268" y="183" />
        <di:waypoint x="320" y="183" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="212" y="129" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="start">
        <dc:Bounds x="232" y="165" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="181" y="172" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0ej3q6j_di" bpmnElement="sub" isExpanded="true">
        <dc:Bounds x="320" y="60" width="350" height="200" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_11vm03q_di" bpmnElement="Flow_11vm03q">
        <di:waypoint x="564" y="160" />
        <di:waypoint x="598" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0yr8zl8_di" bpmnElement="Flow_0yr8zl8">
        <di:waypoint x="506" y="160" />
        <di:waypoint x="528" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_09jx33a_di" bpmnElement="Flow_09jx33a">
        <di:waypoint x="384" y="160" />
        <di:waypoint x="406" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Event_0an0xl3_di" bpmnElement="sub-start">
        <dc:Bounds x="348" y="142" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1j62ljq_di" bpmnElement="sub-end">
        <dc:Bounds x="598" y="142" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_08mjzw4_di" bpmnElement="sub-script">
        <dc:Bounds x="406" y="120" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1tv5sjw_di" bpmnElement="Event_0al22mg">
        <dc:Bounds x="528" y="142" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0bf16wv_di" bpmnElement="end">
        <dc:Bounds x="742" y="132" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="545" y="172" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
