<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.processes.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.processes.org/test">
  <process id="myProcee" name="My process" isExecutable="true" isClosed="false" processType="None">
    <startEvent id="start" name="Start"></startEvent>
    <userTask id="usertask1" name="提出请假申请" activiti:assignee="${employee}"></userTask>
    <sequenceFlow id="flow1" name="想请假" sourceRef="start" targetRef="usertask3"></sequenceFlow>
    <userTask id="usertask2" name="领导审核" activiti:candidateUsers="${managers}"></userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <userTask id="usertask3" name="填写请假单" activiti:assignee="${employee}"></userTask>
    <userTask id="usertask4" name="放弃请假"></userTask>
    <sequenceFlow id="flow6" name="想了想还是不请了" sourceRef="exclusivegateway1" targetRef="usertask4">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input=='giveup'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="usertask4" targetRef="endevent1"></sequenceFlow>
    <sequenceFlow id="flow3" name="下定决心准备请假" sourceRef="exclusivegateway1" targetRef="usertask1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input=='apply'}]]></conditionExpression>
    </sequenceFlow>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow2" sourceRef="usertask3" targetRef="exclusivegateway1"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow10" name="审核未通过" sourceRef="exclusivegateway2" targetRef="usertask3">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input=='giveup'}]]></conditionExpression>
    </sequenceFlow>
    <exclusiveGateway id="exclusivegateway4" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow4" sourceRef="usertask1" targetRef="exclusivegateway4"></sequenceFlow>
    <sequenceFlow id="flow5" sourceRef="exclusivegateway4" targetRef="usertask2">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${days<10 && days>=3}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="usertask5" name="领导审核" activiti:candidateUsers="${managers}"></userTask>
    <sequenceFlow id="flow11" sourceRef="exclusivegateway4" targetRef="usertask5">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${days<3}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="usertask6" name="管理层审核" activiti:candidateUsers="${managers}"></userTask>
    <sequenceFlow id="flow13" sourceRef="exclusivegateway4" targetRef="usertask6">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${days>10}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow12" sourceRef="usertask5" targetRef="exclusivegateway2"></sequenceFlow>
    <sequenceFlow id="flow14" sourceRef="usertask6" targetRef="exclusivegateway2"></sequenceFlow>
    <userTask id="usertask7" name="通知人事" activiti:candidateUsers="${managers}"></userTask>
    <sequenceFlow id="flow15" sourceRef="exclusivegateway2" targetRef="usertask7">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input=='apply'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow9" sourceRef="usertask7" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input=='apply'}]]></conditionExpression>
    </sequenceFlow>
    <exclusiveGateway id="exclusivegateway5" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow8" sourceRef="usertask2" targetRef="exclusivegateway5"></sequenceFlow>
    <userTask id="usertask8" name="管理层审核" activiti:candidateUsers="${managers}"></userTask>
    <sequenceFlow id="flow17" name="同意" sourceRef="exclusivegateway5" targetRef="usertask8">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input=='apply'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow18" sourceRef="usertask8" targetRef="exclusivegateway2"></sequenceFlow>
    <sequenceFlow id="flow19" sourceRef="exclusivegateway5" targetRef="usertask3">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input=='giveup'}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcee">
    <bpmndi:BPMNPlane bpmnElement="myProcee" id="BPMNPlane_myProcee">
      <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
        <omgdc:Bounds height="35.0" width="35.0" x="0.0" y="124.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55.0" width="105.0" x="380.0" y="114.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
        <omgdc:Bounds height="55.0" width="105.0" x="740.0" y="121.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="1370.0" y="413.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
        <omgdc:Bounds height="55.0" width="105.0" x="110.0" y="114.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">
        <omgdc:Bounds height="55.0" width="105.0" x="386.0" y="402.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="32.0" width="32.0" x="250.0" y="121.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
        <omgdc:Bounds height="32.0" width="32.0" x="1260.0" y="122.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway4" id="BPMNShape_exclusivegateway4">
        <omgdc:Bounds height="32.0" width="32.0" x="580.0" y="127.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">
        <omgdc:Bounds height="55.0" width="105.0" x="750.0" y="27.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask6" id="BPMNShape_usertask6">
        <omgdc:Bounds height="55.0" width="105.0" x="767.0" y="251.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask7" id="BPMNShape_usertask7">
        <omgdc:Bounds height="55.0" width="105.0" x="1330.0" y="209.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway5" id="BPMNShape_exclusivegateway5">
        <omgdc:Bounds height="40.0" width="40.0" x="890.0" y="129.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask8" id="BPMNShape_usertask8">
        <omgdc:Bounds height="55.0" width="105.0" x="980.0" y="120.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="35.0" y="141.0"></omgdi:waypoint>
        <omgdi:waypoint x="110.0" y="141.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="35.0" y="141.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="266.0" y="153.0"></omgdi:waypoint>
        <omgdi:waypoint x="270.0" y="429.0"></omgdi:waypoint>
        <omgdi:waypoint x="386.0" y="429.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="48.0" width="96.0" x="270.0" y="161.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="491.0" y="429.0"></omgdi:waypoint>
        <omgdi:waypoint x="1370.0" y="430.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="282.0" y="137.0"></omgdi:waypoint>
        <omgdi:waypoint x="380.0" y="141.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="48.0" width="96.0" x="290.0" y="141.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="215.0" y="141.0"></omgdi:waypoint>
        <omgdi:waypoint x="250.0" y="137.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="1292.0" y="138.0"></omgdi:waypoint>
        <omgdi:waypoint x="1377.0" y="147.0"></omgdi:waypoint>
        <omgdi:waypoint x="1457.0" y="147.0"></omgdi:waypoint>
        <omgdi:waypoint x="1457.0" y="497.0"></omgdi:waypoint>
        <omgdi:waypoint x="1140.0" y="497.0"></omgdi:waypoint>
        <omgdi:waypoint x="676.0" y="497.0"></omgdi:waypoint>
        <omgdi:waypoint x="389.0" y="497.0"></omgdi:waypoint>
        <omgdi:waypoint x="162.0" y="497.0"></omgdi:waypoint>
        <omgdi:waypoint x="162.0" y="169.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="80.0" x="1071.0" y="432.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="485.0" y="141.0"></omgdi:waypoint>
        <omgdi:waypoint x="580.0" y="143.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="612.0" y="143.0"></omgdi:waypoint>
        <omgdi:waypoint x="740.0" y="148.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
        <omgdi:waypoint x="596.0" y="127.0"></omgdi:waypoint>
        <omgdi:waypoint x="600.0" y="54.0"></omgdi:waypoint>
        <omgdi:waypoint x="750.0" y="54.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
        <omgdi:waypoint x="596.0" y="159.0"></omgdi:waypoint>
        <omgdi:waypoint x="600.0" y="278.0"></omgdi:waypoint>
        <omgdi:waypoint x="767.0" y="278.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
        <omgdi:waypoint x="855.0" y="54.0"></omgdi:waypoint>
        <omgdi:waypoint x="1279.0" y="54.0"></omgdi:waypoint>
        <omgdi:waypoint x="1276.0" y="122.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
        <omgdi:waypoint x="872.0" y="278.0"></omgdi:waypoint>
        <omgdi:waypoint x="1280.0" y="278.0"></omgdi:waypoint>
        <omgdi:waypoint x="1276.0" y="154.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
        <omgdi:waypoint x="1276.0" y="154.0"></omgdi:waypoint>
        <omgdi:waypoint x="1382.0" y="209.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="1382.0" y="264.0"></omgdi:waypoint>
        <omgdi:waypoint x="1387.0" y="413.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="845.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="890.0" y="149.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">
        <omgdi:waypoint x="930.0" y="149.0"></omgdi:waypoint>
        <omgdi:waypoint x="980.0" y="147.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="100.0" x="919.0" y="158.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow18" id="BPMNEdge_flow18">
        <omgdi:waypoint x="1085.0" y="147.0"></omgdi:waypoint>
        <omgdi:waypoint x="1260.0" y="138.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow19" id="BPMNEdge_flow19">
        <omgdi:waypoint x="910.0" y="129.0"></omgdi:waypoint>
        <omgdi:waypoint x="910.0" y="12.0"></omgdi:waypoint>
        <omgdi:waypoint x="558.0" y="12.0"></omgdi:waypoint>
        <omgdi:waypoint x="162.0" y="12.0"></omgdi:waypoint>
        <omgdi:waypoint x="162.0" y="114.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>