<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:activiti="http://activiti.org/bpmn" targetNamespace="Examples"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL
             http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd">

    <process id="leave_process" name="某公司请假流程">
        <startEvent id="leave" name="请假申请"></startEvent>

        <userTask id="dept_manager" name="部门经理审批"></userTask>
        <userTask id="boss" name="总经理审批"></userTask>
        <userTask id="hr" name="HR审批"></userTask>
        <sequenceFlow id="flow1" sourceRef="leave" targetRef="dept_manager"></sequenceFlow>
        <sequenceFlow id="flow2" sourceRef="dept_manager" targetRef="boss">
            <conditionExpression xsi:type="tFormalExpression"><![CDATA[${day >= 3}]]></conditionExpression>
        </sequenceFlow>
        <sequenceFlow id="flow3" sourceRef="boss" targetRef="hr"></sequenceFlow>
        <sequenceFlow id="flow4" sourceRef="dept_manager" targetRef="hr">
            <conditionExpression xsi:type="tFormalExpression"><![CDATA[${day < 3}]]></conditionExpression>
        </sequenceFlow>
        <sequenceFlow id="flow5" sourceRef="hr" targetRef="end"></sequenceFlow>

        <endEvent id="end" name="结束"></endEvent>
    </process>

</definitions>