1. 流程图

image.png

2. 流程定义

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <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: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" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.kafeitu.me/activiti/leave">
  3. <process id="leave" name="请假流程-普通表单" isExecutable="true">
  4. <documentation>请假流程演示</documentation>
  5. <startEvent id="startevent1" name="Start" activiti:initiator="applyUserId"></startEvent>
  6. <userTask id="deptLeaderVerify" name="部门领导审批" activiti:candidateGroups="deptLeader"></userTask>
  7. <exclusiveGateway id="exclusivegateway5" name="Exclusive Gateway"></exclusiveGateway>
  8. <userTask id="modifyApply" name="调整申请" activiti:assignee="${applyUserId}"></userTask>
  9. <userTask id="hrVerify" name="人事审批" activiti:candidateGroups="hr"></userTask>
  10. <exclusiveGateway id="exclusivegateway6" name="Exclusive Gateway"></exclusiveGateway>
  11. <userTask id="reportBack" name="销假" activiti:assignee="${applyUserId}">
  12. <extensionElements>
  13. <activiti:taskListener event="complete" delegateExpression="${reportBackEndProcessor}"></activiti:taskListener>
  14. </extensionElements>
  15. </userTask>
  16. <endEvent id="endevent1" name="End"></endEvent>
  17. <exclusiveGateway id="exclusivegateway7" name="Exclusive Gateway"></exclusiveGateway>
  18. <sequenceFlow id="flow2" sourceRef="startevent1" targetRef="deptLeaderVerify"></sequenceFlow>
  19. <sequenceFlow id="flow3" sourceRef="deptLeaderVerify" targetRef="exclusivegateway5"></sequenceFlow>
  20. <sequenceFlow id="flow4" name="不同意" sourceRef="exclusivegateway5" targetRef="modifyApply">
  21. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!deptLeaderApproved}]]></conditionExpression>
  22. </sequenceFlow>
  23. <sequenceFlow id="flow5" name="同意" sourceRef="exclusivegateway5" targetRef="hrVerify">
  24. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${deptLeaderApproved}]]></conditionExpression>
  25. </sequenceFlow>
  26. <sequenceFlow id="flow6" sourceRef="hrVerify" targetRef="exclusivegateway6"></sequenceFlow>
  27. <sequenceFlow id="flow7" name="同意" sourceRef="exclusivegateway6" targetRef="reportBack">
  28. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${hrApproved}]]></conditionExpression>
  29. </sequenceFlow>
  30. <sequenceFlow id="flow8" sourceRef="reportBack" targetRef="endevent1"></sequenceFlow>
  31. <sequenceFlow id="flow9" name="不同意" sourceRef="exclusivegateway6" targetRef="modifyApply">
  32. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!hrApproved}]]></conditionExpression>
  33. </sequenceFlow>
  34. <sequenceFlow id="flow10" name="重新申请" sourceRef="exclusivegateway7" targetRef="deptLeaderVerify">
  35. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply}]]></conditionExpression>
  36. </sequenceFlow>
  37. <sequenceFlow id="flow11" sourceRef="modifyApply" targetRef="exclusivegateway7"></sequenceFlow>
  38. <sequenceFlow id="flow12" name="结束流程" sourceRef="exclusivegateway7" targetRef="endevent1">
  39. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!reApply}]]></conditionExpression>
  40. </sequenceFlow>
  41. </process>
  42. <bpmndi:BPMNDiagram id="BPMNDiagram_leave">
  43. <bpmndi:BPMNPlane bpmnElement="leave" id="BPMNPlane_leave">
  44. <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
  45. <omgdc:Bounds height="35.0" width="35.0" x="0.0" y="46.0"></omgdc:Bounds>
  46. </bpmndi:BPMNShape>
  47. <bpmndi:BPMNShape bpmnElement="deptLeaderVerify" id="BPMNShape_deptLeaderVerify">
  48. <omgdc:Bounds height="55.0" width="105.0" x="80.0" y="36.0"></omgdc:Bounds>
  49. </bpmndi:BPMNShape>
  50. <bpmndi:BPMNShape bpmnElement="exclusivegateway5" id="BPMNShape_exclusivegateway5">
  51. <omgdc:Bounds height="40.0" width="40.0" x="240.0" y="43.0"></omgdc:Bounds>
  52. </bpmndi:BPMNShape>
  53. <bpmndi:BPMNShape bpmnElement="modifyApply" id="BPMNShape_modifyApply">
  54. <omgdc:Bounds height="55.0" width="105.0" x="208.0" y="114.0"></omgdc:Bounds>
  55. </bpmndi:BPMNShape>
  56. <bpmndi:BPMNShape bpmnElement="hrVerify" id="BPMNShape_hrVerify">
  57. <omgdc:Bounds height="55.0" width="105.0" x="348.0" y="36.0"></omgdc:Bounds>
  58. </bpmndi:BPMNShape>
  59. <bpmndi:BPMNShape bpmnElement="exclusivegateway6" id="BPMNShape_exclusivegateway6">
  60. <omgdc:Bounds height="40.0" width="40.0" x="485.0" y="43.0"></omgdc:Bounds>
  61. </bpmndi:BPMNShape>
  62. <bpmndi:BPMNShape bpmnElement="reportBack" id="BPMNShape_reportBack">
  63. <omgdc:Bounds height="55.0" width="105.0" x="580.0" y="36.0"></omgdc:Bounds>
  64. </bpmndi:BPMNShape>
  65. <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
  66. <omgdc:Bounds height="35.0" width="35.0" x="615.0" y="195.0"></omgdc:Bounds>
  67. </bpmndi:BPMNShape>
  68. <bpmndi:BPMNShape bpmnElement="exclusivegateway7" id="BPMNShape_exclusivegateway7">
  69. <omgdc:Bounds height="40.0" width="40.0" x="240.0" y="192.0"></omgdc:Bounds>
  70. </bpmndi:BPMNShape>
  71. <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
  72. <omgdi:waypoint x="35.0" y="63.0"></omgdi:waypoint>
  73. <omgdi:waypoint x="80.0" y="63.0"></omgdi:waypoint>
  74. </bpmndi:BPMNEdge>
  75. <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
  76. <omgdi:waypoint x="185.0" y="63.0"></omgdi:waypoint>
  77. <omgdi:waypoint x="240.0" y="63.0"></omgdi:waypoint>
  78. </bpmndi:BPMNEdge>
  79. <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
  80. <omgdi:waypoint x="260.0" y="83.0"></omgdi:waypoint>
  81. <omgdi:waypoint x="260.0" y="114.0"></omgdi:waypoint>
  82. <bpmndi:BPMNLabel>
  83. <omgdc:Bounds height="11.0" width="33.0" x="270.0" y="83.0"></omgdc:Bounds>
  84. </bpmndi:BPMNLabel>
  85. </bpmndi:BPMNEdge>
  86. <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
  87. <omgdi:waypoint x="280.0" y="63.0"></omgdi:waypoint>
  88. <omgdi:waypoint x="348.0" y="63.0"></omgdi:waypoint>
  89. <bpmndi:BPMNLabel>
  90. <omgdc:Bounds height="11.0" width="22.0" x="300.0" y="46.0"></omgdc:Bounds>
  91. </bpmndi:BPMNLabel>
  92. </bpmndi:BPMNEdge>
  93. <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
  94. <omgdi:waypoint x="453.0" y="63.0"></omgdi:waypoint>
  95. <omgdi:waypoint x="485.0" y="63.0"></omgdi:waypoint>
  96. </bpmndi:BPMNEdge>
  97. <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
  98. <omgdi:waypoint x="525.0" y="63.0"></omgdi:waypoint>
  99. <omgdi:waypoint x="580.0" y="63.0"></omgdi:waypoint>
  100. <bpmndi:BPMNLabel>
  101. <omgdc:Bounds height="11.0" width="22.0" x="539.0" y="46.0"></omgdc:Bounds>
  102. </bpmndi:BPMNLabel>
  103. </bpmndi:BPMNEdge>
  104. <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
  105. <omgdi:waypoint x="632.0" y="91.0"></omgdi:waypoint>
  106. <omgdi:waypoint x="632.0" y="195.0"></omgdi:waypoint>
  107. </bpmndi:BPMNEdge>
  108. <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
  109. <omgdi:waypoint x="505.0" y="83.0"></omgdi:waypoint>
  110. <omgdi:waypoint x="504.0" y="141.0"></omgdi:waypoint>
  111. <omgdi:waypoint x="313.0" y="141.0"></omgdi:waypoint>
  112. <bpmndi:BPMNLabel>
  113. <omgdc:Bounds height="11.0" width="33.0" x="515.0" y="83.0"></omgdc:Bounds>
  114. </bpmndi:BPMNLabel>
  115. </bpmndi:BPMNEdge>
  116. <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
  117. <omgdi:waypoint x="240.0" y="212.0"></omgdi:waypoint>
  118. <omgdi:waypoint x="132.0" y="212.0"></omgdi:waypoint>
  119. <omgdi:waypoint x="132.0" y="91.0"></omgdi:waypoint>
  120. <bpmndi:BPMNLabel>
  121. <omgdc:Bounds height="11.0" width="44.0" x="142.0" y="192.0"></omgdc:Bounds>
  122. </bpmndi:BPMNLabel>
  123. </bpmndi:BPMNEdge>
  124. <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
  125. <omgdi:waypoint x="260.0" y="169.0"></omgdi:waypoint>
  126. <omgdi:waypoint x="260.0" y="192.0"></omgdi:waypoint>
  127. </bpmndi:BPMNEdge>
  128. <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
  129. <omgdi:waypoint x="280.0" y="212.0"></omgdi:waypoint>
  130. <omgdi:waypoint x="615.0" y="212.0"></omgdi:waypoint>
  131. <bpmndi:BPMNLabel>
  132. <omgdc:Bounds height="11.0" width="44.0" x="429.0" y="219.0"></omgdc:Bounds>
  133. </bpmndi:BPMNLabel>
  134. </bpmndi:BPMNEdge>
  135. </bpmndi:BPMNPlane>
  136. </bpmndi:BPMNDiagram>
  137. </definitions>

附件:leave.bpmn.zip

3. 流程表单