!1325 【fix】bpm 回退操作参数取值

Merge pull request !1325 from aho/master-jdk17
This commit is contained in:
芋道源码 2025-04-26 03:22:57 +00:00 committed by Gitee
commit 24b48f3826
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 2 deletions

View File

@ -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())