mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-06-15 13:31:43 +08:00
cond这种单词改成switch
This commit is contained in:
@@ -15,11 +15,11 @@ public abstract class NodeSwitchComponent extends NodeComponent {
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
String nodeId = this.processCond();
|
||||
String nodeId = this.processSwitch();
|
||||
this.getSlot().setSwitchResult(this.getClass().getName(), nodeId);
|
||||
}
|
||||
|
||||
//用以返回路由节点的beanId
|
||||
public abstract String processCond() throws Exception;
|
||||
public abstract String processSwitch() throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.yomahub.liteflow.script.ScriptExecutorFactory;
|
||||
public class ScriptSwitchComponent extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return (String)ScriptExecutorFactory.loadInstance().getScriptExecutor().execute(getNodeId(), getSlotIndex());
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.yomahub.liteflow.enums;
|
||||
|
||||
public enum LiteFlowMethodEnum {
|
||||
PROCESS("process"),
|
||||
PROCESS_COND("processCond"),
|
||||
PROCESS_SWITCH("processSwitch"),
|
||||
IS_ACCESS("isAccess"),
|
||||
|
||||
IS_END("isEnd"),
|
||||
|
||||
@@ -11,8 +11,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
System.out.println("Ecomp executed!");
|
||||
return "g";
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class JCmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
System.out.println("Jcomp executed!");
|
||||
return "chain3";
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
System.out.println("ECmp executed!");
|
||||
return "chain2";
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ import java.util.Objects;
|
||||
@Component("f")
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class FCondCmp{
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) {
|
||||
Integer requestData = bindCmp.getRequestData();
|
||||
if (Objects.isNull(requestData)){
|
||||
return "d";
|
||||
|
||||
@@ -17,8 +17,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
return "a";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class CCmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
if(bindCmp.getTag().equals("2")){
|
||||
return "e";
|
||||
}else{
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("Ecomp executed!");
|
||||
return "g";
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
|
||||
public class JCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("Jcomp executed!");
|
||||
return "chain3";
|
||||
}
|
||||
|
||||
@@ -56,4 +56,10 @@ public class BaseELSpringbootTest extends BaseTest {
|
||||
Assert.assertTrue(response.isSuccess());
|
||||
}
|
||||
|
||||
//用变量来声明短流程
|
||||
@Test
|
||||
public void testBase5() throws Exception{
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("chain5", "arg");
|
||||
Assert.assertTrue(response.isSuccess());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ESwitchCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "d";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class GSwitchCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "then_1001";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class XSwitchCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "w01";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("ECmp executed!");
|
||||
return "chain2";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Objects;
|
||||
@Component("f")
|
||||
public class FSwitchCmp extends NodeSwitchComponent {
|
||||
@Override
|
||||
public String processCond() {
|
||||
public String processSwitch() {
|
||||
Integer requestData = this.getRequestData();
|
||||
if (Objects.isNull(requestData)){
|
||||
return "d";
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "a";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class CCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
if(this.getTag().equals("2")){
|
||||
return "e";
|
||||
}else{
|
||||
|
||||
@@ -37,4 +37,17 @@
|
||||
z
|
||||
)
|
||||
</chain>
|
||||
|
||||
<chain name="chain5">
|
||||
t1 = THEN(c, WHEN(j,k));
|
||||
w1 = WHEN(q, THEN(p, r)).id("w01");
|
||||
t2 = THEN(h, i);
|
||||
|
||||
THEN(
|
||||
a,b,
|
||||
WHEN(t1, d, t2 ),
|
||||
SWITCH(x).to(m, n, w1),
|
||||
z
|
||||
);
|
||||
</chain>
|
||||
</flow>
|
||||
@@ -11,8 +11,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
System.out.println("Ecomp executed!");
|
||||
return "g";
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class JCmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
System.out.println("Jcomp executed!");
|
||||
return "chain3";
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
System.out.println("ECmp executed!");
|
||||
return "chain2";
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ import java.util.Objects;
|
||||
@Component("f")
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class FCondCmp{
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) {
|
||||
Integer requestData = bindCmp.getRequestData();
|
||||
if (Objects.isNull(requestData)){
|
||||
return "d";
|
||||
|
||||
@@ -17,8 +17,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
return "a";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ import org.springframework.stereotype.Component;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class ECmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
|
||||
@LiteflowSwitchCmpDefine
|
||||
public class CCmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) throws Exception {
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_SWITCH)
|
||||
public String processSwitch(NodeComponent bindCmp) throws Exception {
|
||||
if(bindCmp.getTag().equals("2")){
|
||||
return "e";
|
||||
}else{
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("Ecomp executed!");
|
||||
return "g";
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class JCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("Jcomp executed!");
|
||||
return "chain3";
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("ECmp executed!");
|
||||
return "chain2";
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.Objects;
|
||||
|
||||
public class FSwitchCmp extends NodeSwitchComponent {
|
||||
@Override
|
||||
public String processCond() {
|
||||
public String processSwitch() {
|
||||
Integer requestData = this.getRequestData();
|
||||
if (Objects.isNull(requestData)){
|
||||
return "d";
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "a";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class CCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
if(this.getTag().equals("2")){
|
||||
return "e";
|
||||
}else{
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("Ecomp executed!");
|
||||
return "g";
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
|
||||
public class JCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("Jcomp executed!");
|
||||
return "chain3";
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.springframework.stereotype.Component;
|
||||
@Component("e")
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "d";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("ECmp executed!");
|
||||
return "chain2";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Objects;
|
||||
@Component("f")
|
||||
public class FSwitchCmp extends NodeSwitchComponent {
|
||||
@Override
|
||||
public String processCond() {
|
||||
public String processSwitch() {
|
||||
Integer requestData = this.getRequestData();
|
||||
if (Objects.isNull(requestData)){
|
||||
return "d";
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "a";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class CCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
if(this.getTag().equals("2")){
|
||||
return "e";
|
||||
}else{
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("Ecomp executed!");
|
||||
return "g";
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
|
||||
public class JCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("Jcomp executed!");
|
||||
return "chain3";
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("ECmp executed!");
|
||||
return "chain2";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Objects;
|
||||
@Component("f")
|
||||
public class FSwitchCmp extends NodeSwitchComponent {
|
||||
@Override
|
||||
public String processCond() {
|
||||
public String processSwitch() {
|
||||
Integer requestData = this.getRequestData();
|
||||
if (Objects.isNull(requestData)){
|
||||
return "d";
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "a";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ECmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.yomahub.liteflow.core.NodeSwitchComponent;
|
||||
public class CCmp extends NodeSwitchComponent {
|
||||
|
||||
@Override
|
||||
public String processCond() throws Exception {
|
||||
public String processSwitch() throws Exception {
|
||||
if(this.getTag().equals("2")){
|
||||
return "e";
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user