From a1d0dc424a356def3f4eb0ef87580a9811b4bccc Mon Sep 17 00:00:00 2001 From: wangli <274027703@qq.com> Date: Mon, 5 Feb 2024 11:29:01 +0800 Subject: [PATCH] =?UTF-8?q?update=20-=20=E4=B8=9A=E5=8A=A1=E8=8A=82?= =?UTF-8?q?=E7=82=B9"=E4=B8=8D=E8=AE=BE=E7=BD=AE=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E4=BA=BA"=E9=85=8D=E7=BD=AE=E6=97=B6,=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E6=96=B9=E5=BC=8F=E8=B0=83=E6=95=B4=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=9B=91=E5=90=AC=E7=9A=84=E9=85=8D=E7=BD=AE=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E8=A6=81=E6=B7=BB=E5=8A=A0=20engineExecutionStartList?= =?UTF-8?q?ener?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../json/ReceiveTaskJsonConverter.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/converter/json/ReceiveTaskJsonConverter.java b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/converter/json/ReceiveTaskJsonConverter.java index 3428ea767..9c7e92505 100644 --- a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/converter/json/ReceiveTaskJsonConverter.java +++ b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/converter/json/ReceiveTaskJsonConverter.java @@ -1,5 +1,6 @@ package cn.axzo.workflow.core.converter.json; +import cn.axzo.workflow.common.enums.ApprovalMethodEnum; import cn.axzo.workflow.common.model.request.bpmn.BpmnJsonNode; import cn.axzo.workflow.common.model.request.bpmn.BpmnJsonNodeProperty; import org.flowable.bpmn.model.ExtensionAttribute; @@ -35,19 +36,24 @@ public class ReceiveTaskJsonConverter extends AbstractBpmnJsonConverter executionListeners = new ArrayList<>(); - // 设置执行监听 - FlowableListener executionListener = new FlowableListener(); - executionListener.setEvent(BaseExecutionListener.EVENTNAME_START); - executionListener.setImplementationType(IMPLEMENTATION_TYPE_DELEGATEEXPRESSION); - executionListener.setImplementation("${engineExecutionStartListener}"); - executionListeners.add(executionListener); + + if (Objects.nonNull(node.getProperty()) && Objects.equals(node.getProperty().getApprovalMethod(), + ApprovalMethodEnum.nobody)) { + FlowableListener executionListener = new FlowableListener(); + executionListener.setEvent(BaseExecutionListener.EVENTNAME_START); + executionListener.setImplementationType(IMPLEMENTATION_TYPE_DELEGATEEXPRESSION); + executionListener.setImplementation("${engineExecutionStartListener}"); + executionListeners.add(executionListener); + } FlowableListener activityStartListener = new FlowableListener(); activityStartListener.setEvent(BaseExecutionListener.EVENTNAME_START);