<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions 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:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1wity2o" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.40.1" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.8.0">
  <bpmn:process id="Script_connector_id" name="Script connector" isExecutable="true">
    <bpmn:startEvent id="Start_id" name="Start">
      <bpmn:extensionElements>
        <zeebe:ioMapping>
          <zeebe:output source="=1" target="a" />
          <zeebe:output source="=1" target="b" />
        </zeebe:ioMapping>
        <zeebe:executionListeners>
          <zeebe:executionListener eventType="end" type="initialization" />
        </zeebe:executionListeners>
      </bpmn:extensionElements>
      <bpmn:outgoing>Flow_1k1v3hv</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_1k1v3hv" sourceRef="Start_id" targetRef="Example_of_script_connector_id" />
    <bpmn:endEvent id="End_id" name="End">
      <bpmn:extensionElements />
      <bpmn:incoming>Flow_01v8nn7</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_01v8nn7" sourceRef="Example_of_script_connector_id" targetRef="End_id" />
    <bpmn:serviceTask id="Example_of_script_connector_id" name="Example of script connector" zeebe:modelerTemplate="io.camunda.community:script-connector" zeebe:modelerTemplateVersion="1">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="io.camunda.community:script-connector:1" retries="3" />
        <zeebe:taskHeaders>
          <zeebe:header key="elementTemplateVersion" value="1" />
          <zeebe:header key="elementTemplateId" value="io.camunda.community:script-connector" />
          <zeebe:header key="resultVariable" value="c" />
          <zeebe:header key="retryBackoff" value="PT0S" />
        </zeebe:taskHeaders>
        <zeebe:ioMapping>
          <zeebe:input source="embedded" target="script.type" />
          <zeebe:input source="(function() {const z = x + y + w; return z;})();" target="script.embedded" />
          <zeebe:input source="javascript" target="script.language" />
          <zeebe:input source="={x: a, y: b, w: 1}" target="context" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1k1v3hv</bpmn:incoming>
      <bpmn:outgoing>Flow_01v8nn7</bpmn:outgoing>
    </bpmn:serviceTask>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Script_connector_id">
      <bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="Start_id">
        <dc:Bounds x="182" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="188" y="145" width="24" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1s3vyw0_di" bpmnElement="End_id">
        <dc:Bounds x="422" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="430" y="145" width="20" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_14zqvox_di" bpmnElement="Example_of_script_connector_id">
        <dc:Bounds x="270" y="80" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1k1v3hv_di" bpmnElement="Flow_1k1v3hv">
        <di:waypoint x="218" y="120" />
        <di:waypoint x="270" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_01v8nn7_di" bpmnElement="Flow_01v8nn7">
        <di:waypoint x="370" y="120" />
        <di:waypoint x="422" y="120" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
