Chain中增加chainName

This commit is contained in:
bryan.zhang
2018-01-17 17:42:17 +08:00
parent 142d4d1001
commit 4f1e1c47c2
3 changed files with 14 additions and 3 deletions

View File

@@ -5,7 +5,7 @@
<artifactId>liteflow</artifactId>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>
<version>1.2.10</version>
<version>1.2.11</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@@ -13,9 +13,12 @@ import java.util.List;
public class Chain {
private String chainName;
private List<Condition> conditionList;
public Chain(List<Condition> conditionList) {
public Chain(String chainName, List<Condition> conditionList) {
this.chainName = chainName;
this.conditionList = conditionList;
}
@@ -26,4 +29,12 @@ public class Chain {
public void setConditionList(List<Condition> conditionList) {
this.conditionList = conditionList;
}
public String getChainName() {
return chainName;
}
public void setChainName(String chainName) {
this.chainName = chainName;
}
}

View File

@@ -127,7 +127,7 @@ public class FlowParser {
conditionList.add(new WhenCondition(chainNodeList));
}
}
FlowBus.addChain(chainName, new Chain(conditionList));
FlowBus.addChain(chainName, new Chain(chainName,conditionList));
}
} catch (Exception e) {
LOG.error("FlowParser parser exception: {}", e);