Commit d85c74cbece5af3aa9381bd2e67a2a8b59cb3cfc
1 parent
9bf9cf7f
会签
Showing
12 changed files
with
612 additions
and
0 deletions
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/java/cn/iocoder/yudao/module/bpm/MultiInstancesTest.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.bpm; | ||
| 2 | + | ||
| 3 | +import org.flowable.engine.history.HistoricDetail; | ||
| 4 | +import org.flowable.engine.history.HistoricFormProperty; | ||
| 5 | +import org.flowable.engine.history.HistoricProcessInstance; | ||
| 6 | +import org.flowable.engine.history.HistoricVariableUpdate; | ||
| 7 | +import org.flowable.engine.repository.ProcessDefinition; | ||
| 8 | +import org.flowable.engine.runtime.ProcessInstance; | ||
| 9 | +import org.flowable.engine.test.Deployment; | ||
| 10 | +import org.flowable.task.api.Task; | ||
| 11 | +import org.junit.Test; | ||
| 12 | + | ||
| 13 | +import java.text.SimpleDateFormat; | ||
| 14 | +import java.util.*; | ||
| 15 | + | ||
| 16 | +import static org.junit.Assert.assertEquals; | ||
| 17 | +import static org.junit.Assert.assertNotNull; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * @author henryyan | ||
| 21 | + * testMultiInstanceForUserTask 会签 | ||
| 22 | + */ | ||
| 23 | +public class MultiInstancesTest extends AbstractOATest { | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * Java Service多实例(是否顺序结果一样) | ||
| 27 | + */ | ||
| 28 | + @Test | ||
| 29 | + @Deployment(resources = {"diagrams/chapter9/testMultiInstanceFixedNumbers.bpmn"}) | ||
| 30 | + public void testParallel() throws Exception { | ||
| 31 | + Map<String, Object> variables = new HashMap<String, Object>(); | ||
| 32 | + long loop = 3; | ||
| 33 | + variables.put("loop", loop); | ||
| 34 | + variables.put("counter", 0); // 计数器 | ||
| 35 | + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testMultiInstanceFixedNumbers", variables); | ||
| 36 | + Object variable = runtimeService.getVariable(processInstance.getId(), "counter"); | ||
| 37 | + assertEquals(loop, variable); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 用户任务多实例--顺序 | ||
| 42 | + */ | ||
| 43 | + @Test | ||
| 44 | + @Deployment(resources = {"diagrams/chapter9/testMultiInstanceForUserTask.sequential.bpmn"}) | ||
| 45 | + public void testForUserSequence() throws Exception { | ||
| 46 | + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testMultiInstanceForUserTask"); | ||
| 47 | + long count = taskService.createTaskQuery().processInstanceId(processInstance.getId()).count(); | ||
| 48 | + assertEquals(1, count); | ||
| 49 | + | ||
| 50 | + Task task = taskService.createTaskQuery().singleResult(); | ||
| 51 | + taskService.complete(task.getId()); | ||
| 52 | + count = taskService.createTaskQuery().processInstanceId(processInstance.getId()).count(); | ||
| 53 | + assertEquals(1, count); | ||
| 54 | + | ||
| 55 | + task = taskService.createTaskQuery().singleResult(); | ||
| 56 | + taskService.complete(task.getId()); | ||
| 57 | + count = taskService.createTaskQuery().processInstanceId(processInstance.getId()).count(); | ||
| 58 | + assertEquals(1, count); | ||
| 59 | + | ||
| 60 | + task = taskService.createTaskQuery().singleResult(); | ||
| 61 | + taskService.complete(task.getId()); | ||
| 62 | + count = taskService.createTaskQuery().processInstanceId(processInstance.getId()).count(); | ||
| 63 | + assertEquals(0, count); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * 用户任务多实例--并行 | ||
| 68 | + */ | ||
| 69 | + @Test | ||
| 70 | + @Deployment(resources = {"diagrams/chapter9/testMultiInstanceForUserTask.nosequential.bpmn"}) | ||
| 71 | + public void testForUserNoSequential() throws Exception { | ||
| 72 | + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testMultiInstanceForUserTask"); | ||
| 73 | + long count = taskService.createTaskQuery().processInstanceId(processInstance.getId()).count(); | ||
| 74 | + assertEquals(3, count); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * 用户任务多实例,通过用户数量决定实例个数--并行 | ||
| 79 | + */ | ||
| 80 | + @Test | ||
| 81 | + @Deployment(resources = {"diagrams/chapter9/testMultiInstanceForUserTask.users.nosequential.bpmn"}) | ||
| 82 | + public void testForUserCreateByUsersNoSequential() throws Exception { | ||
| 83 | + Map<String, Object> variables = new HashMap<String, Object>(); | ||
| 84 | + List<String> users = Arrays.asList("user1", "user2", "user3"); | ||
| 85 | + variables.put("users", users); | ||
| 86 | + runtimeService.startProcessInstanceByKey("testMultiInstanceForUserTask", variables); | ||
| 87 | + for (String userId : users) { | ||
| 88 | + assertEquals(1, taskService.createTaskQuery().taskAssignee(userId).count()); | ||
| 89 | + } | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 用户任务多实例,通过用户数量决定实例个数--顺序 | ||
| 94 | + */ | ||
| 95 | + @Test | ||
| 96 | + @Deployment(resources = {"diagrams/chapter9/testMultiInstanceForUserTask.users.sequential.bpmn"}) | ||
| 97 | + public void testForUserCreateByUsersSequential() throws Exception { | ||
| 98 | + Map<String, Object> variables = new HashMap<String, Object>(); | ||
| 99 | + List<String> users = Arrays.asList("user1", "user2", "user3"); | ||
| 100 | + variables.put("users", users); | ||
| 101 | + runtimeService.startProcessInstanceByKey("testMultiInstanceForUserTask", variables); | ||
| 102 | + for (String userId : users) { | ||
| 103 | + Task task = taskService.createTaskQuery().taskAssignee(userId).singleResult(); | ||
| 104 | + taskService.complete(task.getId()); | ||
| 105 | + } | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + /** | ||
| 109 | + * 用户任务多实例,按照任务完成的百分比比率决定是否提前结束流程 | ||
| 110 | + */ | ||
| 111 | + @Test | ||
| 112 | + @Deployment(resources = {"diagrams/chapter9/testMultiInstanceForUserTask.users.sequential.with.complete.conditon.bpmn"}) | ||
| 113 | + public void testForUserCreateByUsersSequentialWithCompleteCondition() throws Exception { | ||
| 114 | + Map<String, Object> variables = new HashMap<String, Object>(); | ||
| 115 | + List<String> users = Arrays.asList("user1", "user2", "user3"); | ||
| 116 | + variables.put("users", users); | ||
| 117 | + variables.put("rate", 0.6d); | ||
| 118 | + runtimeService.startProcessInstanceByKey("testMultiInstanceForUserTask", variables); | ||
| 119 | + | ||
| 120 | + Task task = taskService.createTaskQuery().taskAssignee("user1").singleResult(); | ||
| 121 | + taskService.complete(task.getId()); | ||
| 122 | + | ||
| 123 | + task = taskService.createTaskQuery().taskAssignee("user2").singleResult(); | ||
| 124 | + taskService.complete(task.getId()); | ||
| 125 | + | ||
| 126 | + long count = historyService.createHistoricProcessInstanceQuery().finished().count(); | ||
| 127 | + assertEquals(1, count); | ||
| 128 | + | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + /** | ||
| 132 | + * 用户任务多实例,按照任务完成的百分比比率决定是否提前结束流程 | ||
| 133 | + */ | ||
| 134 | + @Test | ||
| 135 | + @Deployment(resources = {"diagrams/chapter9/testMultiInstanceForUserTask.exception.bpmn"}) | ||
| 136 | + public void testForUserCreateByUsersException() throws Exception { | ||
| 137 | + Map<String, Object> variables = new HashMap<String, Object>(); | ||
| 138 | + List<String> users = Arrays.asList("user1", "user2", "user3"); | ||
| 139 | + variables.put("users", users); | ||
| 140 | + runtimeService.startProcessInstanceByKey("testMultiInstanceForUserTask", variables); | ||
| 141 | + | ||
| 142 | + Task task = taskService.createTaskQuery().taskAssignee("user1").singleResult(); | ||
| 143 | + taskService.complete(task.getId()); | ||
| 144 | + | ||
| 145 | + task = taskService.createTaskQuery().taskAssignee("user2").singleResult(); | ||
| 146 | + taskService.complete(task.getId()); | ||
| 147 | + | ||
| 148 | + task = taskService.createTaskQuery().taskAssignee("user3").singleResult(); | ||
| 149 | + taskService.complete(task.getId()); | ||
| 150 | + | ||
| 151 | + List<Task> list = taskService.createTaskQuery().list(); | ||
| 152 | + for (Task task2 : list) { | ||
| 153 | + System.out.println("============" + task2.getName()); | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + } | ||
| 157 | + ///////////////////////////////////////////////// | ||
| 158 | + /** | ||
| 159 | + * 全部通过 | ||
| 160 | + */ | ||
| 161 | + @Test | ||
| 162 | + @Deployment(resources = {"diagrams/chapter9/leave-countersign.bpmn"}) | ||
| 163 | + public void testAllApproved() throws Exception { | ||
| 164 | + Map<String, Object> variables = new HashMap<String, Object>(); | ||
| 165 | + List<String> users = Arrays.asList("groupLeader", "deptLeader", "hr"); | ||
| 166 | + variables.put("users", users); | ||
| 167 | + identityService.setAuthenticatedUserId("henryyan"); | ||
| 168 | + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("leave-countersign", variables); | ||
| 169 | + for (String user : users) { | ||
| 170 | + Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).taskAssignee(user).singleResult(); | ||
| 171 | + Map<String, Object> taskVariables = new HashMap<String, Object>(); | ||
| 172 | + taskVariables.put("approved", "true"); | ||
| 173 | + taskService.complete(task.getId(), taskVariables); | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + Task task = taskService.createTaskQuery().taskAssignee("henryyan").singleResult(); | ||
| 177 | + assertNotNull(task); | ||
| 178 | + assertEquals("销假", task.getName()); | ||
| 179 | + } | ||
| 180 | + | ||
| 181 | + /** | ||
| 182 | + * 部分通过 | ||
| 183 | + */ | ||
| 184 | + @Test | ||
| 185 | + @Deployment(resources = {"diagrams/chapter9/leave-countersign.bpmn"}) | ||
| 186 | + public void testNotAllApproved() throws Exception { | ||
| 187 | + Map<String, Object> variables = new HashMap<String, Object>(); | ||
| 188 | + List<String> users = Arrays.asList("groupLeader", "deptLeader", "hr"); | ||
| 189 | + variables.put("users", users); | ||
| 190 | + identityService.setAuthenticatedUserId("henryyan"); | ||
| 191 | + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("leave-countersign", variables); | ||
| 192 | + for (String user : users) { | ||
| 193 | + Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).taskAssignee(user).singleResult(); | ||
| 194 | + Map<String, Object> taskVariables = new HashMap<String, Object>(); | ||
| 195 | + taskVariables.put("approved", "false"); | ||
| 196 | + taskService.complete(task.getId(), taskVariables); | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + Task task = taskService.createTaskQuery().taskAssignee("henryyan").singleResult(); | ||
| 200 | + assertNotNull(task); | ||
| 201 | + assertEquals("调整申请", task.getName()); | ||
| 202 | + } | ||
| 203 | +} |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/leave-countersign.bpmn
0 → 100644
| 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: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" | ||
| 4 | + xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" | ||
| 5 | + targetNamespace="http://www.activiti.org/test"> | ||
| 6 | + <process id="leave-countersign" name="请假流程-会签" isExecutable="true"> | ||
| 7 | + <documentation>请假流程演示-会签</documentation> | ||
| 8 | + <startEvent id="startevent1" name="Start" activiti:initiator="applyUserId"> | ||
| 9 | + <extensionElements> | ||
| 10 | + <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty> | ||
| 11 | + <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty> | ||
| 12 | + <activiti:formProperty id="reason" name="请假原因" type="string" required="true"></activiti:formProperty> | ||
| 13 | + <activiti:formProperty id="users" name="审批参与人" type="users" required="true"></activiti:formProperty> | ||
| 14 | + <activiti:formProperty id="validScript" type="javascript" default="alert('表单已经加载完毕');"></activiti:formProperty> | ||
| 15 | + </extensionElements> | ||
| 16 | + </startEvent> | ||
| 17 | + <userTask id="countersign" name="[部门/人事]联合会签" activiti:assignee="${user}"> | ||
| 18 | + <extensionElements> | ||
| 19 | + <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty> | ||
| 20 | + <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty> | ||
| 21 | + <activiti:formProperty id="reason" name="请假原因" type="string" writable="false"></activiti:formProperty> | ||
| 22 | + <activiti:formProperty id="approved" name="审批意见" type="enum" required="true"> | ||
| 23 | + <activiti:value id="true" name="同意"></activiti:value> | ||
| 24 | + <activiti:value id="false" name="拒绝"></activiti:value> | ||
| 25 | + </activiti:formProperty> | ||
| 26 | + <activiti:taskListener event="complete" delegateExpression="${leaveCounterSignCompleteListener}"></activiti:taskListener> | ||
| 27 | + </extensionElements> | ||
| 28 | + <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="users" | ||
| 29 | + activiti:elementVariable="user"></multiInstanceLoopCharacteristics> | ||
| 30 | + </userTask> | ||
| 31 | + <userTask id="reportBack" name="销假" activiti:assignee="${applyUserId}"> | ||
| 32 | + <extensionElements> | ||
| 33 | + <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty> | ||
| 34 | + <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty> | ||
| 35 | + <activiti:formProperty id="reason" name="请假原因" type="string" writable="false"></activiti:formProperty> | ||
| 36 | + <activiti:formProperty id="reportBackDate" name="销假日期" type="date" default="${endDate}" datePattern="yyyy-MM-dd" | ||
| 37 | + required="true"></activiti:formProperty> | ||
| 38 | + </extensionElements> | ||
| 39 | + </userTask> | ||
| 40 | + <endEvent id="endevent1" name="End"></endEvent> | ||
| 41 | + <sequenceFlow id="flow2" sourceRef="startevent1" targetRef="countersign"> | ||
| 42 | + <extensionElements> | ||
| 43 | + <activiti:executionListener event="take" expression="${execution.setVariable('approvedCounter', 0)}"></activiti:executionListener> | ||
| 44 | + </extensionElements> | ||
| 45 | + </sequenceFlow> | ||
| 46 | + <sequenceFlow id="flow8" name="销假" sourceRef="reportBack" targetRef="endevent1"> | ||
| 47 | + <extensionElements> | ||
| 48 | + <activiti:executionListener event="take" expression="${execution.setVariable('result', 'ok')}"></activiti:executionListener> | ||
| 49 | + </extensionElements> | ||
| 50 | + </sequenceFlow> | ||
| 51 | + <sequenceFlow id="flow13" name="全部通过" sourceRef="exclusivegateway1" targetRef="reportBack"> | ||
| 52 | + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approvedCounter == users.size()}]]></conditionExpression> | ||
| 53 | + </sequenceFlow> | ||
| 54 | + <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway> | ||
| 55 | + <sequenceFlow id="flow14" sourceRef="countersign" targetRef="exclusivegateway1"></sequenceFlow> | ||
| 56 | + <userTask id="modifyApply" name="调整申请" activiti:assignee="${applyUserId}"> | ||
| 57 | + <extensionElements> | ||
| 58 | + <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty> | ||
| 59 | + <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty> | ||
| 60 | + <activiti:formProperty id="reason" name="请假原因" type="string" required="true"></activiti:formProperty> | ||
| 61 | + <activiti:formProperty id="reApply" name="重新申请" type="enum" required="true"> | ||
| 62 | + <activiti:value id="true" name="重新申请"></activiti:value> | ||
| 63 | + <activiti:value id="false" name="取消申请"></activiti:value> | ||
| 64 | + </activiti:formProperty> | ||
| 65 | + </extensionElements> | ||
| 66 | + </userTask> | ||
| 67 | + <sequenceFlow id="flow15" name="部分通过" sourceRef="exclusivegateway1" targetRef="modifyApply"> | ||
| 68 | + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approvedCounter < users.size()}]]></conditionExpression> | ||
| 69 | + </sequenceFlow> | ||
| 70 | + <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway> | ||
| 71 | + <sequenceFlow id="flow16" sourceRef="modifyApply" targetRef="exclusivegateway2"></sequenceFlow> | ||
| 72 | + <sequenceFlow id="flow17" sourceRef="exclusivegateway2" targetRef="endevent1"> | ||
| 73 | + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'false'}]]></conditionExpression> | ||
| 74 | + </sequenceFlow> | ||
| 75 | + <sequenceFlow id="flow18" name="重新申请" sourceRef="exclusivegateway2" targetRef="countersign"> | ||
| 76 | + <extensionElements> | ||
| 77 | + <activiti:executionListener event="take" expression="${execution.setVariable('approvedCounter', 0)}"></activiti:executionListener> | ||
| 78 | + </extensionElements> | ||
| 79 | + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'true'}]]></conditionExpression> | ||
| 80 | + </sequenceFlow> | ||
| 81 | + </process> | ||
| 82 | + <bpmndi:BPMNDiagram id="BPMNDiagram_leave-countersign"> | ||
| 83 | + <bpmndi:BPMNPlane bpmnElement="leave-countersign" id="BPMNPlane_leave-countersign"> | ||
| 84 | + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> | ||
| 85 | + <omgdc:Bounds height="35.0" width="35.0" x="10.0" y="30.0"></omgdc:Bounds> | ||
| 86 | + </bpmndi:BPMNShape> | ||
| 87 | + <bpmndi:BPMNShape bpmnElement="reportBack" id="BPMNShape_reportBack"> | ||
| 88 | + <omgdc:Bounds height="55.0" width="105.0" x="340.0" y="20.0"></omgdc:Bounds> | ||
| 89 | + </bpmndi:BPMNShape> | ||
| 90 | + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> | ||
| 91 | + <omgdc:Bounds height="35.0" width="35.0" x="375.0" y="203.0"></omgdc:Bounds> | ||
| 92 | + </bpmndi:BPMNShape> | ||
| 93 | + <bpmndi:BPMNShape bpmnElement="countersign" id="BPMNShape_countersign"> | ||
| 94 | + <omgdc:Bounds height="55.0" width="105.0" x="90.0" y="20.0"></omgdc:Bounds> | ||
| 95 | + </bpmndi:BPMNShape> | ||
| 96 | + <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1"> | ||
| 97 | + <omgdc:Bounds height="40.0" width="40.0" x="220.0" y="27.0"></omgdc:Bounds> | ||
| 98 | + </bpmndi:BPMNShape> | ||
| 99 | + <bpmndi:BPMNShape bpmnElement="modifyApply" id="BPMNShape_modifyApply"> | ||
| 100 | + <omgdc:Bounds height="55.0" width="105.0" x="188.0" y="110.0"></omgdc:Bounds> | ||
| 101 | + </bpmndi:BPMNShape> | ||
| 102 | + <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2"> | ||
| 103 | + <omgdc:Bounds height="40.0" width="40.0" x="220.0" y="200.0"></omgdc:Bounds> | ||
| 104 | + </bpmndi:BPMNShape> | ||
| 105 | + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> | ||
| 106 | + <omgdi:waypoint x="45.0" y="47.0"></omgdi:waypoint> | ||
| 107 | + <omgdi:waypoint x="90.0" y="47.0"></omgdi:waypoint> | ||
| 108 | + </bpmndi:BPMNEdge> | ||
| 109 | + <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8"> | ||
| 110 | + <omgdi:waypoint x="392.0" y="75.0"></omgdi:waypoint> | ||
| 111 | + <omgdi:waypoint x="392.0" y="203.0"></omgdi:waypoint> | ||
| 112 | + <bpmndi:BPMNLabel> | ||
| 113 | + <omgdc:Bounds height="11.0" width="100.0" x="-22.0" y="-17.0"></omgdc:Bounds> | ||
| 114 | + </bpmndi:BPMNLabel> | ||
| 115 | + </bpmndi:BPMNEdge> | ||
| 116 | + <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13"> | ||
| 117 | + <omgdi:waypoint x="260.0" y="47.0"></omgdi:waypoint> | ||
| 118 | + <omgdi:waypoint x="340.0" y="47.0"></omgdi:waypoint> | ||
| 119 | + <bpmndi:BPMNLabel> | ||
| 120 | + <omgdc:Bounds height="11.0" width="100.0" x="-29.0" y="-17.0"></omgdc:Bounds> | ||
| 121 | + </bpmndi:BPMNLabel> | ||
| 122 | + </bpmndi:BPMNEdge> | ||
| 123 | + <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14"> | ||
| 124 | + <omgdi:waypoint x="195.0" y="47.0"></omgdi:waypoint> | ||
| 125 | + <omgdi:waypoint x="220.0" y="47.0"></omgdi:waypoint> | ||
| 126 | + </bpmndi:BPMNEdge> | ||
| 127 | + <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15"> | ||
| 128 | + <omgdi:waypoint x="240.0" y="67.0"></omgdi:waypoint> | ||
| 129 | + <omgdi:waypoint x="240.0" y="110.0"></omgdi:waypoint> | ||
| 130 | + <bpmndi:BPMNLabel> | ||
| 131 | + <omgdc:Bounds height="11.0" width="100.0" x="10.0" y="0.0"></omgdc:Bounds> | ||
| 132 | + </bpmndi:BPMNLabel> | ||
| 133 | + </bpmndi:BPMNEdge> | ||
| 134 | + <bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16"> | ||
| 135 | + <omgdi:waypoint x="240.0" y="165.0"></omgdi:waypoint> | ||
| 136 | + <omgdi:waypoint x="240.0" y="200.0"></omgdi:waypoint> | ||
| 137 | + </bpmndi:BPMNEdge> | ||
| 138 | + <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17"> | ||
| 139 | + <omgdi:waypoint x="260.0" y="220.0"></omgdi:waypoint> | ||
| 140 | + <omgdi:waypoint x="375.0" y="220.0"></omgdi:waypoint> | ||
| 141 | + </bpmndi:BPMNEdge> | ||
| 142 | + <bpmndi:BPMNEdge bpmnElement="flow18" id="BPMNEdge_flow18"> | ||
| 143 | + <omgdi:waypoint x="220.0" y="220.0"></omgdi:waypoint> | ||
| 144 | + <omgdi:waypoint x="142.0" y="220.0"></omgdi:waypoint> | ||
| 145 | + <omgdi:waypoint x="142.0" y="75.0"></omgdi:waypoint> | ||
| 146 | + <bpmndi:BPMNLabel> | ||
| 147 | + <omgdc:Bounds height="11.0" width="100.0" x="9.0" y="14.0"></omgdc:Bounds> | ||
| 148 | + </bpmndi:BPMNLabel> | ||
| 149 | + </bpmndi:BPMNEdge> | ||
| 150 | + </bpmndi:BPMNPlane> | ||
| 151 | + </bpmndi:BPMNDiagram> | ||
| 152 | +</definitions> | ||
| 0 | \ No newline at end of file | 153 | \ No newline at end of file |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/leave-countersign.png
0 → 100644
20 KB
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/testMultiInstanceFixedNumbers.bpmn
0 → 100644
| 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: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.activiti.org/test"> | ||
| 3 | + <process id="testMultiInstanceFixedNumbers" name="testMultiInstanceFixedNumbers" isExecutable="true"> | ||
| 4 | + <startEvent id="startevent1" name="Start"></startEvent> | ||
| 5 | + <serviceTask id="servicetask1" name="Service Task" activiti:expression="${counter + 1}" activiti:resultVariableName="counter"> | ||
| 6 | + <multiInstanceLoopCharacteristics isSequential="false"> | ||
| 7 | + <loopCardinality>${loop}</loopCardinality> | ||
| 8 | + </multiInstanceLoopCharacteristics> | ||
| 9 | + </serviceTask> | ||
| 10 | + <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="servicetask1"></sequenceFlow> | ||
| 11 | + <endEvent id="endevent1" name="End"></endEvent> | ||
| 12 | + <sequenceFlow id="flow2" sourceRef="receivetask1" targetRef="endevent1"></sequenceFlow> | ||
| 13 | + <receiveTask id="receivetask1" name="Receive Task"></receiveTask> | ||
| 14 | + <sequenceFlow id="flow3" sourceRef="servicetask1" targetRef="receivetask1"></sequenceFlow> | ||
| 15 | + </process> | ||
| 16 | + <bpmndi:BPMNDiagram id="BPMNDiagram_testMultiInstanceFixedNumbers"> | ||
| 17 | + <bpmndi:BPMNPlane bpmnElement="testMultiInstanceFixedNumbers" id="BPMNPlane_testMultiInstanceFixedNumbers"> | ||
| 18 | + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> | ||
| 19 | + <omgdc:Bounds height="35.0" width="35.0" x="50.0" y="50.0"></omgdc:Bounds> | ||
| 20 | + </bpmndi:BPMNShape> | ||
| 21 | + <bpmndi:BPMNShape bpmnElement="servicetask1" id="BPMNShape_servicetask1"> | ||
| 22 | + <omgdc:Bounds height="55.0" width="105.0" x="116.0" y="40.0"></omgdc:Bounds> | ||
| 23 | + </bpmndi:BPMNShape> | ||
| 24 | + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> | ||
| 25 | + <omgdc:Bounds height="35.0" width="35.0" x="410.0" y="50.0"></omgdc:Bounds> | ||
| 26 | + </bpmndi:BPMNShape> | ||
| 27 | + <bpmndi:BPMNShape bpmnElement="receivetask1" id="BPMNShape_receivetask1"> | ||
| 28 | + <omgdc:Bounds height="55.0" width="105.0" x="260.0" y="40.0"></omgdc:Bounds> | ||
| 29 | + </bpmndi:BPMNShape> | ||
| 30 | + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> | ||
| 31 | + <omgdi:waypoint x="85.0" y="67.0"></omgdi:waypoint> | ||
| 32 | + <omgdi:waypoint x="116.0" y="67.0"></omgdi:waypoint> | ||
| 33 | + </bpmndi:BPMNEdge> | ||
| 34 | + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> | ||
| 35 | + <omgdi:waypoint x="365.0" y="67.0"></omgdi:waypoint> | ||
| 36 | + <omgdi:waypoint x="410.0" y="67.0"></omgdi:waypoint> | ||
| 37 | + </bpmndi:BPMNEdge> | ||
| 38 | + <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"> | ||
| 39 | + <omgdi:waypoint x="221.0" y="67.0"></omgdi:waypoint> | ||
| 40 | + <omgdi:waypoint x="260.0" y="67.0"></omgdi:waypoint> | ||
| 41 | + </bpmndi:BPMNEdge> | ||
| 42 | + </bpmndi:BPMNPlane> | ||
| 43 | + </bpmndi:BPMNDiagram> | ||
| 44 | +</definitions> | ||
| 0 | \ No newline at end of file | 45 | \ No newline at end of file |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/testMultiInstanceForUserTask.exception.bpmn
0 → 100644
| 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: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.activiti.org/test"> | ||
| 3 | + <process id="testMultiInstanceForUserTask" name="testMultiInstanceForUserTask" isExecutable="true"> | ||
| 4 | + <startEvent id="startevent1" name="Start"></startEvent> | ||
| 5 | + <userTask id="usertask1" name="User Task" activiti:assignee="${user}"> | ||
| 6 | + <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${users}" activiti:elementVariable="user"></multiInstanceLoopCharacteristics> | ||
| 7 | + </userTask> | ||
| 8 | + <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow> | ||
| 9 | + <endEvent id="endevent1" name="End"></endEvent> | ||
| 10 | + <sequenceFlow id="flow2" sourceRef="usertask2" targetRef="endevent1"></sequenceFlow> | ||
| 11 | + <userTask id="usertask2" name="User Task2"></userTask> | ||
| 12 | + <sequenceFlow id="flow3" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow> | ||
| 13 | + </process> | ||
| 14 | + <bpmndi:BPMNDiagram id="BPMNDiagram_testMultiInstanceForUserTask"> | ||
| 15 | + <bpmndi:BPMNPlane bpmnElement="testMultiInstanceForUserTask" id="BPMNPlane_testMultiInstanceForUserTask"> | ||
| 16 | + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> | ||
| 17 | + <omgdc:Bounds height="35.0" width="35.0" x="90.0" y="80.0"></omgdc:Bounds> | ||
| 18 | + </bpmndi:BPMNShape> | ||
| 19 | + <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"> | ||
| 20 | + <omgdc:Bounds height="55.0" width="105.0" x="170.0" y="70.0"></omgdc:Bounds> | ||
| 21 | + </bpmndi:BPMNShape> | ||
| 22 | + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> | ||
| 23 | + <omgdc:Bounds height="35.0" width="35.0" x="340.0" y="190.0"></omgdc:Bounds> | ||
| 24 | + </bpmndi:BPMNShape> | ||
| 25 | + <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2"> | ||
| 26 | + <omgdc:Bounds height="55.0" width="105.0" x="170.0" y="180.0"></omgdc:Bounds> | ||
| 27 | + </bpmndi:BPMNShape> | ||
| 28 | + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> | ||
| 29 | + <omgdi:waypoint x="125.0" y="97.0"></omgdi:waypoint> | ||
| 30 | + <omgdi:waypoint x="170.0" y="97.0"></omgdi:waypoint> | ||
| 31 | + </bpmndi:BPMNEdge> | ||
| 32 | + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> | ||
| 33 | + <omgdi:waypoint x="275.0" y="207.0"></omgdi:waypoint> | ||
| 34 | + <omgdi:waypoint x="340.0" y="207.0"></omgdi:waypoint> | ||
| 35 | + </bpmndi:BPMNEdge> | ||
| 36 | + <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"> | ||
| 37 | + <omgdi:waypoint x="222.0" y="125.0"></omgdi:waypoint> | ||
| 38 | + <omgdi:waypoint x="222.0" y="180.0"></omgdi:waypoint> | ||
| 39 | + </bpmndi:BPMNEdge> | ||
| 40 | + </bpmndi:BPMNPlane> | ||
| 41 | + </bpmndi:BPMNDiagram> | ||
| 42 | +</definitions> | ||
| 0 | \ No newline at end of file | 43 | \ No newline at end of file |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/testMultiInstanceForUserTask.exception.png
0 → 100644
11.5 KB
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/testMultiInstanceForUserTask.nosequential.bpmn
0 → 100644
| 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: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.activiti.org/test"> | ||
| 3 | + <process id="testMultiInstanceForUserTask" name="testMultiInstanceForUserTask" isExecutable="true"> | ||
| 4 | + <startEvent id="startevent1" name="Start"></startEvent> | ||
| 5 | + <userTask id="usertask1" name="User Task"> | ||
| 6 | + <multiInstanceLoopCharacteristics isSequential="false"> | ||
| 7 | + <loopCardinality>3</loopCardinality> | ||
| 8 | + </multiInstanceLoopCharacteristics> | ||
| 9 | + </userTask> | ||
| 10 | + <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow> | ||
| 11 | + <endEvent id="endevent1" name="End"></endEvent> | ||
| 12 | + <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow> | ||
| 13 | + </process> | ||
| 14 | + <bpmndi:BPMNDiagram id="BPMNDiagram_testMultiInstanceForUserTask"> | ||
| 15 | + <bpmndi:BPMNPlane bpmnElement="testMultiInstanceForUserTask" id="BPMNPlane_testMultiInstanceForUserTask"> | ||
| 16 | + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> | ||
| 17 | + <omgdc:Bounds height="35.0" width="35.0" x="90.0" y="80.0"></omgdc:Bounds> | ||
| 18 | + </bpmndi:BPMNShape> | ||
| 19 | + <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"> | ||
| 20 | + <omgdc:Bounds height="55.0" width="105.0" x="170.0" y="70.0"></omgdc:Bounds> | ||
| 21 | + </bpmndi:BPMNShape> | ||
| 22 | + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> | ||
| 23 | + <omgdc:Bounds height="35.0" width="35.0" x="330.0" y="80.0"></omgdc:Bounds> | ||
| 24 | + </bpmndi:BPMNShape> | ||
| 25 | + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> | ||
| 26 | + <omgdi:waypoint x="125.0" y="97.0"></omgdi:waypoint> | ||
| 27 | + <omgdi:waypoint x="170.0" y="97.0"></omgdi:waypoint> | ||
| 28 | + </bpmndi:BPMNEdge> | ||
| 29 | + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> | ||
| 30 | + <omgdi:waypoint x="275.0" y="97.0"></omgdi:waypoint> | ||
| 31 | + <omgdi:waypoint x="330.0" y="97.0"></omgdi:waypoint> | ||
| 32 | + </bpmndi:BPMNEdge> | ||
| 33 | + </bpmndi:BPMNPlane> | ||
| 34 | + </bpmndi:BPMNDiagram> | ||
| 35 | +</definitions> | ||
| 0 | \ No newline at end of file | 36 | \ No newline at end of file |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/testMultiInstanceForUserTask.sequential.bpmn
0 → 100644
| 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: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.activiti.org/test"> | ||
| 3 | + <process id="testMultiInstanceForUserTask" name="testMultiInstanceForUserTask" isExecutable="true"> | ||
| 4 | + <startEvent id="startevent1" name="Start"></startEvent> | ||
| 5 | + <userTask id="usertask1" name="User Task"> | ||
| 6 | + <multiInstanceLoopCharacteristics isSequential="true"> | ||
| 7 | + <loopCardinality>3</loopCardinality> | ||
| 8 | + </multiInstanceLoopCharacteristics> | ||
| 9 | + </userTask> | ||
| 10 | + <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow> | ||
| 11 | + <endEvent id="endevent1" name="End"></endEvent> | ||
| 12 | + <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow> | ||
| 13 | + </process> | ||
| 14 | + <bpmndi:BPMNDiagram id="BPMNDiagram_testMultiInstanceForUserTask"> | ||
| 15 | + <bpmndi:BPMNPlane bpmnElement="testMultiInstanceForUserTask" id="BPMNPlane_testMultiInstanceForUserTask"> | ||
| 16 | + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> | ||
| 17 | + <omgdc:Bounds height="35.0" width="35.0" x="90.0" y="80.0"></omgdc:Bounds> | ||
| 18 | + </bpmndi:BPMNShape> | ||
| 19 | + <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"> | ||
| 20 | + <omgdc:Bounds height="55.0" width="105.0" x="170.0" y="70.0"></omgdc:Bounds> | ||
| 21 | + </bpmndi:BPMNShape> | ||
| 22 | + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> | ||
| 23 | + <omgdc:Bounds height="35.0" width="35.0" x="330.0" y="80.0"></omgdc:Bounds> | ||
| 24 | + </bpmndi:BPMNShape> | ||
| 25 | + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> | ||
| 26 | + <omgdi:waypoint x="125.0" y="97.0"></omgdi:waypoint> | ||
| 27 | + <omgdi:waypoint x="170.0" y="97.0"></omgdi:waypoint> | ||
| 28 | + </bpmndi:BPMNEdge> | ||
| 29 | + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> | ||
| 30 | + <omgdi:waypoint x="275.0" y="97.0"></omgdi:waypoint> | ||
| 31 | + <omgdi:waypoint x="330.0" y="97.0"></omgdi:waypoint> | ||
| 32 | + </bpmndi:BPMNEdge> | ||
| 33 | + </bpmndi:BPMNPlane> | ||
| 34 | + </bpmndi:BPMNDiagram> | ||
| 35 | +</definitions> | ||
| 0 | \ No newline at end of file | 36 | \ No newline at end of file |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/testMultiInstanceForUserTask.users.nosequential.bpmn
0 → 100644
| 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: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.activiti.org/test"> | ||
| 3 | + <process id="testMultiInstanceForUserTask" name="testMultiInstanceForUserTask" isExecutable="true"> | ||
| 4 | + <startEvent id="startevent1" name="Start"></startEvent> | ||
| 5 | + <userTask id="usertask1" name="User Task" activiti:assignee="${user}"> | ||
| 6 | + <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${users}" activiti:elementVariable="user"></multiInstanceLoopCharacteristics> | ||
| 7 | + </userTask> | ||
| 8 | + <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow> | ||
| 9 | + <endEvent id="endevent1" name="End"></endEvent> | ||
| 10 | + <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow> | ||
| 11 | + </process> | ||
| 12 | + <bpmndi:BPMNDiagram id="BPMNDiagram_testMultiInstanceForUserTask"> | ||
| 13 | + <bpmndi:BPMNPlane bpmnElement="testMultiInstanceForUserTask" id="BPMNPlane_testMultiInstanceForUserTask"> | ||
| 14 | + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> | ||
| 15 | + <omgdc:Bounds height="35.0" width="35.0" x="50.0" y="90.0"></omgdc:Bounds> | ||
| 16 | + </bpmndi:BPMNShape> | ||
| 17 | + <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"> | ||
| 18 | + <omgdc:Bounds height="55.0" width="105.0" x="130.0" y="80.0"></omgdc:Bounds> | ||
| 19 | + </bpmndi:BPMNShape> | ||
| 20 | + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> | ||
| 21 | + <omgdc:Bounds height="35.0" width="35.0" x="290.0" y="90.0"></omgdc:Bounds> | ||
| 22 | + </bpmndi:BPMNShape> | ||
| 23 | + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> | ||
| 24 | + <omgdi:waypoint x="85.0" y="107.0"></omgdi:waypoint> | ||
| 25 | + <omgdi:waypoint x="130.0" y="107.0"></omgdi:waypoint> | ||
| 26 | + </bpmndi:BPMNEdge> | ||
| 27 | + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> | ||
| 28 | + <omgdi:waypoint x="235.0" y="107.0"></omgdi:waypoint> | ||
| 29 | + <omgdi:waypoint x="290.0" y="107.0"></omgdi:waypoint> | ||
| 30 | + </bpmndi:BPMNEdge> | ||
| 31 | + </bpmndi:BPMNPlane> | ||
| 32 | + </bpmndi:BPMNDiagram> | ||
| 33 | +</definitions> | ||
| 0 | \ No newline at end of file | 34 | \ No newline at end of file |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/testMultiInstanceForUserTask.users.sequential.bpmn
0 → 100644
| 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: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.activiti.org/test"> | ||
| 3 | + <process id="testMultiInstanceForUserTask" name="testMultiInstanceForUserTask" isExecutable="true"> | ||
| 4 | + <startEvent id="startevent1" name="Start"></startEvent> | ||
| 5 | + <userTask id="usertask1" name="User Task" activiti:assignee="${user}"> | ||
| 6 | + <multiInstanceLoopCharacteristics isSequential="true" activiti:collection="${users}" activiti:elementVariable="user"></multiInstanceLoopCharacteristics> | ||
| 7 | + </userTask> | ||
| 8 | + <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow> | ||
| 9 | + <endEvent id="endevent1" name="End"></endEvent> | ||
| 10 | + <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow> | ||
| 11 | + </process> | ||
| 12 | + <bpmndi:BPMNDiagram id="BPMNDiagram_testMultiInstanceForUserTask"> | ||
| 13 | + <bpmndi:BPMNPlane bpmnElement="testMultiInstanceForUserTask" id="BPMNPlane_testMultiInstanceForUserTask"> | ||
| 14 | + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> | ||
| 15 | + <omgdc:Bounds height="35.0" width="35.0" x="50.0" y="90.0"></omgdc:Bounds> | ||
| 16 | + </bpmndi:BPMNShape> | ||
| 17 | + <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"> | ||
| 18 | + <omgdc:Bounds height="55.0" width="105.0" x="130.0" y="80.0"></omgdc:Bounds> | ||
| 19 | + </bpmndi:BPMNShape> | ||
| 20 | + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> | ||
| 21 | + <omgdc:Bounds height="35.0" width="35.0" x="290.0" y="90.0"></omgdc:Bounds> | ||
| 22 | + </bpmndi:BPMNShape> | ||
| 23 | + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> | ||
| 24 | + <omgdi:waypoint x="85.0" y="107.0"></omgdi:waypoint> | ||
| 25 | + <omgdi:waypoint x="130.0" y="107.0"></omgdi:waypoint> | ||
| 26 | + </bpmndi:BPMNEdge> | ||
| 27 | + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> | ||
| 28 | + <omgdi:waypoint x="235.0" y="107.0"></omgdi:waypoint> | ||
| 29 | + <omgdi:waypoint x="290.0" y="107.0"></omgdi:waypoint> | ||
| 30 | + </bpmndi:BPMNEdge> | ||
| 31 | + </bpmndi:BPMNPlane> | ||
| 32 | + </bpmndi:BPMNDiagram> | ||
| 33 | +</definitions> | ||
| 0 | \ No newline at end of file | 34 | \ No newline at end of file |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/testMultiInstanceForUserTask.users.sequential.with.complete.conditon.bpmn
0 → 100644
| 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: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.activiti.org/test"> | ||
| 3 | + <process id="testMultiInstanceForUserTask" name="testMultiInstanceForUserTask" isExecutable="true"> | ||
| 4 | + <startEvent id="startevent1" name="Start"></startEvent> | ||
| 5 | + <userTask id="usertask1" name="User Task" activiti:assignee="${user}"> | ||
| 6 | + <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${users}" activiti:elementVariable="user"> | ||
| 7 | + <completionCondition>${nrOfCompletedInstances / nrOfInstances >= rate}</completionCondition> | ||
| 8 | + </multiInstanceLoopCharacteristics> | ||
| 9 | + </userTask> | ||
| 10 | + <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow> | ||
| 11 | + <endEvent id="endevent1" name="End"></endEvent> | ||
| 12 | + <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow> | ||
| 13 | + </process> | ||
| 14 | + <bpmndi:BPMNDiagram id="BPMNDiagram_testMultiInstanceForUserTask"> | ||
| 15 | + <bpmndi:BPMNPlane bpmnElement="testMultiInstanceForUserTask" id="BPMNPlane_testMultiInstanceForUserTask"> | ||
| 16 | + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> | ||
| 17 | + <omgdc:Bounds height="35.0" width="35.0" x="50.0" y="90.0"></omgdc:Bounds> | ||
| 18 | + </bpmndi:BPMNShape> | ||
| 19 | + <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"> | ||
| 20 | + <omgdc:Bounds height="55.0" width="105.0" x="130.0" y="80.0"></omgdc:Bounds> | ||
| 21 | + </bpmndi:BPMNShape> | ||
| 22 | + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> | ||
| 23 | + <omgdc:Bounds height="35.0" width="35.0" x="290.0" y="90.0"></omgdc:Bounds> | ||
| 24 | + </bpmndi:BPMNShape> | ||
| 25 | + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> | ||
| 26 | + <omgdi:waypoint x="85.0" y="107.0"></omgdi:waypoint> | ||
| 27 | + <omgdi:waypoint x="130.0" y="107.0"></omgdi:waypoint> | ||
| 28 | + </bpmndi:BPMNEdge> | ||
| 29 | + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> | ||
| 30 | + <omgdi:waypoint x="235.0" y="107.0"></omgdi:waypoint> | ||
| 31 | + <omgdi:waypoint x="290.0" y="107.0"></omgdi:waypoint> | ||
| 32 | + </bpmndi:BPMNEdge> | ||
| 33 | + </bpmndi:BPMNPlane> | ||
| 34 | + </bpmndi:BPMNDiagram> | ||
| 35 | +</definitions> | ||
| 0 | \ No newline at end of file | 36 | \ No newline at end of file |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/diagrams/chapter9/testMultiInstanceForUserTask.users.sequential.with.complete.conditon.png
0 → 100644
7.82 KB