diff --git a/liteflow-test-spring/pom.xml b/liteflow-test-spring/pom.xml deleted file mode 100644 index 25c994a65..000000000 --- a/liteflow-test-spring/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - 4.0.0 - jar - liteflow-test-spring - - - liteflow - com.yomahub - 2.5.11 - - - - - org.springframework - spring-beans - true - - - org.springframework - spring-context - true - - - org.springframework - spring-aop - true - - - org.springframework - spring-expression - true - - - org.springframework - spring-test - true - - - com.yomahub - liteflow-core - ${project.parent.version} - - - ch.qos.logback - logback-classic - 1.2.3 - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.18.1 - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 - - true - - - - - diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/Runner.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/Runner.java deleted file mode 100644 index 5a3942b45..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/Runner.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.yomahub.flowtest; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.entity.data.LiteflowResponse; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -public class Runner { - - private static final Logger log = LoggerFactory.getLogger(Runner.class); - private static ClassPathXmlApplicationContext context; - - public static void main(String[] args) throws Throwable { - context = new ClassPathXmlApplicationContext(new String[]{"/applicationContext.xml"}); - context.start(); - log.info("启动成功"); - FlowExecutor flowExecutor = context.getBean(FlowExecutor.class); - LiteflowResponse response = flowExecutor.execute2Resp("chain3", "it's a request"); - System.out.println(response); - - while (true){ - Thread.sleep(60000); - } - -// System.exit(0); - } -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/AComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/AComponent.java deleted file mode 100644 index 4a3e94438..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/AComponent.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("a") -public class AComponent extends NodeComponent { - - @Override - public void process() { - String str = this.getSlot().getRequestData(); - System.out.println(str); - System.out.println("Acomponent executed!"); - - this.getSlot().setOutput(this.getNodeId(), "A component output"); - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/BComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/BComponent.java deleted file mode 100644 index 0ab719582..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/BComponent.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("b") -public class BComponent extends NodeComponent { - - @Override - public void process() { - try { - Thread.sleep(400L); - String[] temp = new String[1000]; - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("Bcomponent executed!"); - - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/CComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/CComponent.java deleted file mode 100644 index fbb3ce335..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/CComponent.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("c") -public class CComponent extends NodeComponent { - - @Override - public void process() { - try { - String[] temp = new String[4000]; - Thread.sleep(300L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - this.getSlot().setData("m_flag",4); - System.out.println("Ccomponent executed!"); - - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/CondComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/CondComponent.java deleted file mode 100644 index 708b9b8a3..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/CondComponent.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - *

Title: litis

- *

Description: redis的全方位开发运维平台

- *

Copyright: Copyright (c) 2017

- * @author Bryan.Zhang - * @email 47483522@qq.com - * @Date 2017-11-28 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeCondComponent; -import org.springframework.stereotype.Component; - -@Component("cond") -public class CondComponent extends NodeCondComponent { - - @Override - public String processCond() throws Exception { - return "b"; - } -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/DComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/DComponent.java deleted file mode 100644 index c0e17e845..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/DComponent.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import com.yomahub.liteflow.entity.data.Slot; -import org.springframework.stereotype.Component; - -@Component("d") -public class DComponent extends NodeComponent { - - @Override - public void process() { - try { - Slot slot = this.getSlot(); - String e = slot.getOutput("e"); - if(e == null){ - System.out.println(slot); - } - System.out.println("D:" + slot.getOutput("e")); - - String[] temp = new String[1400]; - Thread.sleep(450L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("Dcomponent executed!"); - - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/EComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/EComponent.java deleted file mode 100644 index 62b9e2af3..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/EComponent.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("e") -public class EComponent extends NodeComponent { - - @Override - public void process() { - try { - Thread.sleep(120L); - System.out.println("E:" + this.getSlot().getOutput("a")); - this.getSlot().setOutput(this.getNodeId(), "E component output"); - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("Eomponent executed!"); - - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/FComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/FComponent.java deleted file mode 100644 index d59ba1904..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/FComponent.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("f") -public class FComponent extends NodeComponent { - - @Override - public void process() { - try { - String[] temp = new String[400]; - Thread.sleep(40L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("Fcomponent executed!"); - - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/GComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/GComponent.java deleted file mode 100644 index 50392fffa..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/GComponent.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("g") -public class GComponent extends NodeComponent { - - @Override - public void process() { - System.out.println("Gcomponent executed!"); - this.getSlot().setResponseData("i am a response"); - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/HComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/HComponent.java deleted file mode 100644 index a357c34bb..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/HComponent.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import com.yomahub.liteflow.entity.data.DefaultSlot; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("h") -public class HComponent extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("Hcomponent executed!"); - try{ - flowExecutor.invoke("strategy1",3, DefaultSlot.class, this.getSlotIndex()); - }catch (Exception e){ - e.printStackTrace(); - } - } -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/M1Component.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/M1Component.java deleted file mode 100644 index 75095103d..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/M1Component.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("m1") -public class M1Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("m1 component executed!"); - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/M2Component.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/M2Component.java deleted file mode 100644 index 4c844e0fa..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/M2Component.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("m2") -public class M2Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("m2 component executed!"); - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/M3Component.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/M3Component.java deleted file mode 100644 index 0a15fbbad..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/M3Component.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import com.yomahub.liteflow.entity.data.DefaultSlot; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("m3") -public class M3Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("m3 component executed!"); - try{ - flowExecutor.invoke("strategy2",10, DefaultSlot.class, this.getSlotIndex()); - }catch (Exception e){ - e.printStackTrace(); - } - } -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/MComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/MComponent.java deleted file mode 100644 index a39b514b1..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/MComponent.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeCondComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("m") -public class MComponent extends NodeCondComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public String processCond() throws Exception { - System.out.println("m conponent executed"); - Integer flag = this.getSlot().getData("m_flag"); - if(flag == 1) { - return "m1"; - }else if(flag == 2){ - return "m2"; - }else if(flag == 3){ - return "m3"; - }else{ - return "strategy2"; - } - - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/P1Component.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/P1Component.java deleted file mode 100644 index 671c272fa..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/P1Component.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("p1") -public class P1Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("p1 component executed!"); - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/P2Component.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/P2Component.java deleted file mode 100644 index cae43ac92..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/P2Component.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("p2") -public class P2Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("p2 component executed!"); - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/PComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/PComponent.java deleted file mode 100644 index bb8fce13b..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/PComponent.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeCondComponent; -import org.springframework.stereotype.Component; - -@Component("p") -public class PComponent extends NodeCondComponent { - - @Override - public String processCond() throws Exception { - System.out.println("p conponent executed"); - Integer flag = this.getSlot().getData("p_flag"); - if(flag == 10) { - return "p1"; - }else { - return "p2"; - } - - } - -} diff --git a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/QComponent.java b/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/QComponent.java deleted file mode 100644 index e6b001e0e..000000000 --- a/liteflow-test-spring/src/main/java/com/yomahub/flowtest/components/QComponent.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("q") -public class QComponent extends NodeComponent { - @Override - public void process() throws Exception { - this.getSlot().setData("p_flag",10); - System.out.println("Qcomponent executed!"); - } -} diff --git a/liteflow-test-spring/src/main/resources/applicationContext.xml b/liteflow-test-spring/src/main/resources/applicationContext.xml deleted file mode 100644 index f3cbabd26..000000000 --- a/liteflow-test-spring/src/main/resources/applicationContext.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/liteflow-test-spring/src/main/resources/config/flow.xml b/liteflow-test-spring/src/main/resources/config/flow.xml deleted file mode 100644 index 2e1d85b74..000000000 --- a/liteflow-test-spring/src/main/resources/config/flow.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/liteflow-test-spring/src/main/resources/logback.xml b/liteflow-test-spring/src/main/resources/logback.xml deleted file mode 100644 index 980b9bbb6..000000000 --- a/liteflow-test-spring/src/main/resources/logback.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - - - - - ${LOG_HOME}/${APP_NAME}.log - - - ${LOG_HOME}/${APP_NAME}.log.%d{yyyy-MM-dd}.%i.log - - 30 - - 1000MB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - - - - - - - - - diff --git a/liteflow-test-springboot/pom.xml b/liteflow-test-springboot/pom.xml deleted file mode 100644 index 886be7d9a..000000000 --- a/liteflow-test-springboot/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - 4.0.0 - jar - liteflow-test-springboot - Demo project for Spring Boot - - - liteflow - com.yomahub - 2.5.11 - - - - - - - org.springframework.boot - spring-boot-dependencies - ${springboot.version} - pom - import - - - - - - - org.springframework.boot - spring-boot-starter - - - - com.yomahub - liteflow-spring-boot-starter - ${project.parent.version} - - - - org.springframework.boot - spring-boot-starter-test - test - - - - org.springframework.boot - spring-boot-configuration-processor - true - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${springboot.version} - - - org.apache.maven.plugins - maven-surefire-plugin - 2.18.1 - - true - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 - - true - - - - - - diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/Runner.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/Runner.java deleted file mode 100644 index 78ab31cb4..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/Runner.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.yomahub.flowtest; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class Runner { - - public static void main(String[] args) { - try{ - SpringApplication.run(Runner.class, args); - System.exit(0); - }catch (Throwable t){ - t.printStackTrace(); - } - } -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/TestFlow.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/TestFlow.java deleted file mode 100644 index f661e7e6a..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/TestFlow.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.yomahub.flowtest; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.entity.data.LiteflowResponse; -import org.springframework.boot.CommandLineRunner; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component -public class TestFlow implements CommandLineRunner { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void run(String... args) throws Exception { - LiteflowResponse response= flowExecutor.execute2Resp("chain3", "it's a request"); - System.out.println(response); - } -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/AComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/AComponent.java deleted file mode 100644 index 4a3e94438..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/AComponent.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("a") -public class AComponent extends NodeComponent { - - @Override - public void process() { - String str = this.getSlot().getRequestData(); - System.out.println(str); - System.out.println("Acomponent executed!"); - - this.getSlot().setOutput(this.getNodeId(), "A component output"); - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/BComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/BComponent.java deleted file mode 100644 index 0ab719582..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/BComponent.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("b") -public class BComponent extends NodeComponent { - - @Override - public void process() { - try { - Thread.sleep(400L); - String[] temp = new String[1000]; - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("Bcomponent executed!"); - - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/CComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/CComponent.java deleted file mode 100644 index 6f2a2b822..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/CComponent.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("c") -public class CComponent extends NodeComponent { - - @Override - public void process() { - try { - String[] temp = new String[4000]; - Thread.sleep(300L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - this.getSlot().setData("m_flag",3); - System.out.println("Ccomponent executed!"); - - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/CondComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/CondComponent.java deleted file mode 100644 index ddd6f835d..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/CondComponent.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - *

Title: litis

- *

Description: redis的全方位开发运维平台

- *

Copyright: Copyright (c) 2017

- * @author Bryan.Zhang - * @email 47483522@qq.com - * @Date 2017-11-28 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import com.yomahub.liteflow.core.NodeCondComponent; -import org.springframework.stereotype.Component; - -@Component("cond") -public class CondComponent extends NodeCondComponent { - - @Override - public String processCond() throws Exception { - return "b"; - } -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/DComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/DComponent.java deleted file mode 100644 index 1bf469168..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/DComponent.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import com.yomahub.liteflow.entity.data.Slot; -import org.springframework.stereotype.Component; - -@Component("d") -public class DComponent extends NodeComponent { - - @Override - public void process() { - System.out.println("Dcomponent executed!"); - - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/EComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/EComponent.java deleted file mode 100644 index 8e87c67ac..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/EComponent.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("e") -public class EComponent extends NodeComponent { - - @Override - public void process() { - try { - Thread.sleep(120L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("Eomponent executed!"); - } -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/FComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/FComponent.java deleted file mode 100644 index d59ba1904..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/FComponent.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("f") -public class FComponent extends NodeComponent { - - @Override - public void process() { - try { - String[] temp = new String[400]; - Thread.sleep(40L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("Fcomponent executed!"); - - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/GComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/GComponent.java deleted file mode 100644 index 6a153e5ca..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/GComponent.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("g") -public class GComponent extends NodeComponent { - - @Override - public void process() { - try{ - Thread.sleep(6000); - }catch (Exception e){ - - } - System.out.println("Gcomponent executed!"); - this.getSlot().setResponseData("i am a response"); - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/HComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/HComponent.java deleted file mode 100644 index a357c34bb..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/HComponent.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import com.yomahub.liteflow.entity.data.DefaultSlot; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("h") -public class HComponent extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("Hcomponent executed!"); - try{ - flowExecutor.invoke("strategy1",3, DefaultSlot.class, this.getSlotIndex()); - }catch (Exception e){ - e.printStackTrace(); - } - } -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/M1Component.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/M1Component.java deleted file mode 100644 index 75095103d..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/M1Component.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("m1") -public class M1Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("m1 component executed!"); - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/M2Component.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/M2Component.java deleted file mode 100644 index 4c844e0fa..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/M2Component.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("m2") -public class M2Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("m2 component executed!"); - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/M3Component.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/M3Component.java deleted file mode 100644 index 0a15fbbad..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/M3Component.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import com.yomahub.liteflow.entity.data.DefaultSlot; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("m3") -public class M3Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("m3 component executed!"); - try{ - flowExecutor.invoke("strategy2",10, DefaultSlot.class, this.getSlotIndex()); - }catch (Exception e){ - e.printStackTrace(); - } - } -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/MComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/MComponent.java deleted file mode 100644 index 294f043c6..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/MComponent.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import com.yomahub.liteflow.core.NodeCondComponent; -import com.yomahub.liteflow.entity.flow.Executable; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("m") -public class MComponent extends NodeCondComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public String processCond() throws Exception { - System.out.println("m conponent executed"); - Integer flag = this.getSlot().getData("m_flag"); - if(flag == 1) { - return "m1"; - }else if(flag == 2){ - return "m2"; - }else { - return "strategy2"; - } - - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/P1Component.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/P1Component.java deleted file mode 100644 index 671c272fa..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/P1Component.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("p1") -public class P1Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("p1 component executed!"); - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/P2Component.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/P2Component.java deleted file mode 100644 index cae43ac92..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/P2Component.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("p2") -public class P2Component extends NodeComponent { - - @Resource - private FlowExecutor flowExecutor; - - @Override - public void process() { - System.out.println("p2 component executed!"); - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/PComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/PComponent.java deleted file mode 100644 index 521d85168..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/PComponent.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - *

Title: liteflow

- *

Description: 轻量级的组件式流程框架

- * @author Bryan.Zhang - * @email weenyc31@163.com - * @Date 2020/4/1 - */ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.core.NodeComponent; -import com.yomahub.liteflow.core.NodeCondComponent; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -@Component("p") -public class PComponent extends NodeCondComponent { - - @Override - public String processCond() throws Exception { - System.out.println("p conponent executed"); - Integer flag = this.getSlot().getData("p_flag"); - if(flag == 10) { - return "p1"; - }else { - return "p2"; - } - - } - -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/QComponent.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/QComponent.java deleted file mode 100644 index e6b001e0e..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/QComponent.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.yomahub.flowtest.components; - -import com.yomahub.liteflow.core.NodeComponent; -import org.springframework.stereotype.Component; - -@Component("q") -public class QComponent extends NodeComponent { - @Override - public void process() throws Exception { - this.getSlot().setData("p_flag",10); - System.out.println("Qcomponent executed!"); - } -} diff --git a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/custom/CustomXmlClass.java b/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/custom/CustomXmlClass.java deleted file mode 100644 index a069aa6fc..000000000 --- a/liteflow-test-springboot/src/main/java/com/yomahub/flowtest/custom/CustomXmlClass.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.yomahub.flowtest.custom; - -import com.yomahub.liteflow.parser.ClassXmlFlowParser; - -/** - * @author guodongqing - * @since 2.5.0 - */ -public class CustomXmlClass extends ClassXmlFlowParser { - @Override - public String parseCustom() { - String content = "\n" + - "\n" + - "\t\n" + - "\t\t\n" + - "\t\t\n" + - "\t\n" + - ""; - return content; - } -} diff --git a/liteflow-test-springboot/src/main/resources/application.properties b/liteflow-test-springboot/src/main/resources/application.properties deleted file mode 100644 index bd92e176f..000000000 --- a/liteflow-test-springboot/src/main/resources/application.properties +++ /dev/null @@ -1,5 +0,0 @@ -liteflow.rule-source=config/flow.xml -liteflow.when-max-wait-seconds=20 -liteflow.monitor.enable-log=true -liteflow.monitor.queue-limit=300 -liteflow.monitor.delay=10000 \ No newline at end of file diff --git a/liteflow-test-springboot/src/main/resources/config/flow.json b/liteflow-test-springboot/src/main/resources/config/flow.json deleted file mode 100644 index 9fdbcc410..000000000 --- a/liteflow-test-springboot/src/main/resources/config/flow.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "flow": { - "nodes": { - "node": [ - { - "id": "a", - "class": "com.yomahub.liteflow.test.component.AComponent" - }, - { - "id": "b", - "class": "com.yomahub.liteflow.test.component.BComponent" - }, - { - "id": "c", - "class": "com.yomahub.liteflow.test.component.CComponent" - }, - { - "id": "d", - "class": "com.yomahub.liteflow.test.component.DComponent" - }, - { - "id": "e", - "class": "com.yomahub.liteflow.test.component.EComponent" - }, - { - "id": "f", - "class": "com.yomahub.liteflow.test.component.FComponent" - }, - { - "id": "g", - "class": "com.yomahub.liteflow.test.component.GComponent" - }, - { - "id": "cond", - "class": "com.yomahub.liteflow.test.component.CondComponent" - } - ] - }, - "chain": [ - { - "name": "chain1", - "condition": [ - {"type": "then", "value": "a,cond(b|d)"}, - {"type": "then", "value": "e,f,g"} - ] - }, - { - "name": "chain2", - "condition": [ - {"type": "then", "value": "a,c"}, - {"type": "when", "value": "b,d,e,f,g"}, - {"type": "then", "value": "c"} - ] - }, - { - "name": "chain3", - "condition": [ - {"type": "then", "value": "a,c,strategy1,g"} - ] - }, - { - "name": "strategy1", - "condition": [ - {"type": "then", "value": "m(m1|m2|strategy2)"} - ] - }, - { - "name": "strategy2", - "condition": [ - {"type": "then", "value": "q,p(p1|p2)"} - ] - } - ] - } -} \ No newline at end of file diff --git a/liteflow-test-springboot/src/main/resources/config/flow.xml b/liteflow-test-springboot/src/main/resources/config/flow.xml deleted file mode 100644 index 7c9a79b0f..000000000 --- a/liteflow-test-springboot/src/main/resources/config/flow.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/liteflow-test-springboot/src/main/resources/config/flow.yml b/liteflow-test-springboot/src/main/resources/config/flow.yml deleted file mode 100644 index 6de4e4796..000000000 --- a/liteflow-test-springboot/src/main/resources/config/flow.yml +++ /dev/null @@ -1,46 +0,0 @@ -flow: - nodes: - node: - - id: a - class: com.yomahub.liteflow.test.component.AComponent - - id: b - class: com.yomahub.liteflow.test.component.BComponent - - id: c - class: com.yomahub.liteflow.test.component.CComponent - - id: d - class: com.yomahub.liteflow.test.component.DComponent - - id: e - class: com.yomahub.liteflow.test.component.EComponent - - id: f - class: com.yomahub.liteflow.test.component.FComponent - - id: g - class: com.yomahub.liteflow.test.component.GComponent - - id: cond - class: com.yomahub.liteflow.test.component.CondComponent - chain: - - name: chain1 - condition: - - type: then - value: 'a,cond(b|d)' - - type: then - value: 'e,f,g' - - name: chain2 - condition: - - type: then - value: 'a,c' - - type: when - value: 'b,d,e,f,g' - - type: then - value: 'c' - - name: chain3 - condition: - - type: then - value: 'a,c,strategy1,g' - - name: strategy1 - condition: - - type: then - value: m(m1|m2|strategy2) - - name: strategy2 - condition: - - type: then - value: 'q,p(p1|p2)' diff --git a/pom.xml b/pom.xml index 9cf3a0739..4ed275f5b 100644 --- a/pom.xml +++ b/pom.xml @@ -229,8 +229,6 @@ liteflow-core liteflow-spring-boot-starter - liteflow-test-springboot - liteflow-test-spring