enhancement #I5ULVA 修正不规范的问题,chain的name和id混用,不太严谨

This commit is contained in:
everywhere.z
2022-11-27 21:39:19 +08:00
parent 961bac9c7b
commit 3e410f08d3

View File

@@ -120,7 +120,7 @@ public class LiteFlowChainELBuilder {
public LiteFlowChainELBuilder setEL(String elStr) {
if (StrUtil.isBlank(elStr)) {
String errMsg = StrUtil.format("no conditionList in this chain[{}]", chain.getChainName());
String errMsg = StrUtil.format("no conditionList in this chain[{}]", chain.getChainId());
throw new FlowSystemException(errMsg);
}
@@ -130,7 +130,7 @@ public class LiteFlowChainELBuilder {
//这里一定要先放chain再放node因为node优先于chain所以当重名时node会覆盖掉chain
//往上下文里放入所有的chain是的el表达式可以直接引用到chain
FlowBus.getChainMap().values().forEach(chain -> context.put(chain.getChainName(), chain));
FlowBus.getChainMap().values().forEach(chain -> context.put(chain.getChainId(), chain));
//往上下文里放入所有的node使得el表达式可以直接引用到nodeId
FlowBus.getNodeMap().keySet().forEach(nodeId -> context.put(nodeId, FlowBus.getNode(nodeId)));
@@ -181,7 +181,7 @@ public class LiteFlowChainELBuilder {
*/
private void checkBuild() {
List<String> errorList = new ArrayList<>();
if (StrUtil.isBlank(this.chain.getChainName())) {
if (StrUtil.isBlank(this.chain.getChainId())) {
errorList.add("name is blank");
}
if (CollUtil.isNotEmpty(errorList)) {