Переглянути джерело

feature #I5IA5U 提供节点包装语法+替补节点的功能,增加el表达式来完成

everywhere.z 2 роки тому
батько
коміт
f05329c792

+ 7 - 0
liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/substituteNode/SubstituteSpringbootTest.java

@@ -41,4 +41,11 @@ public class SubstituteSpringbootTest extends BaseTest {
         LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg");
         Assert.assertTrue(response.isSuccess());
     }
+
+    //测试特殊命名的节点
+    @Test
+    public void testSub3() throws Exception{
+        LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg");
+        Assert.assertTrue(response.isSuccess());
+    }
 }

+ 21 - 0
liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/substituteNode/cmp/DCmp.java

@@ -0,0 +1,21 @@
+/**
+ * <p>Title: liteflow</p>
+ * <p>Description: 轻量级的组件式流程框架</p>
+ * @author Bryan.Zhang
+ * @email weenyc31@163.com
+ * @Date 2020/4/1
+ */
+package com.yomahub.liteflow.test.substituteNode.cmp;
+
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springframework.stereotype.Component;
+
+@Component("88-ffc")
+public class DCmp extends NodeComponent {
+
+	@Override
+	public void process() {
+		System.out.println("DCmp executed!");
+	}
+
+}

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

@@ -7,4 +7,8 @@
     <chain name="chain2">
         THEN(node("a"), node("b"), node("93-nodeTEST"));
     </chain>
+
+    <chain name="chain3">
+        THEN(a, b, node("88-ffc"));
+    </chain>
 </flow>