<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="@bpmnkit/core" exporterVersion="0.0.23" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.9.0">
  <bpmn:process id="employee-onboarding" name="Employee Onboarding" isExecutable="true">
    <bpmn:extensionElements>
      <zeebe:versionTag value="1.0.0"/>
    </bpmn:extensionElements>
    <bpmn:startEvent id="contract-signed" name="Contract signed">
      <bpmn:outgoing>Flow_contract-signed_create-hr-record</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:serviceTask id="create-hr-record" name="Create HR record">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="hris-employee-create"/>
        <zeebe:ioMapping>
          <zeebe:output source="=employeeId" target="employeeId"/>
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_contract-signed_create-hr-record</bpmn:incoming>
      <bpmn:outgoing>Flow_create-hr-record_provision</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:parallelGateway id="provision">
      <bpmn:incoming>Flow_create-hr-record_provision</bpmn:incoming>
      <bpmn:outgoing>Flow_provision_provision-accounts</bpmn:outgoing>
      <bpmn:outgoing>Flow_provision_order-equipment</bpmn:outgoing>
      <bpmn:outgoing>Flow_provision_enrol-payroll</bpmn:outgoing>
    </bpmn:parallelGateway>
    <bpmn:serviceTask id="provision-accounts" name="Provision accounts">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="identity-provision"/>
        <zeebe:ioMapping>
          <zeebe:output source="=email" target="workEmail"/>
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_provision_provision-accounts</bpmn:incoming>
      <bpmn:outgoing>Flow_provision-accounts_provisioned</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="order-equipment" name="Order equipment">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="equipment-order"/>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_provision_order-equipment</bpmn:incoming>
      <bpmn:outgoing>Flow_order-equipment_provisioned</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="enrol-payroll" name="Enrol in payroll">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="payroll-enrol"/>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_provision_enrol-payroll</bpmn:incoming>
      <bpmn:outgoing>Flow_enrol-payroll_provisioned</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:parallelGateway id="provisioned">
      <bpmn:incoming>Flow_provision-accounts_provisioned</bpmn:incoming>
      <bpmn:incoming>Flow_order-equipment_provisioned</bpmn:incoming>
      <bpmn:incoming>Flow_enrol-payroll_provisioned</bpmn:incoming>
      <bpmn:outgoing>Flow_provisioned_send-welcome</bpmn:outgoing>
    </bpmn:parallelGateway>
    <bpmn:serviceTask id="send-welcome" name="Send welcome email">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="email-send"/>
        <zeebe:taskHeaders>
          <zeebe:header key="template" value="welcome"/>
        </zeebe:taskHeaders>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_provisioned_send-welcome</bpmn:incoming>
      <bpmn:outgoing>Flow_send-welcome_role-extras</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:inclusiveGateway id="role-extras" name="Role-specific steps" default="Flow_role-extras_send-welcome-pack">
      <bpmn:incoming>Flow_send-welcome_role-extras</bpmn:incoming>
      <bpmn:outgoing>Flow_role-extras_grant-dev-tools</bpmn:outgoing>
      <bpmn:outgoing>Flow_role-extras_enrol-leadership</bpmn:outgoing>
      <bpmn:outgoing>Flow_role-extras_send-welcome-pack</bpmn:outgoing>
    </bpmn:inclusiveGateway>
    <bpmn:serviceTask id="grant-dev-tools" name="Grant developer tooling">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="devtools-grant"/>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_role-extras_grant-dev-tools</bpmn:incoming>
      <bpmn:outgoing>Flow_grant-dev-tools_dev-ready</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="dev-ready" name="Developer set up">
      <bpmn:incoming>Flow_grant-dev-tools_dev-ready</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:serviceTask id="enrol-leadership" name="Enrol in leadership programme">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="training-enrol"/>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_role-extras_enrol-leadership</bpmn:incoming>
      <bpmn:outgoing>Flow_enrol-leadership_manager-ready</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="manager-ready" name="Manager enrolled">
      <bpmn:incoming>Flow_enrol-leadership_manager-ready</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:serviceTask id="send-welcome-pack" name="Send welcome pack">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="welcome-pack-send"/>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_role-extras_send-welcome-pack</bpmn:incoming>
      <bpmn:outgoing>Flow_send-welcome-pack_onboarded</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="onboarded" name="Onboarded">
      <bpmn:incoming>Flow_send-welcome-pack_onboarded</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_contract-signed_create-hr-record" sourceRef="contract-signed" targetRef="create-hr-record"/>
    <bpmn:sequenceFlow id="Flow_create-hr-record_provision" sourceRef="create-hr-record" targetRef="provision"/>
    <bpmn:sequenceFlow id="Flow_provision_provision-accounts" sourceRef="provision" targetRef="provision-accounts" name="accounts"/>
    <bpmn:sequenceFlow id="Flow_provision_order-equipment" sourceRef="provision" targetRef="order-equipment" name="equipment"/>
    <bpmn:sequenceFlow id="Flow_provision_enrol-payroll" sourceRef="provision" targetRef="enrol-payroll" name="payroll"/>
    <bpmn:sequenceFlow id="Flow_provision-accounts_provisioned" sourceRef="provision-accounts" targetRef="provisioned"/>
    <bpmn:sequenceFlow id="Flow_order-equipment_provisioned" sourceRef="order-equipment" targetRef="provisioned"/>
    <bpmn:sequenceFlow id="Flow_enrol-payroll_provisioned" sourceRef="enrol-payroll" targetRef="provisioned"/>
    <bpmn:sequenceFlow id="Flow_provisioned_send-welcome" sourceRef="provisioned" targetRef="send-welcome"/>
    <bpmn:sequenceFlow id="Flow_send-welcome_role-extras" sourceRef="send-welcome" targetRef="role-extras"/>
    <bpmn:sequenceFlow id="Flow_role-extras_grant-dev-tools" sourceRef="role-extras" targetRef="grant-dev-tools" name="engineering">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=department = "engineering"</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_grant-dev-tools_dev-ready" sourceRef="grant-dev-tools" targetRef="dev-ready"/>
    <bpmn:sequenceFlow id="Flow_role-extras_enrol-leadership" sourceRef="role-extras" targetRef="enrol-leadership" name="manager">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=isManager</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_enrol-leadership_manager-ready" sourceRef="enrol-leadership" targetRef="manager-ready"/>
    <bpmn:sequenceFlow id="Flow_role-extras_send-welcome-pack" sourceRef="role-extras" targetRef="send-welcome-pack" name="standard"/>
    <bpmn:sequenceFlow id="Flow_send-welcome-pack_onboarded" sourceRef="send-welcome-pack" targetRef="onboarded"/>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="employee-onboarding_di">
    <bpmndi:BPMNPlane id="employee-onboarding_di_plane" bpmnElement="employee-onboarding">
      <bpmndi:BPMNShape id="contract-signed_di" bpmnElement="contract-signed">
        <dc:Bounds x="55" y="202" width="36" height="36"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="20" y="242" width="105" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="create-hr-record_di" bpmnElement="create-hr-record">
        <dc:Bounds x="191" y="180" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="provision_di" bpmnElement="provision">
        <dc:Bounds x="391" y="195" width="50" height="50"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="provision-accounts_di" bpmnElement="provision-accounts">
        <dc:Bounds x="541" y="180" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="order-equipment_di" bpmnElement="order-equipment">
        <dc:Bounds x="541" y="340" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="enrol-payroll_di" bpmnElement="enrol-payroll">
        <dc:Bounds x="541" y="20" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="provisioned_di" bpmnElement="provisioned">
        <dc:Bounds x="741" y="195" width="50" height="50"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="send-welcome_di" bpmnElement="send-welcome">
        <dc:Bounds x="891" y="180" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="role-extras_di" bpmnElement="role-extras">
        <dc:Bounds x="1091" y="195" width="50" height="50"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1049" y="249" width="133" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="grant-dev-tools_di" bpmnElement="grant-dev-tools">
        <dc:Bounds x="1241" y="340" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="dev-ready_di" bpmnElement="dev-ready">
        <dc:Bounds x="1441" y="362" width="36" height="36"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1403" y="402" width="112" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="enrol-leadership_di" bpmnElement="enrol-leadership">
        <dc:Bounds x="1241" y="20" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="manager-ready_di" bpmnElement="manager-ready">
        <dc:Bounds x="1441" y="42" width="36" height="36"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1403" y="82" width="112" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="send-welcome-pack_di" bpmnElement="send-welcome-pack">
        <dc:Bounds x="1241" y="180" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="onboarded_di" bpmnElement="onboarded">
        <dc:Bounds x="1441" y="202" width="36" height="36"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1427" y="242" width="63" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_contract-signed_create-hr-record_di" bpmnElement="Flow_contract-signed_create-hr-record">
        <di:waypoint x="91" y="220"/>
        <di:waypoint x="191" y="220"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_create-hr-record_provision_di" bpmnElement="Flow_create-hr-record_provision">
        <di:waypoint x="291" y="220"/>
        <di:waypoint x="391" y="220"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_provision_provision-accounts_di" bpmnElement="Flow_provision_provision-accounts">
        <di:waypoint x="441" y="220"/>
        <di:waypoint x="541" y="220"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="463" y="196" width="56" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_provision_order-equipment_di" bpmnElement="Flow_provision_order-equipment">
        <di:waypoint x="416" y="245"/>
        <di:waypoint x="416" y="380"/>
        <di:waypoint x="541" y="380"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="392" y="306" width="63" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_provision_enrol-payroll_di" bpmnElement="Flow_provision_enrol-payroll">
        <di:waypoint x="416" y="195"/>
        <di:waypoint x="416" y="60"/>
        <di:waypoint x="541" y="60"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="392" y="121" width="49" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_provision-accounts_provisioned_di" bpmnElement="Flow_provision-accounts_provisioned">
        <di:waypoint x="641" y="220"/>
        <di:waypoint x="741" y="220"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_order-equipment_provisioned_di" bpmnElement="Flow_order-equipment_provisioned">
        <di:waypoint x="591" y="340"/>
        <di:waypoint x="591" y="300"/>
        <di:waypoint x="766" y="300"/>
        <di:waypoint x="766" y="245"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_enrol-payroll_provisioned_di" bpmnElement="Flow_enrol-payroll_provisioned">
        <di:waypoint x="591" y="100"/>
        <di:waypoint x="591" y="140"/>
        <di:waypoint x="766" y="140"/>
        <di:waypoint x="766" y="195"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_provisioned_send-welcome_di" bpmnElement="Flow_provisioned_send-welcome">
        <di:waypoint x="791" y="220"/>
        <di:waypoint x="891" y="220"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_send-welcome_role-extras_di" bpmnElement="Flow_send-welcome_role-extras">
        <di:waypoint x="991" y="220"/>
        <di:waypoint x="1091" y="220"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_role-extras_grant-dev-tools_di" bpmnElement="Flow_role-extras_grant-dev-tools">
        <di:waypoint x="1116" y="245"/>
        <di:waypoint x="1116" y="380"/>
        <di:waypoint x="1241" y="380"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1092" y="306" width="77" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_grant-dev-tools_dev-ready_di" bpmnElement="Flow_grant-dev-tools_dev-ready">
        <di:waypoint x="1341" y="380"/>
        <di:waypoint x="1441" y="380"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_role-extras_enrol-leadership_di" bpmnElement="Flow_role-extras_enrol-leadership">
        <di:waypoint x="1116" y="195"/>
        <di:waypoint x="1116" y="60"/>
        <di:waypoint x="1241" y="60"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1092" y="121" width="49" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_enrol-leadership_manager-ready_di" bpmnElement="Flow_enrol-leadership_manager-ready">
        <di:waypoint x="1341" y="60"/>
        <di:waypoint x="1441" y="60"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_role-extras_send-welcome-pack_di" bpmnElement="Flow_role-extras_send-welcome-pack">
        <di:waypoint x="1141" y="220"/>
        <di:waypoint x="1241" y="220"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1163" y="196" width="56" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_send-welcome-pack_onboarded_di" bpmnElement="Flow_send-welcome-pack_onboarded">
        <di:waypoint x="1341" y="220"/>
        <di:waypoint x="1441" y="220"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

