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 49d1433d2..9d2b3516d 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 @@ -60,17 +60,18 @@ public class FlowExecutor { private LiteflowConfig liteflowConfig; - public FlowExecutor() { + public FlowExecutor(){ } public FlowExecutor(LiteflowConfig liteflowConfig){ this.liteflowConfig = liteflowConfig; + if (liteflowConfig.isParseOnStart()){ + this.init(); + } } public static FlowExecutor loadInstance(LiteflowConfig liteflowConfig){ - FlowExecutor flowExecutor = new FlowExecutor(liteflowConfig); - flowExecutor.init(); - return flowExecutor; + return new FlowExecutor(liteflowConfig); } /** @@ -358,7 +359,7 @@ public class FlowExecutor { T slot = DataBus.getSlot(slotIndex); if (ObjectUtil.isNull(slot)) { - throw new NoAvailableSlotException("the slot is not exist"); + throw new NoAvailableSlotException(StrUtil.format("the slot[{}] is not exist", slotIndex)); } if (StrUtil.isBlank(slot.getRequestId())) { diff --git a/liteflow-spring/src/main/java/com/yomahub/liteflow/spring/ComponentScanner.java b/liteflow-spring/src/main/java/com/yomahub/liteflow/spring/ComponentScanner.java index a9d782354..c932bcd80 100644 --- a/liteflow-spring/src/main/java/com/yomahub/liteflow/spring/ComponentScanner.java +++ b/liteflow-spring/src/main/java/com/yomahub/liteflow/spring/ComponentScanner.java @@ -76,3 +76,4 @@ public class ComponentScanner implements BeanPostProcessor { nodeComponentMap.clear(); } } +