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); + } } //执行钩子