bug #I4VEV2 用spring扫描组件,但是流程用动态代码创建,会出现slot无法分配的bug

This commit is contained in:
bryan31
2022-02-26 23:26:11 +08:00
parent 3a95fb35ca
commit a676cfd9ba

View File

@@ -87,15 +87,17 @@ public class LiteFlowConditionBuilder {
Chain chain = FlowBus.getChain(item.getId());
this.condition.getNodeList().add(chain);
} else {
//元数据没有的话从spring上下文再取一遍,这部分是为了防止标有@Lazy懒加载的组件
//元数据没有的话从spring上下文再取一遍
//这部分有2个目的
//一是为了防止标有@Lazy懒加载的组件二是spring负责扫描而用代码的形式加载chain这种情况。
NodeComponent nodeComponent = ContextAwareHolder.loadContextAware().getBean(item.getId());
if (ObjectUtil.isNotNull(nodeComponent)){
FlowBus.addSpringScanNode(item.getId(), nodeComponent);
return setValue(value);
setValue(item.getId());
} else{
String errorMsg = StrUtil.format("executable node[{}] is not found!", regexEntity.getItem().getId());
throw new ExecutableItemNotFoundException(errorMsg);
}
String errorMsg = StrUtil.format("executable node[{}] is not found!", regexEntity.getItem().getId());
throw new ExecutableItemNotFoundException(errorMsg);
}
}
return this;