<?xml version="1.0" encoding="UTF-8"?>
<!-- Employee Onboarding Checklist (template onboarding-checklist).

     Started with: newHireName, department, startDate.

     Offer signed
       -> Start the three tracks      parallel split
            IT setup                  user task
            HR paperwork              user task
            Assign a buddy            user task; complete with buddy = their name
       -> All three done              parallel join: waits for every track
       -> Welcome on the first day    user task
       -> Onboarded -->
<definitions
  xmlns="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:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:zeebe="http://camunda.org/schema/zeebe/1.0"
  targetNamespace="http://priostack.com/templates"
  id="def_employee_onboarding">

  <process id="employee_onboarding" name="Employee Onboarding Checklist" isExecutable="true">
    <documentation>A new hire's onboarding in three tracks run at the same time (IT setup, HR paperwork and a buddy), and a first-day welcome once all three are done.</documentation>

    <startEvent id="offer_signed" name="Offer signed"/>

    <parallelGateway id="split_tracks" name="Start the three tracks"/>

    <userTask id="it_setup" name="IT setup">
      <documentation>A laptop, the accounts and the access the new hire needs, ready before the start date.</documentation>
    </userTask>

    <userTask id="hr_paperwork" name="HR paperwork">
      <documentation>The contract, payroll, and the documents the law asks for.</documentation>
    </userTask>

    <userTask id="assign_buddy" name="Assign a buddy">
      <documentation>Pick a colleague in the department to help in the first weeks. Complete with buddy = their name.</documentation>
    </userTask>

    <parallelGateway id="join_tracks" name="All three done"/>

    <userTask id="first_day" name="Welcome on the first day">
      <documentation>The manager meets the new hire with their buddy on the start date.</documentation>
    </userTask>

    <endEvent id="onboarded" name="Onboarded"/>

    <sequenceFlow id="f_offer" sourceRef="offer_signed" targetRef="split_tracks"/>
    <sequenceFlow id="f_it" sourceRef="split_tracks" targetRef="it_setup"/>
    <sequenceFlow id="f_hr" sourceRef="split_tracks" targetRef="hr_paperwork"/>
    <sequenceFlow id="f_buddy" sourceRef="split_tracks" targetRef="assign_buddy"/>
    <sequenceFlow id="f_it_done" sourceRef="it_setup" targetRef="join_tracks"/>
    <sequenceFlow id="f_hr_done" sourceRef="hr_paperwork" targetRef="join_tracks"/>
    <sequenceFlow id="f_buddy_done" sourceRef="assign_buddy" targetRef="join_tracks"/>
    <sequenceFlow id="f_all_done" sourceRef="join_tracks" targetRef="first_day"/>
    <sequenceFlow id="f_welcomed" sourceRef="first_day" targetRef="onboarded"/>
  </process>

  <bpmndi:BPMNDiagram id="diagram_employee_onboarding">
    <bpmndi:BPMNPlane id="plane_employee_onboarding" bpmnElement="employee_onboarding">
      <bpmndi:BPMNShape id="shape_offer_signed" bpmnElement="offer_signed">
        <dc:Bounds x="82" y="242" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_split_tracks" bpmnElement="split_tracks">
        <dc:Bounds x="245" y="235" width="50" height="50"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_it_setup" bpmnElement="it_setup">
        <dc:Bounds x="385" y="80" width="110" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_hr_paperwork" bpmnElement="hr_paperwork">
        <dc:Bounds x="385" y="220" width="110" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_assign_buddy" bpmnElement="assign_buddy">
        <dc:Bounds x="385" y="360" width="110" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_join_tracks" bpmnElement="join_tracks">
        <dc:Bounds x="585" y="235" width="50" height="50"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_first_day" bpmnElement="first_day">
        <dc:Bounds x="725" y="220" width="110" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_onboarded" bpmnElement="onboarded">
        <dc:Bounds x="932" y="242" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge_f_offer" bpmnElement="f_offer">
        <di:waypoint x="118" y="260"/>
        <di:waypoint x="245" y="260"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_it" bpmnElement="f_it">
        <di:waypoint x="270" y="235"/>
        <di:waypoint x="270" y="120"/>
        <di:waypoint x="385" y="120"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_hr" bpmnElement="f_hr">
        <di:waypoint x="295" y="260"/>
        <di:waypoint x="385" y="260"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_buddy" bpmnElement="f_buddy">
        <di:waypoint x="270" y="285"/>
        <di:waypoint x="270" y="400"/>
        <di:waypoint x="385" y="400"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_it_done" bpmnElement="f_it_done">
        <di:waypoint x="495" y="120"/>
        <di:waypoint x="540" y="120"/>
        <di:waypoint x="540" y="260"/>
        <di:waypoint x="585" y="260"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_hr_done" bpmnElement="f_hr_done">
        <di:waypoint x="495" y="260"/>
        <di:waypoint x="585" y="260"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_buddy_done" bpmnElement="f_buddy_done">
        <di:waypoint x="495" y="400"/>
        <di:waypoint x="540" y="400"/>
        <di:waypoint x="540" y="260"/>
        <di:waypoint x="585" y="260"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_all_done" bpmnElement="f_all_done">
        <di:waypoint x="635" y="260"/>
        <di:waypoint x="725" y="260"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_welcomed" bpmnElement="f_welcomed">
        <di:waypoint x="835" y="260"/>
        <di:waypoint x="932" y="260"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
