mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-16 13:00:41 +08:00
refactor 优化QLExpress的Runner初始化
This commit is contained in:
@@ -42,18 +42,9 @@ public class LiteFlowChainELBuilder {
|
||||
private final List<Condition> finallyConditionList;
|
||||
|
||||
//EL解析引擎
|
||||
private final ExpressRunner expressRunner;
|
||||
|
||||
public static LiteFlowChainELBuilder createChain() {
|
||||
return new LiteFlowChainELBuilder();
|
||||
}
|
||||
|
||||
public LiteFlowChainELBuilder() {
|
||||
chain = new Chain();
|
||||
conditionList = new ArrayList<>();
|
||||
preConditionList = new ArrayList<>();
|
||||
finallyConditionList = new ArrayList<>();
|
||||
private final static ExpressRunner expressRunner;
|
||||
|
||||
static {
|
||||
//初始化QLExpress的Runner
|
||||
expressRunner = new ExpressRunner();
|
||||
expressRunner.addFunction("THEN", new ThenOperator());
|
||||
@@ -73,6 +64,17 @@ public class LiteFlowChainELBuilder {
|
||||
expressRunner.addFunction("node", new NodeOperator());
|
||||
}
|
||||
|
||||
public static LiteFlowChainELBuilder createChain() {
|
||||
return new LiteFlowChainELBuilder();
|
||||
}
|
||||
|
||||
public LiteFlowChainELBuilder() {
|
||||
chain = new Chain();
|
||||
conditionList = new ArrayList<>();
|
||||
preConditionList = new ArrayList<>();
|
||||
finallyConditionList = new ArrayList<>();
|
||||
}
|
||||
|
||||
//在parser中chain的build是2段式的,因为涉及到依赖问题,以前是递归parser
|
||||
//2.6.8之后取消了递归的模式,两段式组装,先把带有chainName的chain对象放进去,第二段再组装chain里面的condition
|
||||
//所以这里setChainName的时候需要判断下
|
||||
|
||||
Reference in New Issue
Block a user