ExpenseProcess.bpmn20.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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"
  3. xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
  4. xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
  5. typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
  6. targetNamespace="http://www.flowable.org/processdef">
  7. <process id="Expense" name="ExpenseProcess" isExecutable="true">
  8. <documentation>报销流程</documentation>
  9. <startEvent id="start" name="开始"></startEvent>
  10. <userTask id="fillTask" name="出差报销" flowable:assignee="${taskUser}">
  11. <extensionElements>
  12. <modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler">
  13. <![CDATA[false]]></modeler:initiator-can-complete>
  14. </extensionElements>
  15. </userTask>
  16. <exclusiveGateway id="judgeTask"></exclusiveGateway>
  17. <userTask id="directorTak" name="经理审批">
  18. <extensionElements>
  19. <flowable:taskListener event="create"
  20. class="org.example.Handler.ManagerTaskHandler"></flowable:taskListener>
  21. </extensionElements>
  22. </userTask>
  23. <userTask id="bossTask" name="老板审批">
  24. <extensionElements>
  25. <flowable:taskListener event="create"
  26. class="org.example.Handler.BossTaskHandler"></flowable:taskListener>
  27. </extensionElements>
  28. </userTask>
  29. <endEvent id="end" name="结束"></endEvent>
  30. <sequenceFlow id="flow1" sourceRef="start" targetRef="fillTask"></sequenceFlow>
  31. <sequenceFlow id="flow2" sourceRef="fillTask" targetRef="judgeTask"></sequenceFlow>
  32. <sequenceFlow id="judgeMore" name="大于500元" sourceRef="judgeTask" targetRef="bossTask">
  33. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${money > 500}]]></conditionExpression>
  34. </sequenceFlow>
  35. <sequenceFlow id="bossPassFlow" name="通过" sourceRef="bossTask" targetRef="end">
  36. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${outcome=='通过'}]]></conditionExpression>
  37. </sequenceFlow>
  38. <sequenceFlow id="bossNotPassFlow" name="驳回" sourceRef="bossTask" targetRef="fillTask">
  39. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${outcome=='驳回'}]]></conditionExpression>
  40. </sequenceFlow>
  41. <sequenceFlow id="judgeLess" name="小于500元" sourceRef="judgeTask" targetRef="directorTak">
  42. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${money <= 500}]]></conditionExpression>
  43. </sequenceFlow>
  44. <sequenceFlow id="directorPassFlow" name="通过" sourceRef="directorTak" targetRef="end">
  45. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${outcome=='通过'}]]></conditionExpression>
  46. </sequenceFlow>
  47. <sequenceFlow id="directorNotPassFlow" name="驳回" sourceRef="directorTak" targetRef="fillTask">
  48. <conditionExpression xsi:type="tFormalExpression"><![CDATA[${outcome=='驳回'}]]></conditionExpression>
  49. </sequenceFlow>
  50. </process>
  51. <!-- 如果使用图形化建模工具,实际的XML文件还将包含“可视化部分”,用于描述图形信息,
  52. 如流程定义中各个元素的坐标(所有的图形化信息包含在XML的BPMNDiagram标签中,作为definitions标签的子元素) -->
  53. <bpmndi:BPMNDiagram id="BPMNDiagram_Expense">
  54. <bpmndi:BPMNPlane bpmnElement="Expense" id="BPMNPlane_Expense">
  55. <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
  56. <omgdc:Bounds height="30.0" width="30.0" x="285.0" y="135.0"></omgdc:Bounds>
  57. </bpmndi:BPMNShape>
  58. <bpmndi:BPMNShape bpmnElement="fillTask" id="BPMNShape_fillTask">
  59. <omgdc:Bounds height="80.0" width="100.0" x="405.0" y="110.0"></omgdc:Bounds>
  60. </bpmndi:BPMNShape>
  61. <bpmndi:BPMNShape bpmnElement="judgeTask" id="BPMNShape_judgeTask">
  62. <omgdc:Bounds height="40.0" width="40.0" x="585.0" y="130.0"></omgdc:Bounds>
  63. </bpmndi:BPMNShape>
  64. <bpmndi:BPMNShape bpmnElement="directorTak" id="BPMNShape_directorTak">
  65. <omgdc:Bounds height="80.0" width="100.0" x="735.0" y="110.0"></omgdc:Bounds>
  66. </bpmndi:BPMNShape>
  67. <bpmndi:BPMNShape bpmnElement="bossTask" id="BPMNShape_bossTask">
  68. <omgdc:Bounds height="80.0" width="100.0" x="555.0" y="255.0"></omgdc:Bounds>
  69. </bpmndi:BPMNShape>
  70. <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
  71. <omgdc:Bounds height="28.0" width="28.0" x="771.0" y="281.0"></omgdc:Bounds>
  72. </bpmndi:BPMNShape>
  73. <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
  74. <omgdi:waypoint x="315.0" y="150.0"></omgdi:waypoint>
  75. <omgdi:waypoint x="405.0" y="150.0"></omgdi:waypoint>
  76. </bpmndi:BPMNEdge>
  77. <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
  78. <omgdi:waypoint x="505.0" y="150.16611295681062"></omgdi:waypoint>
  79. <omgdi:waypoint x="585.4333333333333" y="150.43333333333334"></omgdi:waypoint>
  80. </bpmndi:BPMNEdge>
  81. <bpmndi:BPMNEdge bpmnElement="judgeLess" id="BPMNEdge_judgeLess">
  82. <omgdi:waypoint x="624.5530726256983" y="150.44692737430168"></omgdi:waypoint>
  83. <omgdi:waypoint x="735.0" y="150.1392757660167"></omgdi:waypoint>
  84. </bpmndi:BPMNEdge>
  85. <bpmndi:BPMNEdge bpmnElement="directorNotPassFlow" id="BPMNEdge_directorNotPassFlow">
  86. <omgdi:waypoint x="785.0" y="110.0"></omgdi:waypoint>
  87. <omgdi:waypoint x="785.0" y="37.0"></omgdi:waypoint>
  88. <omgdi:waypoint x="455.0" y="37.0"></omgdi:waypoint>
  89. <omgdi:waypoint x="455.0" y="110.0"></omgdi:waypoint>
  90. </bpmndi:BPMNEdge>
  91. <bpmndi:BPMNEdge bpmnElement="bossPassFlow" id="BPMNEdge_bossPassFlow">
  92. <omgdi:waypoint x="655.0" y="295.0"></omgdi:waypoint>
  93. <omgdi:waypoint x="771.0" y="295.0"></omgdi:waypoint>
  94. </bpmndi:BPMNEdge>
  95. <bpmndi:BPMNEdge bpmnElement="judgeMore" id="BPMNEdge_judgeMore">
  96. <omgdi:waypoint x="605.4340277777778" y="169.56597222222223"></omgdi:waypoint>
  97. <omgdi:waypoint x="605.1384083044983" y="255.0"></omgdi:waypoint>
  98. </bpmndi:BPMNEdge>
  99. <bpmndi:BPMNEdge bpmnElement="directorPassFlow" id="BPMNEdge_directorPassFlow">
  100. <omgdi:waypoint x="785.0" y="190.0"></omgdi:waypoint>
  101. <omgdi:waypoint x="785.0" y="281.0"></omgdi:waypoint>
  102. </bpmndi:BPMNEdge>
  103. <bpmndi:BPMNEdge bpmnElement="bossNotPassFlow" id="BPMNEdge_bossNotPassFlow">
  104. <omgdi:waypoint x="555.0" y="295.0"></omgdi:waypoint>
  105. <omgdi:waypoint x="455.0" y="295.0"></omgdi:waypoint>
  106. <omgdi:waypoint x="455.0" y="190.0"></omgdi:waypoint>
  107. </bpmndi:BPMNEdge>
  108. </bpmndi:BPMNPlane>
  109. </bpmndi:BPMNDiagram>
  110. </definitions>