【fix】bpm 回退操作参数取值
This commit is contained in:
parent
7c94085499
commit
d67ca05621
|
@ -874,13 +874,14 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||
List<UserTask> returnUserTaskList = BpmnModelUtils.iteratorFindChildUserTasks(targetElement, runTaskKeyList, null, null);
|
||||
List<String> returnTaskKeyList = convertList(returnUserTaskList, UserTask::getId);
|
||||
|
||||
List<String> runExecutionIds = new ArrayList<>();
|
||||
// 2. 给当前要被退回的 task 数组,设置退回意见
|
||||
taskList.forEach(task -> {
|
||||
// 需要排除掉,不需要设置退回意见的任务
|
||||
if (!returnTaskKeyList.contains(task.getTaskDefinitionKey())) {
|
||||
return;
|
||||
}
|
||||
|
||||
runExecutionIds.add(task.getExecutionId());
|
||||
// 判断是否分配给自己任务,因为会签任务,一个节点会有多个任务
|
||||
if (isAssignUserTask(userId, task)) { // 情况一:自己的任务,进行 RETURN 标记
|
||||
// 2.1.1 添加评论
|
||||
|
@ -899,7 +900,6 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||
// 4. 执行驳回
|
||||
// 使用 moveExecutionsToSingleActivityId 替换 moveActivityIdsToSingleActivityId 原因:
|
||||
// 当多实例任务回退的时候有问题。相关 issue: https://github.com/flowable/flowable-engine/issues/3944
|
||||
List<String> runExecutionIds = convertList(taskList, Task::getExecutionId);
|
||||
runtimeService.createChangeActivityStateBuilder()
|
||||
.processInstanceId(currentTask.getProcessInstanceId())
|
||||
.moveExecutionsToSingleActivityId(runExecutionIds, reqVO.getTargetTaskDefinitionKey())
|
||||
|
|
Loading…
Reference in New Issue