计划变更审核流程.bpmn 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.22.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
  3. <bpmn2:process id="ProcessPlanApprove" name="立项审批流程" isExecutable="true" camunda:versionTag="1.0">
  4. <bpmn2:startEvent id="event_start">
  5. <bpmn2:extensionElements>
  6. <camunda:properties>
  7. <camunda:property name="test" value="test111" />
  8. </camunda:properties>
  9. </bpmn2:extensionElements>
  10. <bpmn2:outgoing>Flow_15zn1tu</bpmn2:outgoing>
  11. </bpmn2:startEvent>
  12. <bpmn2:userTask id="task_request_plan_alter" name="申请变更计划" camunda:assignee="owner">
  13. <bpmn2:extensionElements>
  14. <camunda:inputOutput>
  15. <camunda:inputParameter name="show_in_my_works">${true}</camunda:inputParameter>
  16. <camunda:inputParameter name="process_type">${1}</camunda:inputParameter>
  17. <camunda:inputParameter name="target_type">project-plan</camunda:inputParameter>
  18. <camunda:inputParameter name="draft">${true}</camunda:inputParameter>
  19. </camunda:inputOutput>
  20. </bpmn2:extensionElements>
  21. <bpmn2:incoming>Flow_1t45qnv</bpmn2:incoming>
  22. <bpmn2:incoming>Flow_0gyvyyo</bpmn2:incoming>
  23. <bpmn2:outgoing>Flow_1rg4oob</bpmn2:outgoing>
  24. <bpmn2:outgoing>Flow_0bhibn0</bpmn2:outgoing>
  25. </bpmn2:userTask>
  26. <bpmn2:sequenceFlow id="Flow_15zn1tu" sourceRef="event_start" targetRef="task_modify_plan" />
  27. <bpmn2:sequenceFlow id="Flow_1rg4oob" sourceRef="task_request_plan_alter" targetRef="task_approve_plan_alter">
  28. <bpmn2:extensionElements>
  29. <camunda:properties>
  30. <camunda:property name="prj_phase" value="apply_plan_alt" />
  31. </camunda:properties>
  32. </bpmn2:extensionElements>
  33. </bpmn2:sequenceFlow>
  34. <bpmn2:userTask id="task_approve_plan_alter" name="审核计划变更" camunda:formKey="prj_approve" camunda:assignee="project_checker">
  35. <bpmn2:extensionElements>
  36. <camunda:inputOutput>
  37. <camunda:inputParameter name="show_in_my_works">${true}</camunda:inputParameter>
  38. <camunda:inputParameter name="process_type">${1}</camunda:inputParameter>
  39. <camunda:inputParameter name="target_type"> project-plan</camunda:inputParameter>
  40. <camunda:inputParameter name="prj_id">${environment.variables.prj_id}</camunda:inputParameter>
  41. <camunda:inputParameter name="prj_phase">review_plan_alt</camunda:inputParameter>
  42. <camunda:inputParameter name="draft">${true}</camunda:inputParameter>
  43. <camunda:inputParameter name="reverse_target">${{"target": "project-plan", "draft": false}}</camunda:inputParameter>
  44. </camunda:inputOutput>
  45. </bpmn2:extensionElements>
  46. <bpmn2:incoming>Flow_1rg4oob</bpmn2:incoming>
  47. <bpmn2:outgoing>Flow_193tusd</bpmn2:outgoing>
  48. <bpmn2:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="${content.handlers}" camunda:elementVariable="handler">
  49. <bpmn2:loopCardinality xsi:type="bpmn2:tFormalExpression">${content.handlers.length}</bpmn2:loopCardinality>
  50. <bpmn2:completionCondition xsi:type="bpmn2:tFormalExpression">${!content.output.pass}</bpmn2:completionCondition>
  51. </bpmn2:multiInstanceLoopCharacteristics>
  52. </bpmn2:userTask>
  53. <bpmn2:exclusiveGateway id="gateway_approved" default="Flow_0nwaga3">
  54. <bpmn2:incoming>Flow_193tusd</bpmn2:incoming>
  55. <bpmn2:outgoing>Flow_0zubkyw</bpmn2:outgoing>
  56. <bpmn2:outgoing>Flow_0nwaga3</bpmn2:outgoing>
  57. </bpmn2:exclusiveGateway>
  58. <bpmn2:sequenceFlow id="Flow_193tusd" sourceRef="task_approve_plan_alter" targetRef="gateway_approved" />
  59. <bpmn2:sequenceFlow id="Flow_0zubkyw" name="通过" sourceRef="gateway_approved" targetRef="event_throw_approved">
  60. <bpmn2:extensionElements>
  61. <camunda:properties>
  62. <camunda:property name="prj_phase" value="doing" />
  63. </camunda:properties>
  64. </bpmn2:extensionElements>
  65. <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="JavaScript">next(null, this.environment.variables.pass===true);</bpmn2:conditionExpression>
  66. </bpmn2:sequenceFlow>
  67. <bpmn2:sequenceFlow id="Flow_0nwaga3" name="驳回" sourceRef="gateway_approved" targetRef="event_throw_approved_back">
  68. <bpmn2:extensionElements>
  69. <camunda:properties>
  70. <camunda:property name="prj_phase" value="reject_plan_alt" />
  71. </camunda:properties>
  72. </bpmn2:extensionElements>
  73. </bpmn2:sequenceFlow>
  74. <bpmn2:sequenceFlow id="Flow_0bhibn0" sourceRef="task_request_plan_alter" targetRef="task_with_draw_plan_alter" />
  75. <bpmn2:userTask id="task_with_draw_plan_alter" name="撤回计划变更审核" camunda:assignee="owner">
  76. <bpmn2:extensionElements>
  77. <camunda:inputOutput>
  78. <camunda:inputParameter name="process_type">${1}</camunda:inputParameter>
  79. </camunda:inputOutput>
  80. </bpmn2:extensionElements>
  81. <bpmn2:incoming>Flow_0bhibn0</bpmn2:incoming>
  82. <bpmn2:outgoing>Flow_0tj9nd6</bpmn2:outgoing>
  83. </bpmn2:userTask>
  84. <bpmn2:sequenceFlow id="Flow_0tj9nd6" sourceRef="task_with_draw_plan_alter" targetRef="Event_throw_withdraw">
  85. <bpmn2:extensionElements>
  86. <camunda:properties>
  87. <camunda:property name="prj_phase" value="doing" />
  88. </camunda:properties>
  89. </bpmn2:extensionElements>
  90. </bpmn2:sequenceFlow>
  91. <bpmn2:boundaryEvent id="Event_catch_withdraw" name="撤回" attachedToRef="task_approve_plan_alter">
  92. <bpmn2:outgoing>Flow_0nzbvpg</bpmn2:outgoing>
  93. <bpmn2:signalEventDefinition id="SignalEventDefinition_111s194" signalRef="Signal_0hhmd7l" />
  94. </bpmn2:boundaryEvent>
  95. <bpmn2:intermediateThrowEvent id="Event_throw_withdraw" name="撤回事件">
  96. <bpmn2:incoming>Flow_0tj9nd6</bpmn2:incoming>
  97. <bpmn2:signalEventDefinition id="SignalEventDefinition_1tt7p06" signalRef="Signal_0hhmd7l" />
  98. </bpmn2:intermediateThrowEvent>
  99. <bpmn2:sequenceFlow id="Flow_02taytj" sourceRef="event_throw_approved" targetRef="Event_end">
  100. <bpmn2:extensionElements />
  101. </bpmn2:sequenceFlow>
  102. <bpmn2:intermediateThrowEvent id="event_throw_approved" name="已审核事件">
  103. <bpmn2:incoming>Flow_0zubkyw</bpmn2:incoming>
  104. <bpmn2:outgoing>Flow_02taytj</bpmn2:outgoing>
  105. <bpmn2:signalEventDefinition id="SignalEventDefinition_07jfo4t" signalRef="Signal_0828f9d" />
  106. </bpmn2:intermediateThrowEvent>
  107. <bpmn2:sequenceFlow id="Flow_1ucg773" sourceRef="event_catch_approved" targetRef="Event_end" />
  108. <bpmn2:boundaryEvent id="event_catch_approved" name="已审核" attachedToRef="task_with_draw_plan_alter">
  109. <bpmn2:outgoing>Flow_1ucg773</bpmn2:outgoing>
  110. <bpmn2:signalEventDefinition id="SignalEventDefinition_02ri5rf" signalRef="Signal_0828f9d" />
  111. </bpmn2:boundaryEvent>
  112. <bpmn2:intermediateThrowEvent id="event_throw_approved_back" name="已审核事件">
  113. <bpmn2:incoming>Flow_0nwaga3</bpmn2:incoming>
  114. <bpmn2:outgoing>Flow_06cxzjx</bpmn2:outgoing>
  115. <bpmn2:signalEventDefinition id="SignalEventDefinition_0y27jk5" signalRef="Signal_0828f9d" />
  116. </bpmn2:intermediateThrowEvent>
  117. <bpmn2:sequenceFlow id="Flow_1t45qnv" sourceRef="task_modify_plan_alter" targetRef="task_request_plan_alter" />
  118. <bpmn2:sequenceFlow id="Flow_0nzbvpg" sourceRef="Event_catch_withdraw" targetRef="task_modify_plan_alter">
  119. <bpmn2:extensionElements />
  120. </bpmn2:sequenceFlow>
  121. <bpmn2:sequenceFlow id="Flow_06cxzjx" sourceRef="event_throw_approved_back" targetRef="Activity_1dcslsv" />
  122. <bpmn2:manualTask id="task_modify_plan" name="修改计划">
  123. <bpmn2:incoming>Flow_15zn1tu</bpmn2:incoming>
  124. <bpmn2:outgoing>Flow_0gyvyyo</bpmn2:outgoing>
  125. </bpmn2:manualTask>
  126. <bpmn2:sequenceFlow id="Flow_0gyvyyo" sourceRef="task_modify_plan" targetRef="task_request_plan_alter">
  127. <bpmn2:extensionElements />
  128. </bpmn2:sequenceFlow>
  129. <bpmn2:manualTask id="task_modify_plan_alter" name="修改计划信息">
  130. <bpmn2:incoming>Flow_0nzbvpg</bpmn2:incoming>
  131. <bpmn2:incoming>Flow_06kumr8</bpmn2:incoming>
  132. <bpmn2:outgoing>Flow_1t45qnv</bpmn2:outgoing>
  133. </bpmn2:manualTask>
  134. <bpmn2:sequenceFlow id="Flow_06kumr8" sourceRef="Activity_1dcslsv" targetRef="task_modify_plan_alter" />
  135. <bpmn2:scriptTask id="Activity_1dcslsv" name="提醒审核被驳回" scriptFormat="Javascript">
  136. <bpmn2:extensionElements />
  137. <bpmn2:incoming>Flow_06cxzjx</bpmn2:incoming>
  138. <bpmn2:outgoing>Flow_06kumr8</bpmn2:outgoing>
  139. <bpmn2:script>this.environment.services.get_handlers('owner').then((handlers) =&gt; {
  140. for (var i = 0; i &lt; handlers.length; i++) {
  141. this.environment.services.gen_remind_task(handlers[i].id, '计划变更申请被驳回', '计划变更申请已被驳回');
  142. }
  143. next();
  144. });</bpmn2:script>
  145. </bpmn2:scriptTask>
  146. <bpmn2:endEvent id="Event_end">
  147. <bpmn2:incoming>Flow_1ucg773</bpmn2:incoming>
  148. <bpmn2:incoming>Flow_02taytj</bpmn2:incoming>
  149. </bpmn2:endEvent>
  150. </bpmn2:process>
  151. <bpmn2:signal id="Signal_0hhmd7l" name="cancel_sign" />
  152. <bpmn2:message id="Message_0fh9t3e" name="msg_cancel" />
  153. <bpmn2:message id="Message_1qtzp8g" name="Message_0q7qbc4" />
  154. <bpmn2:signal id="Signal_0828f9d" name="Signal_2sf6vik" />
  155. <bpmndi:BPMNDiagram id="BPMNDiagram_1">
  156. <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ProcessPlanApprove">
  157. <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="event_start">
  158. <dc:Bounds x="152" y="132" width="36" height="36" />
  159. </bpmndi:BPMNShape>
  160. <bpmndi:BPMNShape id="Activity_09wmdbt_di" bpmnElement="task_request_plan_alter">
  161. <dc:Bounds x="380" y="110" width="100" height="80" />
  162. <bpmndi:BPMNLabel />
  163. </bpmndi:BPMNShape>
  164. <bpmndi:BPMNShape id="Activity_0ds6ym0_di" bpmnElement="task_approve_plan_alter">
  165. <dc:Bounds x="540" y="110" width="100" height="80" />
  166. <bpmndi:BPMNLabel />
  167. </bpmndi:BPMNShape>
  168. <bpmndi:BPMNShape id="Gateway_06baw71_di" bpmnElement="gateway_approved" isMarkerVisible="true">
  169. <dc:Bounds x="845" y="125" width="50" height="50" />
  170. </bpmndi:BPMNShape>
  171. <bpmndi:BPMNShape id="Activity_0fonc56_di" bpmnElement="task_with_draw_plan_alter">
  172. <dc:Bounds x="450" y="410" width="100" height="80" />
  173. <bpmndi:BPMNLabel />
  174. </bpmndi:BPMNShape>
  175. <bpmndi:BPMNShape id="Event_0mceau4_di" bpmnElement="Event_throw_withdraw">
  176. <dc:Bounds x="662" y="432" width="36" height="36" />
  177. <bpmndi:BPMNLabel>
  178. <dc:Bounds x="658" y="475" width="44" height="14" />
  179. </bpmndi:BPMNLabel>
  180. </bpmndi:BPMNShape>
  181. <bpmndi:BPMNShape id="Event_0tntlum_di" bpmnElement="event_throw_approved">
  182. <dc:Bounds x="972" y="132" width="36" height="36" />
  183. <bpmndi:BPMNLabel>
  184. <dc:Bounds x="963" y="175" width="55" height="14" />
  185. </bpmndi:BPMNLabel>
  186. </bpmndi:BPMNShape>
  187. <bpmndi:BPMNShape id="Event_1gjhb1n_di" bpmnElement="event_throw_approved_back">
  188. <dc:Bounds x="852" y="222" width="36" height="36" />
  189. <bpmndi:BPMNLabel>
  190. <dc:Bounds x="892" y="233" width="55" height="14" />
  191. </bpmndi:BPMNLabel>
  192. </bpmndi:BPMNShape>
  193. <bpmndi:BPMNShape id="Activity_0isolrc_di" bpmnElement="task_modify_plan">
  194. <dc:Bounds x="250" y="110" width="100" height="80" />
  195. <bpmndi:BPMNLabel />
  196. </bpmndi:BPMNShape>
  197. <bpmndi:BPMNShape id="Activity_1k7kq2t_di" bpmnElement="task_modify_plan_alter">
  198. <dc:Bounds x="460" y="240" width="100" height="80" />
  199. <bpmndi:BPMNLabel />
  200. </bpmndi:BPMNShape>
  201. <bpmndi:BPMNShape id="Activity_1fktaxz_di" bpmnElement="Activity_1dcslsv">
  202. <dc:Bounds x="700" y="240" width="100" height="80" />
  203. </bpmndi:BPMNShape>
  204. <bpmndi:BPMNShape id="Event_1jljt88_di" bpmnElement="Event_end">
  205. <dc:Bounds x="1072" y="132" width="36" height="36" />
  206. </bpmndi:BPMNShape>
  207. <bpmndi:BPMNShape id="Event_06bs6js_di" bpmnElement="event_catch_approved">
  208. <dc:Bounds x="482" y="392" width="36" height="36" />
  209. <bpmndi:BPMNLabel>
  210. <dc:Bounds x="513" y="386" width="33" height="14" />
  211. </bpmndi:BPMNLabel>
  212. </bpmndi:BPMNShape>
  213. <bpmndi:BPMNShape id="Event_0s1xb2l_di" bpmnElement="Event_catch_withdraw">
  214. <dc:Bounds x="602" y="172" width="36" height="36" />
  215. <bpmndi:BPMNLabel>
  216. <dc:Bounds x="629" y="208" width="22" height="14" />
  217. </bpmndi:BPMNLabel>
  218. </bpmndi:BPMNShape>
  219. <bpmndi:BPMNEdge id="Flow_15zn1tu_di" bpmnElement="Flow_15zn1tu">
  220. <di:waypoint x="188" y="150" />
  221. <di:waypoint x="250" y="150" />
  222. </bpmndi:BPMNEdge>
  223. <bpmndi:BPMNEdge id="Flow_1rg4oob_di" bpmnElement="Flow_1rg4oob">
  224. <di:waypoint x="480" y="150" />
  225. <di:waypoint x="540" y="150" />
  226. </bpmndi:BPMNEdge>
  227. <bpmndi:BPMNEdge id="Flow_193tusd_di" bpmnElement="Flow_193tusd">
  228. <di:waypoint x="640" y="150" />
  229. <di:waypoint x="845" y="150" />
  230. </bpmndi:BPMNEdge>
  231. <bpmndi:BPMNEdge id="Flow_0zubkyw_di" bpmnElement="Flow_0zubkyw">
  232. <di:waypoint x="895" y="150" />
  233. <di:waypoint x="972" y="150" />
  234. <bpmndi:BPMNLabel>
  235. <dc:Bounds x="923" y="132" width="22" height="14" />
  236. </bpmndi:BPMNLabel>
  237. </bpmndi:BPMNEdge>
  238. <bpmndi:BPMNEdge id="Flow_0nwaga3_di" bpmnElement="Flow_0nwaga3">
  239. <di:waypoint x="870" y="175" />
  240. <di:waypoint x="870" y="222" />
  241. <bpmndi:BPMNLabel>
  242. <dc:Bounds x="874" y="183" width="22" height="14" />
  243. </bpmndi:BPMNLabel>
  244. </bpmndi:BPMNEdge>
  245. <bpmndi:BPMNEdge id="Flow_0bhibn0_di" bpmnElement="Flow_0bhibn0">
  246. <di:waypoint x="430" y="190" />
  247. <di:waypoint x="430" y="450" />
  248. <di:waypoint x="450" y="450" />
  249. </bpmndi:BPMNEdge>
  250. <bpmndi:BPMNEdge id="Flow_0tj9nd6_di" bpmnElement="Flow_0tj9nd6">
  251. <di:waypoint x="550" y="450" />
  252. <di:waypoint x="662" y="450" />
  253. </bpmndi:BPMNEdge>
  254. <bpmndi:BPMNEdge id="Flow_02taytj_di" bpmnElement="Flow_02taytj">
  255. <di:waypoint x="1008" y="150" />
  256. <di:waypoint x="1072" y="150" />
  257. </bpmndi:BPMNEdge>
  258. <bpmndi:BPMNEdge id="Flow_1ucg773_di" bpmnElement="Flow_1ucg773">
  259. <di:waypoint x="500" y="392" />
  260. <di:waypoint x="500" y="340" />
  261. <di:waypoint x="1090" y="340" />
  262. <di:waypoint x="1090" y="168" />
  263. </bpmndi:BPMNEdge>
  264. <bpmndi:BPMNEdge id="Flow_1t45qnv_di" bpmnElement="Flow_1t45qnv">
  265. <di:waypoint x="510" y="240" />
  266. <di:waypoint x="510" y="215" />
  267. <di:waypoint x="450" y="215" />
  268. <di:waypoint x="450" y="190" />
  269. </bpmndi:BPMNEdge>
  270. <bpmndi:BPMNEdge id="Flow_0nzbvpg_di" bpmnElement="Flow_0nzbvpg">
  271. <di:waypoint x="620" y="208" />
  272. <di:waypoint x="620" y="280" />
  273. <di:waypoint x="560" y="280" />
  274. </bpmndi:BPMNEdge>
  275. <bpmndi:BPMNEdge id="Flow_06cxzjx_di" bpmnElement="Flow_06cxzjx">
  276. <di:waypoint x="870" y="258" />
  277. <di:waypoint x="870" y="280" />
  278. <di:waypoint x="800" y="280" />
  279. </bpmndi:BPMNEdge>
  280. <bpmndi:BPMNEdge id="Flow_0gyvyyo_di" bpmnElement="Flow_0gyvyyo">
  281. <di:waypoint x="350" y="150" />
  282. <di:waypoint x="380" y="150" />
  283. </bpmndi:BPMNEdge>
  284. <bpmndi:BPMNEdge id="Flow_06kumr8_di" bpmnElement="Flow_06kumr8">
  285. <di:waypoint x="700" y="280" />
  286. <di:waypoint x="560" y="280" />
  287. </bpmndi:BPMNEdge>
  288. </bpmndi:BPMNPlane>
  289. </bpmndi:BPMNDiagram>
  290. </bpmn2:definitions>