1. 设计流程图
2. Bpmn文件
填写请假单:使用流程变量,指定当前登录的人未任务执行者
项目经理审批:小于等于3天,为一个角色,可以有多个人可以进行审批,项目中设置为(王一,王二,王三)
总经理审批:大于3天,只有一个总经理,指定一个人进行审批,项目中设置为(王大)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" 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.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1596608849637" name="" targetNamespace="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema">
<process id="leave" isClosed="false" isExecutable="true" processType="None">
<startEvent id="_2" name="开始"/>
<userTask activiti:assignee="${inputUser}" activiti:exclusive="true" id="_3" name="填写请假单"/>
<exclusiveGateway gatewayDirection="Unspecified" id="_4" name="排他网关"/>
<userTask activiti:assignee="王大" activiti:exclusive="true" id="_5" name="总经理审批"/>
<userTask activiti:candidateUsers="王一,王二,王三" activiti:exclusive="true" id="_6" name="项目经理审批">
</userTask>
<endEvent id="_7" name="结束"/>
<sequenceFlow id="_8" sourceRef="_2" targetRef="_3"/>
<sequenceFlow id="_9" sourceRef="_3" targetRef="_4"/>
<sequenceFlow id="_10" name="大于三天" sourceRef="_4" targetRef="_5">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${
day>3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="_11" name="小于三天" sourceRef="_4" targetRef="_6">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${
day<=3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="_12" sourceRef="_5" targetRef="_7"/>
<sequenceFlow id="_13" sourceRef="_6" targetRef="_7"/>
</process>
<bpmndi:BPMNDiagram documentation="background=#000000;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0" id="Diagram-_1" name="New Diagram">
<bpmndi:BPMNPlane bpmnElement="leave">
<bpmndi:BPMNShape bpmnElement="_2" id="Shape-_2">
<omgdc:Bounds height="32.0" width="32.0" x="0.0" y="345.0"/>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
<