From 64f97ede935e6168fdf99660c675e2eaadfc832c Mon Sep 17 00:00:00 2001 From: "everywhere.z" Date: Fri, 20 Jan 2023 11:25:53 +0800 Subject: [PATCH] =?UTF-8?q?bug=20#I6ASNG=20=E9=87=87=E7=94=A8sql=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=BA=90=E5=BD=A2=E5=BC=8F=EF=BC=8CFlowExecutor?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E9=85=8D=E7=BD=AE=E6=B5=81?= =?UTF-8?q?=E7=A8=8BFlowBus.getChainMap()=E4=BC=9A=E5=88=A4=E7=A9=BA?= =?UTF-8?q?=E5=88=99=E6=8A=9B=E5=87=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yomahub/liteflow/core/FlowExecutor.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java b/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java index 55c4c233f..da831e266 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java @@ -9,6 +9,7 @@ package com.yomahub.liteflow.core; import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.*; import com.yomahub.liteflow.enums.InnerChainTypeEnum; import com.yomahub.liteflow.exception.*; @@ -166,9 +167,11 @@ public class FlowExecutor { } //如果是ruleSource方式的,最后判断下有没有解析出来,如果没有解析出来则报错 - if (FlowBus.getChainMap().isEmpty()){ - String errMsg = StrUtil.format("no valid rule config found in rule path [{}]", liteflowConfig.getRuleSource()); - throw new ConfigErrorException(errMsg); + if (StrUtil.isBlank(liteflowConfig.getRuleSourceExtData()) && MapUtil.isEmpty(liteflowConfig.getRuleSourceExtDataMap())){ + if (FlowBus.getChainMap().isEmpty()){ + String errMsg = StrUtil.format("no valid rule config found in rule path [{}]", liteflowConfig.getRuleSource()); + throw new ConfigErrorException(errMsg); + } } //执行钩子