|
|
@@ -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));
|
|
|
}
|
|
|
|
|
|
}
|