立项流程.bpmn 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  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="ProcessProjectApprove" 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" name="申请立项" camunda:formKey="prj_create_req" camunda:assignee="owner">
  13. <bpmn2:extensionElements>
  14. <camunda:inputOutput>
  15. <camunda:inputParameter name="show_in_my_works">${false}</camunda:inputParameter>
  16. <camunda:inputParameter name="process_type">${1}</camunda:inputParameter>
  17. </camunda:inputOutput>
  18. <camunda:executionListener event="end">
  19. <camunda:script scriptFormat="JavaScript">
  20. (async function () {
  21. try {
  22. let owner = await this.environment.services.owner(); // 获取任务责任人
  23. if (!owner) {
  24. await this.environment.services.gen_warn_task('admin', '提交立项审核时未找到负责人',
  25. `提交立项审核时未找到负责人,流程出错。case id: ${this.environment.variables.id}`);
  26. }
  27. // 获取项目审核人列表       
  28. let checkers = await this.environment.services.get_handlers('project_checker');
  29. if (!checkers || checkers.length === 0) return;
  30. let checkers_str = "";
  31. for (var i = 0; i &lt; checkers.length; i++) {
  32. if (i &gt; 0) checkers_str += '、';
  33. checkers_str += `${checkers[i].name}`;
  34. }
  35. await this.environment.services.gen_remind_task(owner.id, '立项申请已提交', `&lt;b&gt;${owner.name}&lt;/b&gt;已于 &lt;b&gt;` +
  36. this.environment.services.get_datetime() + `&lt;/b&gt; 提交了立项申请,将由: &lt;br&gt; &lt;b&gt;${checkers_str}&lt;/b&gt; 进行立项审核。`);
  37. await this.environment.services.logger(owner.id, owner.name, `提交了立项申请,将由: &lt;br&gt; &lt;b&gt;${checkers_str}&lt;/b&gt; &lt;br&gt;进行立项审核。`);
  38. } catch (e) {
  39. this.environment.Logger('work').error(e);
  40. }
  41. })();
  42. </camunda:script>
  43. </camunda:executionListener>
  44. <camunda:executionListener event="start">
  45. <camunda:script scriptFormat="JavaScript">
  46. (async function () {
  47. try {
  48. let checkers = await this.environment.services.get_handlers('project_checker');
  49. this.environment.Logger('work').debug(checkers);
  50. let staffs = await this.environment.services.get_staffs();
  51. this.environment.staff_ids = [];
  52. this.environment.staff_names = [];
  53. if (staffs) {
  54. for (let staff of staffs) {
  55. this.environment.staff_ids.push(staff.id);
  56. this.environment.staff_names.push(staff.name);
  57. }
  58. }
  59. let result = checkers.length &gt; 0 ? true: false;
  60. if (!result) {
  61. return {
  62. result: false,
  63. message: '立项申请前,请先配置审核组成员,否则无法执行立项审核任务。'
  64. }
  65. } else {
  66. return {
  67. result: true,
  68. message: 'OK'
  69. }
  70. }
  71. } catch (e) {
  72. this.environment.Logger('work').error(e);
  73. return {
  74. result: false,
  75. message: 'fail'
  76. }
  77. }
  78. })();
  79. </camunda:script>
  80. </camunda:executionListener>
  81. </bpmn2:extensionElements>
  82. <bpmn2:incoming>Flow_1t45qnv</bpmn2:incoming>
  83. <bpmn2:incoming>Flow_0gyvyyo</bpmn2:incoming>
  84. <bpmn2:outgoing>Flow_1rg4oob</bpmn2:outgoing>
  85. </bpmn2:userTask>
  86. <bpmn2:sequenceFlow id="Flow_15zn1tu" sourceRef="event_start" targetRef="task_create" />
  87. <bpmn2:sequenceFlow id="Flow_1rg4oob" sourceRef="task_request" targetRef="Activity_16s6waw">
  88. <bpmn2:extensionElements />
  89. </bpmn2:sequenceFlow>
  90. <bpmn2:userTask id="task_approve" name="审核立项" camunda:formKey="prj_approve" camunda:assignee="project_checker">
  91. <bpmn2:documentation>content.output.*来自于signal</bpmn2:documentation>
  92. <bpmn2:extensionElements>
  93. <camunda:inputOutput>
  94. <camunda:inputParameter name="show_in_my_works">${true}</camunda:inputParameter>
  95. <camunda:inputParameter name="process_type">${1}</camunda:inputParameter>
  96. <camunda:inputParameter name="target_type">project-detail</camunda:inputParameter>
  97. <camunda:inputParameter name="prj_id">${environment.variables.prj_id}</camunda:inputParameter>
  98. </camunda:inputOutput>
  99. <camunda:executionListener event="end">
  100. <camunda:script scriptFormat="JavaScript">
  101. (async function () {
  102. try {
  103. let owner = await this.environment.services.owner(); // 获取任务责任人
  104. if (!owner) {
  105. await this.environment.services.gen_warn_task('admin', '立项申请时未找到负责人',
  106. `立项申请时未找到负责人,流程出错。case id: ${this.environment.variables.id}`);
  107. }
  108. this.environment.Logger('work').debug(this.content);
  109. let checker = this.content.handlers[this.content.index]; // 获取当前审核人,这个是循环任务,有多个审核人依次审核
  110. let result = this.content.output[this.content.index]; // 来自于审核人表单结果
  111. if (result.pass) { // 如果审核通过
  112. await this.environment.services.gen_remind_task(owner.id, `${checker.name}已批准立项`,
  113. '&lt;b&gt;' + checker.name + '&lt;/b&gt;已于 &lt;b&gt;' + this.environment.services.get_datetime() + '&lt;/b&gt; 批准立项。审核意见如下:&lt;br&gt;' + result.opinion);
  114. await this.environment.services.logger(checker.id, checker.name, '批准立项,审核意见:' + result.opinion);
  115. } else {
  116. await this.environment.services.gen_remind_task(owner.id, `${checker.name}已驳回立项`,
  117. '&lt;b&gt;' + checker.name + '&lt;/b&gt;已于 &lt;b&gt;' + this.environment.services.get_datetime() + '&lt;/b&gt; 驳回立项。审核意见如下:&lt;br&gt;' + result.opinion);
  118. await this.environment.services.logger(checker.id, checker.name, '驳回立项,审核意见:&lt;span style="color: red;"&gt;' + result.opinion + '&lt;/span&gt;');
  119. }
  120. } catch (e) {
  121. this.environment.Logger('work').error(e);
  122. }
  123. })();
  124. </camunda:script>
  125. </camunda:executionListener>
  126. </bpmn2:extensionElements>
  127. <bpmn2:incoming>Flow_0jpbzcr</bpmn2:incoming>
  128. <bpmn2:outgoing>Flow_193tusd</bpmn2:outgoing>
  129. <bpmn2:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="${content.handlers}" camunda:elementVariable="handler">
  130. <bpmn2:loopCardinality xsi:type="bpmn2:tFormalExpression">${content.handlers.length}</bpmn2:loopCardinality>
  131. <bpmn2:completionCondition xsi:type="bpmn2:tFormalExpression">${!content.output.pass}</bpmn2:completionCondition>
  132. </bpmn2:multiInstanceLoopCharacteristics>
  133. </bpmn2:userTask>
  134. <bpmn2:exclusiveGateway id="gateway_approved" default="Flow_0nwaga3">
  135. <bpmn2:incoming>Flow_193tusd</bpmn2:incoming>
  136. <bpmn2:outgoing>Flow_0zubkyw</bpmn2:outgoing>
  137. <bpmn2:outgoing>Flow_0nwaga3</bpmn2:outgoing>
  138. </bpmn2:exclusiveGateway>
  139. <bpmn2:sequenceFlow id="Flow_193tusd" sourceRef="task_approve" targetRef="gateway_approved" />
  140. <bpmn2:sequenceFlow id="Flow_0zubkyw" name="通过" sourceRef="gateway_approved" targetRef="event_throw_approved">
  141. <bpmn2:extensionElements>
  142. <camunda:properties>
  143. <camunda:property name="prj_phase" value="created" />
  144. <camunda:property name="prj_phase_name" value="审核通过" />
  145. </camunda:properties>
  146. </bpmn2:extensionElements>
  147. <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="JavaScript">next(null, this.environment.variables.pass===true);</bpmn2:conditionExpression>
  148. </bpmn2:sequenceFlow>
  149. <bpmn2:sequenceFlow id="Flow_0nwaga3" name="驳回" sourceRef="gateway_approved" targetRef="event_throw_approved_back">
  150. <bpmn2:extensionElements>
  151. <camunda:properties>
  152. <camunda:property name="prj_phase" value="reject_create" />
  153. <camunda:property name="prj_phase_name" value="立项审请被驳回" />
  154. </camunda:properties>
  155. </bpmn2:extensionElements>
  156. </bpmn2:sequenceFlow>
  157. <bpmn2:userTask id="task_with_draw" name="撤回立项" camunda:assignee="owner">
  158. <bpmn2:extensionElements>
  159. <camunda:inputOutput>
  160. <camunda:inputParameter name="process_type">${1}</camunda:inputParameter>
  161. </camunda:inputOutput>
  162. <camunda:executionListener event="end">
  163. <camunda:script scriptFormat="JavaScript">
  164. (async function() {
  165. try{
  166. let owner = await this.environment.services.owner(); // 获取任务责任人
  167. if (!owner) {
  168. await this.environment.services.gen_warn_task('admin', '立项申请被撤回时未找到负责人',
  169. `立项申请被撤回时未找到负责人,流程出错。case id: ${this.environment.variables.id}`);
  170. }
  171. await this.environment.services.gen_remind_task(owner.id, '立项申请已被撤回',
  172. owner.name+'已于 ' + this.environment.services.get_datetime() + ' 撤回立项申请。');
  173. await this.environment.services.logger(owner.id, owner.name, `撤回了立项申请。`);
  174. } catch(e){
  175. this.environment.Logger('work').error(e);
  176. }
  177. })();
  178. </camunda:script>
  179. </camunda:executionListener>
  180. </bpmn2:extensionElements>
  181. <bpmn2:incoming>Flow_12nug8s</bpmn2:incoming>
  182. <bpmn2:outgoing>Flow_0tj9nd6</bpmn2:outgoing>
  183. </bpmn2:userTask>
  184. <bpmn2:sequenceFlow id="Flow_0tj9nd6" sourceRef="task_with_draw" targetRef="Event_throw_withdraw">
  185. <bpmn2:extensionElements />
  186. </bpmn2:sequenceFlow>
  187. <bpmn2:boundaryEvent id="Event_catch_withdraw" name="撤回" attachedToRef="task_approve">
  188. <bpmn2:outgoing>Flow_0nzbvpg</bpmn2:outgoing>
  189. <bpmn2:signalEventDefinition id="SignalEventDefinition_111s194" signalRef="Signal_0hhmd7l" />
  190. </bpmn2:boundaryEvent>
  191. <bpmn2:intermediateThrowEvent id="Event_throw_withdraw" name="撤回事件">
  192. <bpmn2:incoming>Flow_0tj9nd6</bpmn2:incoming>
  193. <bpmn2:signalEventDefinition id="SignalEventDefinition_1tt7p06" signalRef="Signal_0hhmd7l" />
  194. </bpmn2:intermediateThrowEvent>
  195. <bpmn2:sequenceFlow id="Flow_02taytj" sourceRef="event_throw_approved" targetRef="task_set_owner">
  196. <bpmn2:extensionElements />
  197. </bpmn2:sequenceFlow>
  198. <bpmn2:intermediateThrowEvent id="event_throw_approved">
  199. <bpmn2:incoming>Flow_0zubkyw</bpmn2:incoming>
  200. <bpmn2:outgoing>Flow_02taytj</bpmn2:outgoing>
  201. <bpmn2:signalEventDefinition id="SignalEventDefinition_07jfo4t" signalRef="Signal_0828f9d" />
  202. </bpmn2:intermediateThrowEvent>
  203. <bpmn2:sequenceFlow id="Flow_1ucg773" sourceRef="event_catch_approved" targetRef="Event_end" />
  204. <bpmn2:boundaryEvent id="event_catch_approved" name="已审核" attachedToRef="task_with_draw">
  205. <bpmn2:outgoing>Flow_1ucg773</bpmn2:outgoing>
  206. <bpmn2:signalEventDefinition id="SignalEventDefinition_02ri5rf" signalRef="Signal_0828f9d" />
  207. </bpmn2:boundaryEvent>
  208. <bpmn2:intermediateThrowEvent id="event_throw_approved_back" name="已审核事件">
  209. <bpmn2:incoming>Flow_0nwaga3</bpmn2:incoming>
  210. <bpmn2:outgoing>Flow_06cxzjx</bpmn2:outgoing>
  211. <bpmn2:signalEventDefinition id="SignalEventDefinition_0y27jk5" signalRef="Signal_0828f9d" />
  212. </bpmn2:intermediateThrowEvent>
  213. <bpmn2:sequenceFlow id="Flow_1t45qnv" sourceRef="task_modify" targetRef="task_request" />
  214. <bpmn2:sequenceFlow id="Flow_0nzbvpg" sourceRef="Event_catch_withdraw" targetRef="Activity_1ga5o6o">
  215. <bpmn2:extensionElements>
  216. <camunda:properties>
  217. <camunda:property name="prj_phase" value="new" />
  218. <camunda:property name="prj_phase_name" value="立项申请已撤回" />
  219. </camunda:properties>
  220. </bpmn2:extensionElements>
  221. </bpmn2:sequenceFlow>
  222. <bpmn2:sequenceFlow id="Flow_06cxzjx" sourceRef="event_throw_approved_back" targetRef="task_place_on_file_reject" />
  223. <bpmn2:manualTask id="task_create" name="创建项目">
  224. <bpmn2:incoming>Flow_15zn1tu</bpmn2:incoming>
  225. <bpmn2:outgoing>Flow_0gyvyyo</bpmn2:outgoing>
  226. </bpmn2:manualTask>
  227. <bpmn2:sequenceFlow id="Flow_0gyvyyo" sourceRef="task_create" targetRef="task_request">
  228. <bpmn2:extensionElements />
  229. </bpmn2:sequenceFlow>
  230. <bpmn2:manualTask id="task_modify" name="修改项目信息">
  231. <bpmn2:extensionElements />
  232. <bpmn2:incoming>Flow_01n3edp</bpmn2:incoming>
  233. <bpmn2:incoming>Flow_0sb2avy</bpmn2:incoming>
  234. <bpmn2:incoming>Flow_0ipuk5f</bpmn2:incoming>
  235. <bpmn2:outgoing>Flow_1t45qnv</bpmn2:outgoing>
  236. </bpmn2:manualTask>
  237. <bpmn2:endEvent id="Event_end">
  238. <bpmn2:incoming>Flow_1ucg773</bpmn2:incoming>
  239. <bpmn2:incoming>Flow_0if8for</bpmn2:incoming>
  240. </bpmn2:endEvent>
  241. <bpmn2:sequenceFlow id="Flow_01ekshh" sourceRef="Activity_16s6waw" targetRef="Gateway_00icdjr" />
  242. <bpmn2:scriptTask id="Activity_16s6waw" name="检查审核人是否存在" scriptFormat="JavaScript">
  243. <bpmn2:incoming>Flow_1rg4oob</bpmn2:incoming>
  244. <bpmn2:outgoing>Flow_01ekshh</bpmn2:outgoing>
  245. <bpmn2:script>
  246. this.environment.services.get_handlers('project_checker').then((handlers) =&gt; {
  247. this.environment.variables.checkers_ok = handlers.length &gt; 0 ? true: false;
  248. next();
  249. });</bpmn2:script>
  250. </bpmn2:scriptTask>
  251. <bpmn2:exclusiveGateway id="Gateway_00icdjr" default="Flow_10qwx33">
  252. <bpmn2:incoming>Flow_01ekshh</bpmn2:incoming>
  253. <bpmn2:outgoing>Flow_0a0l2t3</bpmn2:outgoing>
  254. <bpmn2:outgoing>Flow_10qwx33</bpmn2:outgoing>
  255. </bpmn2:exclusiveGateway>
  256. <bpmn2:sequenceFlow id="Flow_0a0l2t3" name="已设置审核组成员" sourceRef="Gateway_00icdjr" targetRef="Gateway_1hhlhsh">
  257. <bpmn2:extensionElements>
  258. <camunda:properties>
  259. <camunda:property name="prj_phase" value="apply_create" />
  260. <camunda:property name="prj_phase_name" value="申请立项中" />
  261. </camunda:properties>
  262. </bpmn2:extensionElements>
  263. <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="JavaScript">next(null, this.environment.variables.checkers_ok===true);</bpmn2:conditionExpression>
  264. </bpmn2:sequenceFlow>
  265. <bpmn2:sequenceFlow id="Flow_10qwx33" sourceRef="Gateway_00icdjr" targetRef="Activity_0zp61jx" />
  266. <bpmn2:sequenceFlow id="Flow_01n3edp" sourceRef="Activity_0zp61jx" targetRef="task_modify" />
  267. <bpmn2:scriptTask id="Activity_0zp61jx" name="提醒设置审核组成员" scriptFormat="JavaScript">
  268. <bpmn2:incoming>Flow_10qwx33</bpmn2:incoming>
  269. <bpmn2:outgoing>Flow_01n3edp</bpmn2:outgoing>
  270. <bpmn2:script>try{
  271. this.environment.services.get_handlers('owner').then((handlers) =&gt; {
  272. for (var i = 0; i &lt; handlers.length; i++) {
  273. this.environment.services.gen_remind_task(handlers[i].id, '提醒:没有配置审核组成员', '立项申请前,请先配置审核组成员,否则无法执行立项审核任务。');
  274. }
  275. next();
  276. });
  277. }catch(e){
  278. console.log(e);
  279. }</bpmn2:script>
  280. </bpmn2:scriptTask>
  281. <bpmn2:inclusiveGateway id="Gateway_1hhlhsh">
  282. <bpmn2:incoming>Flow_0a0l2t3</bpmn2:incoming>
  283. <bpmn2:outgoing>Flow_12nug8s</bpmn2:outgoing>
  284. <bpmn2:outgoing>Flow_0jpbzcr</bpmn2:outgoing>
  285. </bpmn2:inclusiveGateway>
  286. <bpmn2:sequenceFlow id="Flow_12nug8s" sourceRef="Gateway_1hhlhsh" targetRef="task_with_draw" />
  287. <bpmn2:sequenceFlow id="Flow_0jpbzcr" sourceRef="Gateway_1hhlhsh" targetRef="task_approve">
  288. <bpmn2:extensionElements>
  289. <camunda:properties>
  290. <camunda:property name="prj_phase" value="overview_create" />
  291. <camunda:property name="prj_phase_name" value="立项审核中" />
  292. </camunda:properties>
  293. </bpmn2:extensionElements>
  294. </bpmn2:sequenceFlow>
  295. <bpmn2:sequenceFlow id="Flow_0sb2avy" sourceRef="task_place_on_file_reject" targetRef="task_modify" />
  296. <bpmn2:scriptTask id="task_place_on_file_reject" name="归档审核未通过的立项文件" scriptFormat="Javascript">
  297. <bpmn2:incoming>Flow_06cxzjx</bpmn2:incoming>
  298. <bpmn2:outgoing>Flow_0sb2avy</bpmn2:outgoing>
  299. <bpmn2:script>try{
  300. let files = this.environment.output.task_request.files;
  301. if (files) {
  302. this.environment.services.place_on_files(files, "立项驳回").then(()=&gt; next());
  303. } else {
  304. next();
  305. }
  306. } catch(e){
  307. this.environment.Logger('work').error(e);
  308. next();
  309. }</bpmn2:script>
  310. </bpmn2:scriptTask>
  311. <bpmn2:sequenceFlow id="Flow_0if8for" sourceRef="Activity_10dmh6u" targetRef="Event_end" />
  312. <bpmn2:scriptTask id="Activity_10dmh6u" name="归档审核通过的立项文件" scriptFormat="JavaScript">
  313. <bpmn2:incoming>Flow_07g8vvu</bpmn2:incoming>
  314. <bpmn2:outgoing>Flow_0if8for</bpmn2:outgoing>
  315. <bpmn2:script>try{
  316. let files = this.environment.output.task_request.files;
  317. if (files) {
  318. this.environment.services.place_on_files(files, "立项通过", "project_set_up").then(()=&gt; next());
  319. } else {
  320. next();
  321. }
  322. }catch(e){
  323. next();
  324. }</bpmn2:script>
  325. </bpmn2:scriptTask>
  326. <bpmn2:sequenceFlow id="Flow_0ipuk5f" sourceRef="Activity_1ga5o6o" targetRef="task_modify" />
  327. <bpmn2:scriptTask id="Activity_1ga5o6o" name="归档撤回的立项文件" scriptFormat="JavaScript">
  328. <bpmn2:incoming>Flow_0nzbvpg</bpmn2:incoming>
  329. <bpmn2:outgoing>Flow_0ipuk5f</bpmn2:outgoing>
  330. <bpmn2:script>try{
  331. let files = this.environment.output.task_request.files;
  332. if (files) {
  333. this.environment.services.place_on_files(files, "主动撤回").then(()=&gt; next());
  334. } else {
  335. next();
  336. }
  337. } catch(e){
  338. this.environment.Logger('work').error(e);
  339. next();
  340. }</bpmn2:script>
  341. </bpmn2:scriptTask>
  342. <bpmn2:sequenceFlow id="Flow_07g8vvu" sourceRef="task_set_owner" targetRef="Activity_10dmh6u" />
  343. <bpmn2:scriptTask id="task_set_owner" scriptFormat="JavaScript">
  344. <bpmn2:documentation>设置项目负责人</bpmn2:documentation>
  345. <bpmn2:incoming>Flow_02taytj</bpmn2:incoming>
  346. <bpmn2:outgoing>Flow_07g8vvu</bpmn2:outgoing>
  347. <bpmn2:script>
  348. (async function () {
  349. // 从审核时提交的表单中得到项目负责人,并设置
  350. try {
  351. await this.environment.services.set_leader(this.environment.variables.leader_id);
  352. } catch (e) {
  353. this.environment.Logger('work').error(e);
  354. }
  355. next();
  356. })();
  357. </bpmn2:script>
  358. </bpmn2:scriptTask>
  359. </bpmn2:process>
  360. <bpmn2:signal id="Signal_0hhmd7l" name="cancel_sign" />
  361. <bpmn2:message id="Message_0fh9t3e" name="msg_cancel" />
  362. <bpmn2:message id="Message_1qtzp8g" name="Message_0q7qbc4" />
  363. <bpmn2:signal id="Signal_0828f9d" name="Signal_2sf6vik" />
  364. <bpmndi:BPMNDiagram id="BPMNDiagram_1">
  365. <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ProcessProjectApprove">
  366. <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="event_start">
  367. <dc:Bounds x="152" y="212" width="36" height="36" />
  368. </bpmndi:BPMNShape>
  369. <bpmndi:BPMNShape id="Activity_09wmdbt_di" bpmnElement="task_request">
  370. <dc:Bounds x="380" y="190" width="100" height="80" />
  371. <bpmndi:BPMNLabel />
  372. </bpmndi:BPMNShape>
  373. <bpmndi:BPMNShape id="Activity_0ds6ym0_di" bpmnElement="task_approve">
  374. <dc:Bounds x="858" y="280" width="100" height="80" />
  375. <bpmndi:BPMNLabel />
  376. </bpmndi:BPMNShape>
  377. <bpmndi:BPMNShape id="Gateway_06baw71_di" bpmnElement="gateway_approved" isMarkerVisible="true">
  378. <dc:Bounds x="1115" y="295" width="50" height="50" />
  379. </bpmndi:BPMNShape>
  380. <bpmndi:BPMNShape id="Activity_0fonc56_di" bpmnElement="task_with_draw">
  381. <dc:Bounds x="870" y="80" width="100" height="80" />
  382. <bpmndi:BPMNLabel />
  383. </bpmndi:BPMNShape>
  384. <bpmndi:BPMNShape id="Event_0mceau4_di" bpmnElement="Event_throw_withdraw">
  385. <dc:Bounds x="1112" y="102" width="36" height="36" />
  386. <bpmndi:BPMNLabel>
  387. <dc:Bounds x="1108" y="78" width="44" height="14" />
  388. </bpmndi:BPMNLabel>
  389. </bpmndi:BPMNShape>
  390. <bpmndi:BPMNShape id="Event_0tntlum_di" bpmnElement="event_throw_approved">
  391. <dc:Bounds x="1202" y="302" width="36" height="36" />
  392. <bpmndi:BPMNLabel>
  393. <dc:Bounds x="1233" y="235" width="55" height="14" />
  394. </bpmndi:BPMNLabel>
  395. </bpmndi:BPMNShape>
  396. <bpmndi:BPMNShape id="Event_1gjhb1n_di" bpmnElement="event_throw_approved_back">
  397. <dc:Bounds x="1122" y="392" width="36" height="36" />
  398. <bpmndi:BPMNLabel>
  399. <dc:Bounds x="1162" y="403" width="55" height="14" />
  400. </bpmndi:BPMNLabel>
  401. </bpmndi:BPMNShape>
  402. <bpmndi:BPMNShape id="Activity_0isolrc_di" bpmnElement="task_create">
  403. <dc:Bounds x="230" y="190" width="100" height="80" />
  404. <bpmndi:BPMNLabel />
  405. </bpmndi:BPMNShape>
  406. <bpmndi:BPMNShape id="Activity_1k7kq2t_di" bpmnElement="task_modify">
  407. <dc:Bounds x="490" y="410" width="100" height="80" />
  408. </bpmndi:BPMNShape>
  409. <bpmndi:BPMNShape id="Event_1jljt88_di" bpmnElement="Event_end">
  410. <dc:Bounds x="1632" y="302" width="36" height="36" />
  411. </bpmndi:BPMNShape>
  412. <bpmndi:BPMNShape id="Activity_0kc4efu_di" bpmnElement="Activity_16s6waw">
  413. <dc:Bounds x="510" y="190" width="100" height="80" />
  414. </bpmndi:BPMNShape>
  415. <bpmndi:BPMNShape id="Gateway_00icdjr_di" bpmnElement="Gateway_00icdjr" isMarkerVisible="true">
  416. <dc:Bounds x="655" y="205" width="50" height="50" />
  417. </bpmndi:BPMNShape>
  418. <bpmndi:BPMNShape id="Activity_0qvsyb4_di" bpmnElement="Activity_0zp61jx">
  419. <dc:Bounds x="630" y="280" width="100" height="80" />
  420. </bpmndi:BPMNShape>
  421. <bpmndi:BPMNShape id="Gateway_06flgld_di" bpmnElement="Gateway_1hhlhsh">
  422. <dc:Bounds x="765" y="155" width="50" height="50" />
  423. </bpmndi:BPMNShape>
  424. <bpmndi:BPMNShape id="Activity_0hdmx5i_di" bpmnElement="task_place_on_file_reject">
  425. <dc:Bounds x="860" y="540" width="100" height="80" />
  426. <bpmndi:BPMNLabel />
  427. </bpmndi:BPMNShape>
  428. <bpmndi:BPMNShape id="Activity_04s4p12_di" bpmnElement="Activity_10dmh6u">
  429. <dc:Bounds x="1500" y="280" width="100" height="80" />
  430. </bpmndi:BPMNShape>
  431. <bpmndi:BPMNShape id="Activity_1k1mf96_di" bpmnElement="Activity_1ga5o6o">
  432. <dc:Bounds x="770" y="400" width="100" height="80" />
  433. <bpmndi:BPMNLabel />
  434. </bpmndi:BPMNShape>
  435. <bpmndi:BPMNShape id="Activity_1cu0e92_di" bpmnElement="task_set_owner">
  436. <dc:Bounds x="1300" y="280" width="100" height="80" />
  437. </bpmndi:BPMNShape>
  438. <bpmndi:BPMNShape id="Event_06bs6js_di" bpmnElement="event_catch_approved">
  439. <dc:Bounds x="912" y="142" width="36" height="36" />
  440. <bpmndi:BPMNLabel>
  441. <dc:Bounds x="943" y="173" width="33" height="14" />
  442. </bpmndi:BPMNLabel>
  443. </bpmndi:BPMNShape>
  444. <bpmndi:BPMNShape id="Event_0s1xb2l_di" bpmnElement="Event_catch_withdraw">
  445. <dc:Bounds x="920" y="342" width="36" height="36" />
  446. <bpmndi:BPMNLabel>
  447. <dc:Bounds x="947" y="378" width="22" height="14" />
  448. </bpmndi:BPMNLabel>
  449. </bpmndi:BPMNShape>
  450. <bpmndi:BPMNEdge id="Flow_15zn1tu_di" bpmnElement="Flow_15zn1tu">
  451. <di:waypoint x="188" y="230" />
  452. <di:waypoint x="230" y="230" />
  453. </bpmndi:BPMNEdge>
  454. <bpmndi:BPMNEdge id="Flow_1rg4oob_di" bpmnElement="Flow_1rg4oob">
  455. <di:waypoint x="480" y="230" />
  456. <di:waypoint x="510" y="230" />
  457. </bpmndi:BPMNEdge>
  458. <bpmndi:BPMNEdge id="Flow_193tusd_di" bpmnElement="Flow_193tusd">
  459. <di:waypoint x="958" y="320" />
  460. <di:waypoint x="1115" y="320" />
  461. </bpmndi:BPMNEdge>
  462. <bpmndi:BPMNEdge id="Flow_0zubkyw_di" bpmnElement="Flow_0zubkyw">
  463. <di:waypoint x="1165" y="320" />
  464. <di:waypoint x="1202" y="320" />
  465. <bpmndi:BPMNLabel>
  466. <dc:Bounds x="1173" y="302" width="22" height="14" />
  467. </bpmndi:BPMNLabel>
  468. </bpmndi:BPMNEdge>
  469. <bpmndi:BPMNEdge id="Flow_0nwaga3_di" bpmnElement="Flow_0nwaga3">
  470. <di:waypoint x="1140" y="345" />
  471. <di:waypoint x="1140" y="392" />
  472. <bpmndi:BPMNLabel>
  473. <dc:Bounds x="1144" y="353" width="22" height="14" />
  474. </bpmndi:BPMNLabel>
  475. </bpmndi:BPMNEdge>
  476. <bpmndi:BPMNEdge id="Flow_0tj9nd6_di" bpmnElement="Flow_0tj9nd6">
  477. <di:waypoint x="970" y="120" />
  478. <di:waypoint x="1112" y="120" />
  479. </bpmndi:BPMNEdge>
  480. <bpmndi:BPMNEdge id="Flow_02taytj_di" bpmnElement="Flow_02taytj">
  481. <di:waypoint x="1238" y="320" />
  482. <di:waypoint x="1300" y="320" />
  483. </bpmndi:BPMNEdge>
  484. <bpmndi:BPMNEdge id="Flow_1ucg773_di" bpmnElement="Flow_1ucg773">
  485. <di:waypoint x="930" y="178" />
  486. <di:waypoint x="930" y="240" />
  487. <di:waypoint x="1650" y="240" />
  488. <di:waypoint x="1650" y="302" />
  489. </bpmndi:BPMNEdge>
  490. <bpmndi:BPMNEdge id="Flow_1t45qnv_di" bpmnElement="Flow_1t45qnv">
  491. <di:waypoint x="540" y="410" />
  492. <di:waypoint x="540" y="385" />
  493. <di:waypoint x="450" y="385" />
  494. <di:waypoint x="450" y="270" />
  495. </bpmndi:BPMNEdge>
  496. <bpmndi:BPMNEdge id="Flow_0nzbvpg_di" bpmnElement="Flow_0nzbvpg">
  497. <di:waypoint x="938" y="378" />
  498. <di:waypoint x="938" y="440" />
  499. <di:waypoint x="870" y="440" />
  500. </bpmndi:BPMNEdge>
  501. <bpmndi:BPMNEdge id="Flow_06cxzjx_di" bpmnElement="Flow_06cxzjx">
  502. <di:waypoint x="1140" y="428" />
  503. <di:waypoint x="1140" y="580" />
  504. <di:waypoint x="960" y="580" />
  505. </bpmndi:BPMNEdge>
  506. <bpmndi:BPMNEdge id="Flow_0gyvyyo_di" bpmnElement="Flow_0gyvyyo">
  507. <di:waypoint x="330" y="230" />
  508. <di:waypoint x="380" y="230" />
  509. </bpmndi:BPMNEdge>
  510. <bpmndi:BPMNEdge id="Flow_01ekshh_di" bpmnElement="Flow_01ekshh">
  511. <di:waypoint x="610" y="230" />
  512. <di:waypoint x="655" y="230" />
  513. </bpmndi:BPMNEdge>
  514. <bpmndi:BPMNEdge id="Flow_0a0l2t3_di" bpmnElement="Flow_0a0l2t3">
  515. <di:waypoint x="680" y="205" />
  516. <di:waypoint x="680" y="180" />
  517. <di:waypoint x="765" y="180" />
  518. <bpmndi:BPMNLabel>
  519. <dc:Bounds x="680" y="162" width="88" height="14" />
  520. </bpmndi:BPMNLabel>
  521. </bpmndi:BPMNEdge>
  522. <bpmndi:BPMNEdge id="Flow_10qwx33_di" bpmnElement="Flow_10qwx33">
  523. <di:waypoint x="680" y="255" />
  524. <di:waypoint x="680" y="280" />
  525. </bpmndi:BPMNEdge>
  526. <bpmndi:BPMNEdge id="Flow_01n3edp_di" bpmnElement="Flow_01n3edp">
  527. <di:waypoint x="680" y="360" />
  528. <di:waypoint x="680" y="430" />
  529. <di:waypoint x="590" y="430" />
  530. </bpmndi:BPMNEdge>
  531. <bpmndi:BPMNEdge id="Flow_12nug8s_di" bpmnElement="Flow_12nug8s">
  532. <di:waypoint x="790" y="155" />
  533. <di:waypoint x="790" y="110" />
  534. <di:waypoint x="870" y="110" />
  535. </bpmndi:BPMNEdge>
  536. <bpmndi:BPMNEdge id="Flow_0jpbzcr_di" bpmnElement="Flow_0jpbzcr">
  537. <di:waypoint x="790" y="205" />
  538. <di:waypoint x="790" y="320" />
  539. <di:waypoint x="858" y="320" />
  540. </bpmndi:BPMNEdge>
  541. <bpmndi:BPMNEdge id="Flow_0sb2avy_di" bpmnElement="Flow_0sb2avy">
  542. <di:waypoint x="860" y="580" />
  543. <di:waypoint x="725" y="580" />
  544. <di:waypoint x="725" y="450" />
  545. <di:waypoint x="590" y="450" />
  546. </bpmndi:BPMNEdge>
  547. <bpmndi:BPMNEdge id="Flow_0if8for_di" bpmnElement="Flow_0if8for">
  548. <di:waypoint x="1600" y="320" />
  549. <di:waypoint x="1632" y="320" />
  550. </bpmndi:BPMNEdge>
  551. <bpmndi:BPMNEdge id="Flow_0ipuk5f_di" bpmnElement="Flow_0ipuk5f">
  552. <di:waypoint x="770" y="440" />
  553. <di:waypoint x="590" y="440" />
  554. </bpmndi:BPMNEdge>
  555. <bpmndi:BPMNEdge id="Flow_07g8vvu_di" bpmnElement="Flow_07g8vvu">
  556. <di:waypoint x="1400" y="320" />
  557. <di:waypoint x="1500" y="320" />
  558. </bpmndi:BPMNEdge>
  559. </bpmndi:BPMNPlane>
  560. </bpmndi:BPMNDiagram>
  561. </bpmn2:definitions>