mirror of
https://gitee.com/zhijiantianya/ruoyi-vue-pro.git
synced 2026-03-22 05:07:17 +08:00
fix:【bpm】流程抄送时,可能缺少租户上下文的问题,对应 https://gitee.com/zhijiantianya/yudao-cloud/issues/IDEUQ6
This commit is contained in:
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker;
|
||||
import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils;
|
||||
import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceCopyService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.flowable.bpmn.model.FlowElement;
|
||||
@@ -40,8 +41,9 @@ public class BpmCopyTaskDelegate implements JavaDelegate {
|
||||
}
|
||||
// 2. 执行抄送
|
||||
FlowElement currentFlowElement = execution.getCurrentFlowElement();
|
||||
processInstanceCopyService.createProcessInstanceCopy(userIds, null, execution.getProcessInstanceId(),
|
||||
currentFlowElement.getId(), currentFlowElement.getName(), null);
|
||||
FlowableUtils.execute(execution.getTenantId(), () ->
|
||||
processInstanceCopyService.createProcessInstanceCopy(userIds, null, execution.getProcessInstanceId(),
|
||||
currentFlowElement.getId(), currentFlowElement.getName(), null));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user