Commit df8593d27b0fbd9f749c5b78858537fc9e592466

Authored by YunaiV
2 parents cf3a13d4 24b48f38

Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into develop

yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
... ... @@ -874,13 +874,14 @@ public class BpmTaskServiceImpl implements BpmTaskService {
874 874 List<UserTask> returnUserTaskList = BpmnModelUtils.iteratorFindChildUserTasks(targetElement, runTaskKeyList, null, null);
875 875 List<String> returnTaskKeyList = convertList(returnUserTaskList, UserTask::getId);
876 876  
  877 + List<String> runExecutionIds = new ArrayList<>();
877 878 // 2. 给当前要被退回的 task 数组,设置退回意见
878 879 taskList.forEach(task -> {
879 880 // 需要排除掉,不需要设置退回意见的任务
880 881 if (!returnTaskKeyList.contains(task.getTaskDefinitionKey())) {
881 882 return;
882 883 }
883   -
  884 + runExecutionIds.add(task.getExecutionId());
884 885 // 判断是否分配给自己任务,因为会签任务,一个节点会有多个任务
885 886 if (isAssignUserTask(userId, task)) { // 情况一:自己的任务,进行 RETURN 标记
886 887 // 2.1.1 添加评论
... ... @@ -899,7 +900,6 @@ public class BpmTaskServiceImpl implements BpmTaskService {
899 900 // 4. 执行驳回
900 901 // 使用 moveExecutionsToSingleActivityId 替换 moveActivityIdsToSingleActivityId 原因:
901 902 // 当多实例任务回退的时候有问题。相关 issue: https://github.com/flowable/flowable-engine/issues/3944
902   - List<String> runExecutionIds = convertList(taskList, Task::getExecutionId);
903 903 runtimeService.createChangeActivityStateBuilder()
904 904 .processInstanceId(currentTask.getProcessInstanceId())
905 905 .moveExecutionsToSingleActivityId(runExecutionIds, reqVO.getTargetTaskDefinitionKey())
... ...