浏览代码

!88 LiteFlowResponse增加一个errorCode
Merge pull request !88 from zendwang/issue-I5IOC5

铂赛东 2 年之前
父节点
当前提交
4bd63e8925
共有 43 个文件被更改,包括 827 次插入23 次删除
  1. 1 11
      liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java
  2. 83 0
      liteflow-core/src/main/java/com/yomahub/liteflow/exception/LiteFlowException.java
  3. 24 8
      liteflow-core/src/main/java/com/yomahub/liteflow/flow/LiteflowResponse.java
  4. 12 0
      liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java
  5. 17 0
      liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/Exception2ELDeclSpringBootTest.java
  6. 35 0
      liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java
  7. 28 0
      liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java
  8. 3 0
      liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/resources/exception/flow.el.xml
  9. 12 0
      liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java
  10. 18 0
      liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/exception/Exception2Test.java
  11. 29 0
      liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java
  12. 22 0
      liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java
  13. 5 0
      liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/resources/exception/flow.el.xml
  14. 12 0
      liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java
  15. 18 0
      liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/exception/Exception2ELSpringBootTest.java
  16. 31 0
      liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java
  17. 24 0
      liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java
  18. 4 0
      liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/exception/flow.el.xml
  19. 12 0
      liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java
  20. 18 0
      liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/exception/Exception2ELSpringTest.java
  21. 31 0
      liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java
  22. 24 0
      liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java
  23. 4 0
      liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/resources/exception/flow.el.xml
  24. 12 0
      liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java
  25. 17 0
      liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/Exception2SpringBootTest.java
  26. 35 0
      liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java
  27. 28 0
      liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java
  28. 4 0
      liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/resources/exception/flow.xml
  29. 12 0
      liteflow-testcase-old/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java
  30. 18 4
      liteflow-testcase-old/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/exception/Exception2Test.java
  31. 29 0
      liteflow-testcase-old/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java
  32. 22 0
      liteflow-testcase-old/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java
  33. 6 0
      liteflow-testcase-old/liteflow-testcase-nospring/src/test/resources/exception/flow.xml
  34. 12 0
      liteflow-testcase-old/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java
  35. 17 0
      liteflow-testcase-old/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/exception/Exception2SpringBootTest.java
  36. 31 0
      liteflow-testcase-old/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java
  37. 24 0
      liteflow-testcase-old/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java
  38. 4 0
      liteflow-testcase-old/liteflow-testcase-springboot/src/test/resources/exception/flow.xml
  39. 12 0
      liteflow-testcase-old/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java
  40. 18 0
      liteflow-testcase-old/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/exception/Exception2SpringTest.java
  41. 31 0
      liteflow-testcase-old/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java
  42. 24 0
      liteflow-testcase-old/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java
  43. 4 0
      liteflow-testcase-old/liteflow-testcase-springnative/src/test/resources/exception/flow.xml

+ 1 - 11
liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java

@@ -208,18 +208,8 @@ public class FlowExecutor {
 
     private LiteflowResponse execute2Resp(String chainId, Object param, Class<?>[] contextBeanClazzArray,
                                           Integer slotIndex, boolean isInnerChain) {
-        LiteflowResponse response = new LiteflowResponse();
-
         Slot slot = doExecute(chainId, param, contextBeanClazzArray, slotIndex, isInnerChain);
-
-        if (ObjectUtil.isNotNull(slot.getException())) {
-            response.setSuccess(false);
-            response.setMessage(slot.getException().getMessage());
-            response.setCause(slot.getException());
-        } else {
-            response.setSuccess(true);
-        }
-        response.setSlot(slot);
+        LiteflowResponse response = new LiteflowResponse(slot);
         return response;
     }
 

+ 83 - 0
liteflow-core/src/main/java/com/yomahub/liteflow/exception/LiteFlowException.java

@@ -0,0 +1,83 @@
+
+package com.yomahub.liteflow.exception;
+
+/**
+ * LiteFlow架内部逻辑发生错误抛出的异常
+ * (自定义此异常方便开发者在做全局异常处理时分辨异常类型)
+ *
+ * @author zendwang
+ *
+ */
+public class LiteFlowException extends RuntimeException {
+
+	private static final long serialVersionUID = 1L;
+
+	/** 异常状态码 */
+	private int code;
+
+	/**
+	 * 构建一个异常
+	 *
+	 * @param message 异常描述信息
+	 */
+	public LiteFlowException(String message) {
+		super(message);
+	}
+
+	/**
+	 * 构建一个异常
+	 * @param code 异常状态码
+	 * @param message 异常描述信息
+	 */
+	public LiteFlowException(int code, String message) {
+		super(message);
+		this.code = code;
+	}
+
+	/**
+	 * 构建一个异常
+	 *
+	 * @param cause 异常对象
+	 */
+	public LiteFlowException(Throwable cause) {
+		super(cause);
+	}
+
+	/**
+	 * 构建一个异常
+	 * @param code 异常状态码
+	 * @param cause 异常对象
+	 */
+	public LiteFlowException(int code, Throwable cause) {
+		super(cause);
+		this.code = code;
+	}
+
+	/**
+	 * 构建一个异常
+	 *
+	 * @param message 异常信息
+	 * @param cause 异常对象
+	 */
+	public LiteFlowException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	/**
+	 * 构建一个异常
+	 * @param code 异常状态码
+	 * @param message 异常信息
+	 * @param cause 异常对象
+	 */
+	public LiteFlowException(int code, String message, Throwable cause) {
+		super(message, cause);
+		this.code = code;
+	}
+
+	/**
+	 * @return 获得异常状态码
+	 */
+	public int getCode() {
+		return code;
+	}
+}

+ 24 - 8
liteflow-core/src/main/java/com/yomahub/liteflow/flow/LiteflowResponse.java

@@ -1,5 +1,6 @@
 package com.yomahub.liteflow.flow;
 
+import com.yomahub.liteflow.exception.LiteFlowException;
 import com.yomahub.liteflow.flow.entity.CmpStep;
 import com.yomahub.liteflow.slot.Slot;
 
@@ -7,9 +8,6 @@ import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Queue;
-import java.util.function.Consumer;
-import java.util.function.Function;
-import java.util.stream.Collectors;
 
 /**
  * 执行结果封装类
@@ -20,7 +18,9 @@ public class LiteflowResponse implements Serializable {
     private static final long serialVersionUID = -2792556188993845048L;
     
     private boolean success;
-    
+
+    private int code;
+
     private String message;
     
     private Exception cause;
@@ -31,8 +31,16 @@ public class LiteflowResponse implements Serializable {
       this(null);
     }
     public LiteflowResponse(Slot slot) {
-        this.success = true;
-        this.message = "";
+        if (slot != null && slot.getException() != null) {
+            this.success = false;
+            this.cause = slot.getException();
+            this.message = this.cause.getMessage();
+            this.code = this.cause instanceof LiteFlowException ? ((LiteFlowException)this.cause).getCode() : -1;
+        } else {
+            this.success = true;
+            this.code = 0;
+            this.message = "";
+        }
         this.slot = slot;
     }
     
@@ -51,7 +59,15 @@ public class LiteflowResponse implements Serializable {
     public void setMessage(final String message) {
         this.message = message;
     }
-    
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
     public Exception getCause() {
         return cause;
     }
@@ -59,7 +75,7 @@ public class LiteflowResponse implements Serializable {
     public void setCause(final Exception cause) {
         this.cause = cause;
     }
-    
+
     public Slot getSlot() {
         return slot;
     }

+ 12 - 0
liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java

@@ -0,0 +1,12 @@
+package com.yomahub.liteflow.test.exception;
+
+import com.yomahub.liteflow.exception.LiteFlowException;
+
+/**
+ * 用户自定义带状态码的异常
+ */
+public class CustomStatefulException extends LiteFlowException {
+	public CustomStatefulException(int code, String message) {
+		super(code, message);
+	}
+}

+ 17 - 0
liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/Exception2ELDeclSpringBootTest.java

@@ -56,4 +56,21 @@ public class Exception2ELDeclSpringBootTest extends BaseTest {
         Assert.assertFalse(response.isSuccess());
         throw response.getCause();
     }
+
+    @Test
+    public void testInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "custom-stateful-exception");
+        Assert.assertFalse(response.isSuccess());
+        Assert.assertEquals(300, response.getCode());
+        Assert.assertNotNull(response.getCause());
+        Assert.assertTrue(response.getCause() instanceof LiteFlowException);
+        Assert.assertNotNull(response.getSlot());
+    }
+
+    @Test
+    public void testNotInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "test");
+        Assert.assertTrue(response.isSuccess());
+        Assert.assertEquals(0, response.getCode());
+    }
 }

+ 35 - 0
liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java

@@ -0,0 +1,35 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import cn.hutool.core.util.StrUtil;
+import com.yomahub.liteflow.annotation.LiteflowCmpDefine;
+import com.yomahub.liteflow.annotation.LiteflowMethod;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
+import com.yomahub.liteflow.test.exception.CustomStatefulException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("f")
+@LiteflowCmpDefine
+public class FCmp {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(FCmp.class);
+	
+	@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
+	public void process(NodeComponent bindCmp) {
+		String str = bindCmp.getRequestData();
+		if(StrUtil.isNotBlank(str) && str.equals("custom-stateful-exception")) {
+			throw new CustomStatefulException(300, "chain execute custom stateful execption");
+		}
+		LOG.info("Fcomp executed!");
+	}
+
+}

+ 28 - 0
liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java

@@ -0,0 +1,28 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import com.yomahub.liteflow.annotation.LiteflowCmpDefine;
+import com.yomahub.liteflow.annotation.LiteflowMethod;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("g")
+@LiteflowCmpDefine
+public class GCmp {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(GCmp.class);
+	
+	@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
+	public void process(NodeComponent bindCmp) {
+		LOG.info("Gcomp executed!");
+	}
+}

+ 3 - 0
liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/resources/exception/flow.el.xml

@@ -16,4 +16,7 @@
         SWITCH(e).to(b, c);
     </chain>
 
+    <chain name="chain6">
+        THEN(f, g);
+    </chain>
 </flow>

+ 12 - 0
liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java

@@ -0,0 +1,12 @@
+package com.yomahub.liteflow.test.exception;
+
+import com.yomahub.liteflow.exception.LiteFlowException;
+
+/**
+ * 用户自定义带状态码的异常
+ */
+public class CustomStatefulException extends LiteFlowException {
+	public CustomStatefulException(int code, String message) {
+		super(code, message);
+	}
+}

+ 18 - 0
liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/exception/Exception2Test.java

@@ -5,6 +5,7 @@ import com.yomahub.liteflow.core.FlowExecutor;
 import com.yomahub.liteflow.core.FlowExecutorHolder;
 import com.yomahub.liteflow.exception.ChainNotFoundException;
 import com.yomahub.liteflow.exception.FlowSystemException;
+import com.yomahub.liteflow.exception.LiteFlowException;
 import com.yomahub.liteflow.exception.NoSwitchTargetNodeException;
 import com.yomahub.liteflow.flow.LiteflowResponse;
 import com.yomahub.liteflow.property.LiteflowConfig;
@@ -63,4 +64,21 @@ public class Exception2Test extends BaseTest {
         Assert.assertFalse(response.isSuccess());
         throw response.getCause();
     }
+
+    @Test
+    public void testInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "custom-stateful-exception");
+        Assert.assertFalse(response.isSuccess());
+        Assert.assertEquals(300, response.getCode());
+        Assert.assertNotNull(response.getCause());
+        Assert.assertTrue(response.getCause() instanceof LiteFlowException);
+        Assert.assertNotNull(response.getSlot());
+    }
+
+    @Test
+    public void testNotInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "test");
+        Assert.assertTrue(response.isSuccess());
+        Assert.assertEquals(0, response.getCode());
+    }
 }

+ 29 - 0
liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java

@@ -0,0 +1,29 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import cn.hutool.core.util.StrUtil;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.test.exception.CustomStatefulException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class FCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(FCmp.class);
+	
+	@Override
+	public void process() {
+		String str = this.getRequestData();
+		if(StrUtil.isNotBlank(str) && str.equals("custom-stateful-exception")) {
+			throw new CustomStatefulException(300, "chain execute custom stateful execption");
+		}
+		LOG.info("Fcomp executed!");
+	}
+
+}

+ 22 - 0
liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java

@@ -0,0 +1,22 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import com.yomahub.liteflow.core.NodeComponent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(GCmp.class);
+	
+	@Override
+	public void process() {
+		LOG.info("Gcomp executed!");
+	}
+}

+ 5 - 0
liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/resources/exception/flow.el.xml

@@ -6,6 +6,8 @@
         <node id="c" class="com.yomahub.liteflow.test.exception.cmp.CCmp"/>
         <node id="d" class="com.yomahub.liteflow.test.exception.cmp.DCmp"/>
         <node id="e" class="com.yomahub.liteflow.test.exception.cmp.ECmp"/>
+        <node id="f" class="com.yomahub.liteflow.test.exception.cmp.FCmp"/>
+        <node id="g" class="com.yomahub.liteflow.test.exception.cmp.GCmp"/>
     </nodes>
 
     <chain name="chain1">
@@ -24,4 +26,7 @@
         SWITCH(e).to(b, c);
     </chain>
 
+    <chain name="chain6">
+        THEN(f, g);
+    </chain>
 </flow>

+ 12 - 0
liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java

@@ -0,0 +1,12 @@
+package com.yomahub.liteflow.test.exception;
+
+import com.yomahub.liteflow.exception.LiteFlowException;
+
+/**
+ * 用户自定义带状态码的异常
+ */
+public class CustomStatefulException extends LiteFlowException {
+	public CustomStatefulException(int code, String message) {
+		super(code, message);
+	}
+}

+ 18 - 0
liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/exception/Exception2ELSpringBootTest.java

@@ -3,6 +3,7 @@ package com.yomahub.liteflow.test.exception;
 import com.yomahub.liteflow.core.FlowExecutor;
 import com.yomahub.liteflow.exception.ChainNotFoundException;
 import com.yomahub.liteflow.exception.FlowSystemException;
+import com.yomahub.liteflow.exception.LiteFlowException;
 import com.yomahub.liteflow.exception.NoSwitchTargetNodeException;
 import com.yomahub.liteflow.flow.LiteflowResponse;
 import com.yomahub.liteflow.test.BaseTest;
@@ -63,4 +64,21 @@ public class Exception2ELSpringBootTest extends BaseTest {
         Assert.assertFalse(response.isSuccess());
         throw response.getCause();
     }
+
+    @Test
+    public void testInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "custom-stateful-exception");
+        Assert.assertFalse(response.isSuccess());
+        Assert.assertEquals(300, response.getCode());
+        Assert.assertNotNull(response.getCause());
+        Assert.assertTrue(response.getCause() instanceof LiteFlowException);
+        Assert.assertNotNull(response.getSlot());
+    }
+
+    @Test
+    public void testNotInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "test");
+        Assert.assertTrue(response.isSuccess());
+        Assert.assertEquals(0, response.getCode());
+    }
 }

+ 31 - 0
liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java

@@ -0,0 +1,31 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import cn.hutool.core.util.StrUtil;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.test.exception.CustomStatefulException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("f")
+public class FCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(FCmp.class);
+	
+	@Override
+	public void process() {
+		String str = this.getRequestData();
+		if(StrUtil.isNotBlank(str) && str.equals("custom-stateful-exception")) {
+			throw new CustomStatefulException(300, "chain execute custom stateful execption");
+		}
+		LOG.info("Fcomp executed!");
+	}
+
+}

+ 24 - 0
liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java

@@ -0,0 +1,24 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import com.yomahub.liteflow.core.NodeComponent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("g")
+public class GCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(GCmp.class);
+	
+	@Override
+	public void process() {
+		LOG.info("Gcomp executed!");
+	}
+}

+ 4 - 0
liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/exception/flow.el.xml

@@ -16,4 +16,8 @@
         SWITCH(e).to(b, c);
     </chain>
 
+    <chain name="chain6">
+        THEN(f, g);
+    </chain>
+
 </flow>

+ 12 - 0
liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java

@@ -0,0 +1,12 @@
+package com.yomahub.liteflow.test.exception;
+
+import com.yomahub.liteflow.exception.LiteFlowException;
+
+/**
+ * 用户自定义带状态码的异常
+ */
+public class CustomStatefulException extends LiteFlowException {
+	public CustomStatefulException(int code, String message) {
+		super(code, message);
+	}
+}

+ 18 - 0
liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/exception/Exception2ELSpringTest.java

@@ -2,6 +2,7 @@ package com.yomahub.liteflow.test.exception;
 
 import com.yomahub.liteflow.core.FlowExecutor;
 import com.yomahub.liteflow.exception.ChainNotFoundException;
+import com.yomahub.liteflow.exception.LiteFlowException;
 import com.yomahub.liteflow.exception.NoSwitchTargetNodeException;
 import com.yomahub.liteflow.flow.LiteflowResponse;
 import com.yomahub.liteflow.test.BaseTest;
@@ -50,4 +51,21 @@ public class Exception2ELSpringTest extends BaseTest {
         Assert.assertFalse(response.isSuccess());
         throw response.getCause();
     }
+
+    @Test
+    public void testInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "custom-stateful-exception");
+        Assert.assertFalse(response.isSuccess());
+        Assert.assertEquals(300, response.getCode());
+        Assert.assertNotNull(response.getCause());
+        Assert.assertTrue(response.getCause() instanceof LiteFlowException);
+        Assert.assertNotNull(response.getSlot());
+    }
+
+    @Test
+    public void testNotInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "test");
+        Assert.assertTrue(response.isSuccess());
+        Assert.assertEquals(0, response.getCode());
+    }
 }

+ 31 - 0
liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java

@@ -0,0 +1,31 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import cn.hutool.core.util.StrUtil;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.test.exception.CustomStatefulException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("f")
+public class FCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(FCmp.class);
+	
+	@Override
+	public void process() {
+		String str = this.getRequestData();
+		if(StrUtil.isNotBlank(str) && str.equals("custom-stateful-exception")) {
+			throw new CustomStatefulException(300, "chain execute custom stateful execption");
+		}
+		LOG.info("Fcomp executed!");
+	}
+
+}

+ 24 - 0
liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java

@@ -0,0 +1,24 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import com.yomahub.liteflow.core.NodeComponent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("g")
+public class GCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(GCmp.class);
+	
+	@Override
+	public void process() {
+		LOG.info("Gcomp executed!");
+	}
+}

+ 4 - 0
liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/resources/exception/flow.el.xml

@@ -16,4 +16,8 @@
         SWITCH(e).to(b, c);
     </chain>
 
+    <chain name="chain6">
+        THEN(f, g);
+    </chain>
+
 </flow>

+ 12 - 0
liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java

@@ -0,0 +1,12 @@
+package com.yomahub.liteflow.test.exception;
+
+import com.yomahub.liteflow.exception.LiteFlowException;
+
+/**
+ * 用户自定义带状态码的异常
+ */
+public class CustomStatefulException extends LiteFlowException {
+	public CustomStatefulException(int code, String message) {
+		super(code, message);
+	}
+}

+ 17 - 0
liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/Exception2SpringBootTest.java

@@ -68,4 +68,21 @@ public class Exception2SpringBootTest extends BaseTest {
         Assert.assertFalse(response.isSuccess());
         throw response.getCause();
     }
+
+    @Test
+    public void testInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "custom-stateful-exception");
+        Assert.assertFalse(response.isSuccess());
+        Assert.assertEquals(300, response.getCode());
+        Assert.assertNotNull(response.getCause());
+        Assert.assertTrue(response.getCause() instanceof LiteFlowException);
+        Assert.assertNotNull(response.getSlot());
+    }
+
+    @Test
+    public void testNotInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "test");
+        Assert.assertTrue(response.isSuccess());
+        Assert.assertEquals(0, response.getCode());
+    }
 }

+ 35 - 0
liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java

@@ -0,0 +1,35 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import cn.hutool.core.util.StrUtil;
+import com.yomahub.liteflow.annotation.LiteflowCmpDefine;
+import com.yomahub.liteflow.annotation.LiteflowMethod;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
+import com.yomahub.liteflow.test.exception.CustomStatefulException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("f")
+@LiteflowCmpDefine
+public class FCmp {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(FCmp.class);
+	
+	@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
+	public void process(NodeComponent bindCmp) {
+		String str = bindCmp.getRequestData();
+		if(StrUtil.isNotBlank(str) && str.equals("custom-stateful-exception")) {
+			throw new CustomStatefulException(300, "chain execute custom stateful execption");
+		}
+		LOG.info("Fcomp executed!");
+	}
+
+}

+ 28 - 0
liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java

@@ -0,0 +1,28 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import com.yomahub.liteflow.annotation.LiteflowCmpDefine;
+import com.yomahub.liteflow.annotation.LiteflowMethod;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("g")
+@LiteflowCmpDefine
+public class GCmp {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(GCmp.class);
+	
+	@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
+	public void process(NodeComponent bindCmp) {
+		LOG.info("Gcomp executed!");
+	}
+}

+ 4 - 0
liteflow-testcase-old/liteflow-testcase-declare-springboot/src/test/resources/exception/flow.xml

@@ -18,4 +18,8 @@
     <chain name="chain5">
         <then value="e(b|c)"/>
     </chain>
+
+    <chain name="chain6">
+        <then value="f,g"/>
+    </chain>
 </flow>

+ 12 - 0
liteflow-testcase-old/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java

@@ -0,0 +1,12 @@
+package com.yomahub.liteflow.test.exception;
+
+import com.yomahub.liteflow.exception.LiteFlowException;
+
+/**
+ * 用户自定义带状态码的异常
+ */
+public class CustomStatefulException extends LiteFlowException {
+	public CustomStatefulException(int code, String message) {
+		super(code, message);
+	}
+}

+ 18 - 4
liteflow-testcase-old/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/exception/Exception2Test.java

@@ -2,11 +2,8 @@ package com.yomahub.liteflow.test.exception;
 
 import com.yomahub.liteflow.core.FlowExecutor;
 import com.yomahub.liteflow.core.FlowExecutorHolder;
-import com.yomahub.liteflow.exception.NoSwitchTargetNodeException;
+import com.yomahub.liteflow.exception.*;
 import com.yomahub.liteflow.flow.LiteflowResponse;
-import com.yomahub.liteflow.exception.ChainNotFoundException;
-import com.yomahub.liteflow.exception.FlowExecutorNotInitException;
-import com.yomahub.liteflow.exception.FlowSystemException;
 import com.yomahub.liteflow.property.LiteflowConfig;
 import com.yomahub.liteflow.property.LiteflowConfigGetter;
 import com.yomahub.liteflow.slot.DefaultContext;
@@ -64,4 +61,21 @@ public class Exception2Test extends BaseTest {
         Assert.assertFalse(response.isSuccess());
         throw response.getCause();
     }
+
+    @Test
+    public void testInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "custom-stateful-exception");
+        Assert.assertFalse(response.isSuccess());
+        Assert.assertEquals(300, response.getCode());
+        Assert.assertNotNull(response.getCause());
+        Assert.assertTrue(response.getCause() instanceof LiteFlowException);
+        Assert.assertNotNull(response.getSlot());
+    }
+
+    @Test
+    public void testNotInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "test");
+        Assert.assertTrue(response.isSuccess());
+        Assert.assertEquals(0, response.getCode());
+    }
 }

+ 29 - 0
liteflow-testcase-old/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java

@@ -0,0 +1,29 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import cn.hutool.core.util.StrUtil;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.test.exception.CustomStatefulException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class FCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(FCmp.class);
+	
+	@Override
+	public void process() {
+		String str = this.getRequestData();
+		if(StrUtil.isNotBlank(str) && str.equals("custom-stateful-exception")) {
+			throw new CustomStatefulException(300, "chain execute custom stateful execption");
+		}
+		LOG.info("Fcomp executed!");
+	}
+
+}

+ 22 - 0
liteflow-testcase-old/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java

@@ -0,0 +1,22 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import com.yomahub.liteflow.core.NodeComponent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(GCmp.class);
+	
+	@Override
+	public void process() {
+		LOG.info("Gcomp executed!");
+	}
+}

+ 6 - 0
liteflow-testcase-old/liteflow-testcase-nospring/src/test/resources/exception/flow.xml

@@ -6,6 +6,8 @@
         <node id="c" class="com.yomahub.liteflow.test.exception.cmp.CCmp"/>
         <node id="d" class="com.yomahub.liteflow.test.exception.cmp.DCmp"/>
         <node id="e" class="com.yomahub.liteflow.test.exception.cmp.ECmp"/>
+        <node id="f" class="com.yomahub.liteflow.test.exception.cmp.FCmp"/>
+        <node id="g" class="com.yomahub.liteflow.test.exception.cmp.GCmp"/>
     </nodes>
 
     <chain name="chain1">
@@ -26,4 +28,8 @@
     <chain name="chain5">
         <then value="e(b|c)"/>
     </chain>
+
+    <chain name="chain6">
+        <then value="f,g"/>
+    </chain>
 </flow>

+ 12 - 0
liteflow-testcase-old/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java

@@ -0,0 +1,12 @@
+package com.yomahub.liteflow.test.exception;
+
+import com.yomahub.liteflow.exception.LiteFlowException;
+
+/**
+ * 用户自定义带状态码的异常
+ */
+public class CustomStatefulException extends LiteFlowException {
+	public CustomStatefulException(int code, String message) {
+		super(code, message);
+	}
+}

+ 17 - 0
liteflow-testcase-old/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/exception/Exception2SpringBootTest.java

@@ -71,4 +71,21 @@ public class Exception2SpringBootTest extends BaseTest {
         Assert.assertFalse(response.isSuccess());
         throw response.getCause();
     }
+
+    @Test
+    public void testInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "custom-stateful-exception");
+        Assert.assertFalse(response.isSuccess());
+        Assert.assertEquals(300, response.getCode());
+        Assert.assertNotNull(response.getCause());
+        Assert.assertTrue(response.getCause() instanceof LiteFlowException);
+        Assert.assertNotNull(response.getSlot());
+    }
+
+    @Test
+    public void testNotInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "test");
+        Assert.assertTrue(response.isSuccess());
+        Assert.assertEquals(0, response.getCode());
+    }
 }

+ 31 - 0
liteflow-testcase-old/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java

@@ -0,0 +1,31 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import cn.hutool.core.util.StrUtil;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.test.exception.CustomStatefulException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("f")
+public class FCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(FCmp.class);
+	
+	@Override
+	public void process() {
+		String str = this.getRequestData();
+		if(StrUtil.isNotBlank(str) && str.equals("custom-stateful-exception")) {
+			throw new CustomStatefulException(300, "chain execute custom stateful execption");
+		}
+		LOG.info("Fcomp executed!");
+	}
+
+}

+ 24 - 0
liteflow-testcase-old/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java

@@ -0,0 +1,24 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import com.yomahub.liteflow.core.NodeComponent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("g")
+public class GCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(GCmp.class);
+	
+	@Override
+	public void process() {
+		LOG.info("Gcomp executed!");
+	}
+}

+ 4 - 0
liteflow-testcase-old/liteflow-testcase-springboot/src/test/resources/exception/flow.xml

@@ -18,4 +18,8 @@
     <chain name="chain5">
         <then value="e(b|c)"/>
     </chain>
+
+    <chain name="chain6">
+        <then value="f,g"/>
+    </chain>
 </flow>

+ 12 - 0
liteflow-testcase-old/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/exception/CustomStatefulException.java

@@ -0,0 +1,12 @@
+package com.yomahub.liteflow.test.exception;
+
+import com.yomahub.liteflow.exception.LiteFlowException;
+
+/**
+ * 用户自定义带状态码的异常
+ */
+public class CustomStatefulException extends LiteFlowException {
+	public CustomStatefulException(int code, String message) {
+		super(code, message);
+	}
+}

+ 18 - 0
liteflow-testcase-old/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/exception/Exception2SpringTest.java

@@ -1,6 +1,7 @@
 package com.yomahub.liteflow.test.exception;
 
 import com.yomahub.liteflow.core.FlowExecutor;
+import com.yomahub.liteflow.exception.LiteFlowException;
 import com.yomahub.liteflow.exception.NoSwitchTargetNodeException;
 import com.yomahub.liteflow.flow.LiteflowResponse;
 import com.yomahub.liteflow.exception.ChainNotFoundException;
@@ -61,4 +62,21 @@ public class Exception2SpringTest extends BaseTest {
         Assert.assertFalse(response.isSuccess());
         throw response.getCause();
     }
+
+    @Test
+    public void testInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "custom-stateful-exception");
+        Assert.assertFalse(response.isSuccess());
+        Assert.assertEquals(300, response.getCode());
+        Assert.assertNotNull(response.getCause());
+        Assert.assertTrue(response.getCause() instanceof LiteFlowException);
+        Assert.assertNotNull(response.getSlot());
+    }
+
+    @Test
+    public void testNotInvokeCustomStatefulException() {
+        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "test");
+        Assert.assertTrue(response.isSuccess());
+        Assert.assertEquals(0, response.getCode());
+    }
 }

+ 31 - 0
liteflow-testcase-old/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/exception/cmp/FCmp.java

@@ -0,0 +1,31 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import cn.hutool.core.util.StrUtil;
+import com.yomahub.liteflow.core.NodeComponent;
+import com.yomahub.liteflow.test.exception.CustomStatefulException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("f")
+public class FCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(FCmp.class);
+	
+	@Override
+	public void process() {
+		String str = this.getRequestData();
+		if(StrUtil.isNotBlank(str) && str.equals("custom-stateful-exception")) {
+			throw new CustomStatefulException(300, "chain execute custom stateful execption");
+		}
+		LOG.info("Fcomp executed!");
+	}
+
+}

+ 24 - 0
liteflow-testcase-old/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/exception/cmp/GCmp.java

@@ -0,0 +1,24 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.exception.cmp;
+
+import com.yomahub.liteflow.core.NodeComponent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component("g")
+public class GCmp extends NodeComponent {
+	
+	private static final Logger LOG = LoggerFactory.getLogger(GCmp.class);
+	
+	@Override
+	public void process() {
+		LOG.info("Gcomp executed!");
+	}
+}

+ 4 - 0
liteflow-testcase-old/liteflow-testcase-springnative/src/test/resources/exception/flow.xml

@@ -18,4 +18,8 @@
     <chain name="chain5">
         <then value="e(b|c)"/>
     </chain>
+
+    <chain name="chain6">
+        <then value="f,g"/>
+    </chain>
 </flow>