From 6d1c1f20953b30ca81ea1ea199d292b645c5c243 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 25 Dec 2025 21:46:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E3=80=90bpm=E3=80=91=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=8A=84=E9=80=81=E6=97=B6=EF=BC=8C=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E7=BC=BA=E5=B0=91=E7=A7=9F=E6=88=B7=E4=B8=8A=E4=B8=8B=E6=96=87?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E5=AF=B9=E5=BA=94=20https:?= =?UTF-8?q?//gitee.com/zhijiantianya/yudao-cloud/issues/IDEUQ6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flowable/core/listener/BpmCopyTaskDelegate.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmCopyTaskDelegate.java b/yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmCopyTaskDelegate.java index e58d345e90..68c43db046 100644 --- a/yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmCopyTaskDelegate.java +++ b/yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmCopyTaskDelegate.java @@ -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)); } }