From 9502fef140289b098531c265c4676035796783b1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 3 Aug 2025 19:16:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E3=80=90bpm=20=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E3=80=91BpmSequentialMultiInstanceBehavior=20?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=20CallActivity=E3=80=81SubProcess=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../behavior/BpmSequentialMultiInstanceBehavior.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java index 21b4f9ee8..e48b1f95d 100644 --- a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java +++ b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java @@ -7,10 +7,7 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCand import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import lombok.Setter; -import org.flowable.bpmn.model.Activity; -import org.flowable.bpmn.model.CallActivity; -import org.flowable.bpmn.model.FlowElement; -import org.flowable.bpmn.model.UserTask; +import org.flowable.bpmn.model.*; import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior; import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior; @@ -85,6 +82,12 @@ public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceB @Override protected void executeOriginalBehavior(DelegateExecution execution, ExecutionEntity multiInstanceRootExecution, int loopCounter) { + // 参见 https://t.zsxq.com/53Meo 情况 + if (execution.getCurrentFlowElement() instanceof CallActivity + || execution.getCurrentFlowElement() instanceof SubProcess) { + super.executeOriginalBehavior(execution, multiInstanceRootExecution, loopCounter); + return; + } // 参见 https://gitee.com/zhijiantianya/yudao-cloud/issues/IC239F super.collectionExpression = null; super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(execution.getCurrentActivityId());