Browse Source

驳回 debug

master
PoffyZhang 1 year ago
parent
commit
949eefca7a
2 changed files with 22 additions and 0 deletions
  1. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java
  2. +21
    -0
      pmapi/src/test/java/com/ningdatech/pmapi/todocenter/FlowableTest.java

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java View File

@@ -4,6 +4,7 @@ package com.ningdatech.pmapi.todocenter.controller;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.todocenter.model.vo.TodoNumVO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;


+ 21
- 0
pmapi/src/test/java/com/ningdatech/pmapi/todocenter/FlowableTest.java View File

@@ -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("操作成功!");
}
}

Loading…
Cancel
Save