2022年5月15日 15:51 周日网关
#
![ly-20241212142112823](img/ly-20241212142112823.png)
排他网关
#
会按照所有出口顺序流定义的顺序对它们进行计算,选择第一个条件计算为true的顺序流(当没有设置条件时,认为顺序流为true)继续流程
![ly-20241212142113034](img/ly-20241212142113034.png)
排他网关的绘制
xml文件
<?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.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" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef" exporter="Flowable Open Source Modeler" exporterVersion="6.7.2">
<process id="holiday-exclusive" name="请假流程-排他网关" isExecutable="true">
<startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent>
<userTask id="sid-3D5ED4D4-97F5-4FFD-B160-F00566ECC55E" name="创建请假单" flowable:assignee="zhangsan" flowable:formFieldValidation="true">
<extensionElements>
<modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler"><![CDATA[false]]></modeler:initiator-can-complete>
</extensionElements>
</userTask>
<sequenceFlow id="sid-33A73370-751D-413F-9306-39DEAA674DB6" sourceRef="startEvent1" targetRef="sid-3D5ED4D4-97F5-4FFD-B160-F00566ECC55E"></sequenceFlow>
<exclusiveGateway id="sid-5B2117E6-D341-49F2-85B2-336CA836C7D8"></exclusiveGateway>
<sequenceFlow id="sid-D1B1F6E0-EA7F-4FF7-AD0C-5D43DBCEBFD2" sourceRef="sid-3D5ED4D4-97F5-4FFD-B160-F00566ECC55E" targetRef="sid-5B2117E6-D341-49F2-85B2-336CA836C7D8"></sequenceFlow>
<userTask id="sid-08A6CB64-C9BB-4342-852D-444A75315BDE" name="总经理审批" flowable:assignee="wangwu" flowable:formFieldValidation="true">
<extensionElements>
<modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler"><![CDATA[false]]></modeler:initiator-can-complete>
</extensionElements>
</userTask>
<userTask id="sid-EA98D0C3-E41D-4DEB-8933-91A1B7301ABE" name="部门经理审批" flowable:assignee="lisi" flowable:formFieldValidation="true">
<extensionElements>
<modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler"><![CDATA[false]]></modeler:initiator-can-complete>
</extensionElements>
</userTask>
<userTask id="sid-24F73F7F-EB61-484F-A494-686E194D0118" name="人事审批" flowable:assignee="zhaoliu" flowable:formFieldValidation="true">
<extensionElements>
<modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler"><![CDATA[false]]></modeler:initiator-can-complete>
</extensionElements>
</userTask>
<sequenceFlow id="sid-8BA0B88C-BA4F-446D-B5E7-6BF0830B1DC8" sourceRef="sid-EA98D0C3-E41D-4DEB-8933-91A1B7301ABE" targetRef="sid-24F73F7F-EB61-484F-A494-686E194D0118"></sequenceFlow>
<sequenceFlow id="sid-E748F81F-B0B2-4C34-B993-FBAA2BCD0995" sourceRef="sid-08A6CB64-C9BB-4342-852D-444A75315BDE" targetRef="sid-24F73F7F-EB61-484F-A494-686E194D0118"></sequenceFlow>
<sequenceFlow id="sid-928C6C6F-57F1-40F2-BE0F-1A9FF3E6E9E4" sourceRef="sid-5B2117E6-D341-49F2-85B2-336CA836C7D8" targetRef="sid-08A6CB64-C9BB-4342-852D-444A75315BDE">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${num>3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-4DB25720-11C8-401E-BB4C-83BB25510B2E" sourceRef="sid-5B2117E6-D341-49F2-85B2-336CA836C7D8" targetRef="sid-EA98D0C3-E41D-4DEB-8933-91A1B7301ABE">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${num<3}]]></conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_holiday-exclusive">
<bpmndi:BPMNPlane bpmnElement="holiday-exclusive" id="BPMNPlane_holiday-exclusive">
<bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">
<omgdc:Bounds height="30.0" width="30.0" x="30.0" y="163.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-3D5ED4D4-97F5-4FFD-B160-F00566ECC55E" id="BPMNShape_sid-3D5ED4D4-97F5-4FFD-B160-F00566ECC55E">
<omgdc:Bounds height="80.0" width="100.0" x="150.0" y="135.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-5B2117E6-D341-49F2-85B2-336CA836C7D8" id="BPMNShape_sid-5B2117E6-D341-49F2-85B2-336CA836C7D8">
<omgdc:Bounds height="40.0" width="40.0" x="315.0" y="155.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-08A6CB64-C9BB-4342-852D-444A75315BDE" id="BPMNShape_sid-08A6CB64-C9BB-4342-852D-444A75315BDE">
<omgdc:Bounds height="80.0" width="100.0" x="420.0" y="225.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-EA98D0C3-E41D-4DEB-8933-91A1B7301ABE" id="BPMNShape_sid-EA98D0C3-E41D-4DEB-8933-91A1B7301ABE">
<omgdc:Bounds height="80.0" width="100.0" x="405.0" y="30.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-24F73F7F-EB61-484F-A494-686E194D0118" id="BPMNShape_sid-24F73F7F-EB61-484F-A494-686E194D0118">
<omgdc:Bounds height="80.0" width="100.0" x="630.0" y="225.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sid-8BA0B88C-BA4F-446D-B5E7-6BF0830B1DC8" id="BPMNEdge_sid-8BA0B88C-BA4F-446D-B5E7-6BF0830B1DC8" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="504.95000000000005" y="70.0"></omgdi:waypoint>
<omgdi:waypoint x="680.0" y="70.0"></omgdi:waypoint>
<omgdi:waypoint x="680.0" y="225.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-4DB25720-11C8-401E-BB4C-83BB25510B2E" id="BPMNEdge_sid-4DB25720-11C8-401E-BB4C-83BB25510B2E" flowable:sourceDockerX="20.5" flowable:sourceDockerY="20.5" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="335.5" y="155.5"></omgdi:waypoint>
<omgdi:waypoint x="335.5" y="70.0"></omgdi:waypoint>
<omgdi:waypoint x="404.99999999996083" y="70.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-33A73370-751D-413F-9306-39DEAA674DB6" id="BPMNEdge_sid-33A73370-751D-413F-9306-39DEAA674DB6" flowable:sourceDockerX="15.0" flowable:sourceDockerY="15.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="59.94725673598754" y="177.70973069236373"></omgdi:waypoint>
<omgdi:waypoint x="150.0" y="175.96677419354836"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-D1B1F6E0-EA7F-4FF7-AD0C-5D43DBCEBFD2" id="BPMNEdge_sid-D1B1F6E0-EA7F-4FF7-AD0C-5D43DBCEBFD2" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="20.5" flowable:targetDockerY="20.5">
<omgdi:waypoint x="249.95000000000002" y="175.18431734317343"></omgdi:waypoint>
<omgdi:waypoint x="315.42592592592536" y="175.42592592592592"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-E748F81F-B0B2-4C34-B993-FBAA2BCD0995" id="BPMNEdge_sid-E748F81F-B0B2-4C34-B993-FBAA2BCD0995" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="519.95" y="265.0"></omgdi:waypoint>
<omgdi:waypoint x="629.9999999998776" y="265.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-928C6C6F-57F1-40F2-BE0F-1A9FF3E6E9E4" id="BPMNEdge_sid-928C6C6F-57F1-40F2-BE0F-1A9FF3E6E9E4" flowable:sourceDockerX="20.5" flowable:sourceDockerY="20.5" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="335.5" y="194.43942522321433"></omgdi:waypoint>
<omgdi:waypoint x="335.5" y="265.0"></omgdi:waypoint>
<omgdi:waypoint x="420.0" y="265.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
部署
...