|
|
@@ -249,4 +249,25 @@ public class FlowableTest extends AppTests { |
|
|
|
String ccNodeId = param.getCcNodeId(); |
|
|
|
ccTasksMapper.delete(Wrappers.lambdaQuery(WflowCcTasks.class).eq(WflowCcTasks::getNodeId,ccNodeId)); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void reject(){ |
|
|
|
String instCode = "0e63faec-08ff-11ee-9663-00163e000353"; |
|
|
|
String nodeId1 = "node_6486ddcbe4b0ab4a27ccfdbd"; |
|
|
|
String nodeId2 = "node_6486ddcbe4b0ab4a27ccfdc1"; |
|
|
|
String nodeId3 = "node_6486ddcbe4b0ab4a27ccfdc3"; |
|
|
|
|
|
|
|
List<Execution> executions = runtimeService.createExecutionQuery() |
|
|
|
.processInstanceId(instCode) |
|
|
|
.onlyChildExecutions().list(); |
|
|
|
//强制流程指向驳回 |
|
|
|
runtimeService.createChangeActivityStateBuilder() |
|
|
|
.processInstanceId(instCode) |
|
|
|
.moveActivityIdsToSingleActivityId(Lists.newArrayList(nodeId1,nodeId2,nodeId3), "refuse-end") |
|
|
|
.moveExecutionsToSingleActivityId(executions.stream().map(Execution::getId) |
|
|
|
.collect(Collectors.toList()), "refuse-end") |
|
|
|
.changeState(); |
|
|
|
|
|
|
|
log.info("操作成功!"); |
|
|
|
} |
|
|
|
} |