Commit bdb4e3fadc5c5cdfd860028184efe9a77cee0d6d

Authored by YunaiV
1 parent a1a695a0

fix:【bpm】flowable 7.2.0 驳回可使用 moveActivityIdsToSingleActivityId 方法

yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
@@ -949,11 +949,13 @@ public class BpmTaskServiceImpl implements BpmTaskService { @@ -949,11 +949,13 @@ public class BpmTaskServiceImpl implements BpmTaskService {
949 Set<String> needSimulateTaskDefinitionKeys = getNeedSimulateTaskDefinitionKeys(bpmnModel, currentTask, targetElement); 949 Set<String> needSimulateTaskDefinitionKeys = getNeedSimulateTaskDefinitionKeys(bpmnModel, currentTask, targetElement);
950 950
951 // 4. 执行驳回 951 // 4. 执行驳回
952 - // 使用 moveExecutionsToSingleActivityId 替换 moveActivityIdsToSingleActivityId 原因:  
953 - // 当多实例任务回退的时候有问题。相关 issue: https://github.com/flowable/flowable-engine/issues/3944 952 + // ① 使用 moveExecutionsToSingleActivityId 替换 moveActivityIdsToSingleActivityId。原因:当多实例任务回退的时候有问题。
  953 + // 相关 issue: https://github.com/flowable/flowable-engine/issues/3944
  954 + // ② flowable 7.2.0 版本后,继续使用 moveActivityIdsToSingleActivityId 方法。原因:flowable 7.2.0 版本修复了该问题。
  955 + // 相关 issue:https://github.com/YunaiV/ruoyi-vue-pro/issues/1018
954 runtimeService.createChangeActivityStateBuilder() 956 runtimeService.createChangeActivityStateBuilder()
955 .processInstanceId(currentTask.getProcessInstanceId()) 957 .processInstanceId(currentTask.getProcessInstanceId())
956 - .moveExecutionsToSingleActivityId(runExecutionIds, reqVO.getTargetTaskDefinitionKey()) 958 + .moveActivityIdsToSingleActivityId(runExecutionIds, reqVO.getTargetTaskDefinitionKey())
957 // 设置需要预测的任务 ids 的流程变量,用于辅助预测 959 // 设置需要预测的任务 ids 的流程变量,用于辅助预测
958 .processVariable(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_TASK_IDS, needSimulateTaskDefinitionKeys) 960 .processVariable(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_TASK_IDS, needSimulateTaskDefinitionKeys)
959 // 设置流程变量(local)节点退回标记, 用于退回到节点,不执行 BpmUserTaskAssignStartUserHandlerTypeEnum 策略,导致自动通过 961 // 设置流程变量(local)节点退回标记, 用于退回到节点,不执行 BpmUserTaskAssignStartUserHandlerTypeEnum 策略,导致自动通过