diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java b/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java index fc8a09c4a..3e3bc8db1 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java @@ -45,8 +45,6 @@ public class FlowExecutor { private LiteflowConfig liteflowConfig; - private ExecutorService parallelExecutor; - private String zkNode; //FlowExecutor的初始化化方式,主要用于parse规则文件 @@ -130,10 +128,6 @@ public class FlowExecutor { throw new ChainNotFoundException(errorMsg); } - if (parallelExecutor != null) { - chain.setParallelExecutor(parallelExecutor); - } - if(!isInnerChain && slotIndex == null) { slotIndex = DataBus.offerSlot(slotClazz); LOG.info("slot[{}] offered",slotIndex); @@ -192,11 +186,4 @@ public class FlowExecutor { this.liteflowConfig = liteflowConfig; } - public ExecutorService getParallelExecutor() { - return parallelExecutor; - } - - public void setParallelExecutor(ExecutorService parallelExecutor) { - this.parallelExecutor = parallelExecutor; - } } diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/entity/flow/Chain.java b/liteflow-core/src/main/java/com/yomahub/liteflow/entity/flow/Chain.java index 014ccc340..f6433dc7c 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/entity/flow/Chain.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/entity/flow/Chain.java @@ -40,8 +40,6 @@ public class Chain implements Executable { private static int whenMaxWaitSeconds; - private ExecutorService parallelExecutor; - static { LiteflowConfig liteflowConfig = SpringAware.getBean(LiteflowConfig.class); if (ObjectUtil.isNotNull(liteflowConfig)) { @@ -56,14 +54,6 @@ public class Chain implements Executable { this.conditionList = conditionList; } - public ExecutorService getParallelExecutor() { - return parallelExecutor; - } - - public void setParallelExecutor(ExecutorService parallelExecutor) { - this.parallelExecutor = parallelExecutor; - } - public List getConditionList() { return conditionList; } @@ -101,18 +91,8 @@ public class Chain implements Executable { } } } else if (condition instanceof WhenCondition) { - /** - for (Executable executableItem : condition.getNodeList()) { - * 设置了线程池且当前condition isSync = true时,使用异步线程池执行 - new WhenConditionThread(executableItem, slotIndex, slot.getRequestId(), latch).start(); - */ - if (((WhenCondition) condition).isASync() && parallelExecutor != null) { - executeAsyncCondition((WhenCondition) condition, slotIndex, slot.getRequestId()); - } else { - for (Executable executableItem : condition.getNodeList()) { - executableItem.execute(slotIndex); - } - } + + executeAsyncCondition((WhenCondition) condition, slotIndex, slot.getRequestId()); } } } @@ -128,16 +108,14 @@ public class Chain implements Executable { } - /** - * 使用线程池执行并发流程 - * @param condition - * @param slotIndex - * @param requestId - */ + // 使用线程池执行when并发流程 private void executeAsyncCondition(WhenCondition condition, Integer slotIndex, String requestId) { + ExecutorService parallelExecutor = SpringAware.getBean(ExecutorService.class); + final CountDownLatch latch = new CountDownLatch(condition.getNodeList().size()); final List> futures = new ArrayList<>(condition.getNodeList().size()); + for (int i = 0; i < condition.getNodeList().size(); i++) { futures.add(parallelExecutor.submit( new ParallelCondition(condition.getNodeList().get(i), slotIndex, requestId, latch) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/entity/flow/WhenCondition.java b/liteflow-core/src/main/java/com/yomahub/liteflow/entity/flow/WhenCondition.java index da80489a5..b2ccd929c 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/entity/flow/WhenCondition.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/entity/flow/WhenCondition.java @@ -14,21 +14,8 @@ import java.util.List; * @author Bryan.Zhang */ public class WhenCondition extends Condition{ - /** - * 增加isSync属性,以区分是循序执行还是并发执行 - */ - private boolean isASync; public WhenCondition(List nodeList) { super(nodeList); - isASync = true; - } - public WhenCondition(List nodeList, boolean isASync) { - super(nodeList); - this.isASync = isASync; - } - - public boolean isASync() { - return isASync; } } diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/parser/XmlFlowParser.java b/liteflow-core/src/main/java/com/yomahub/liteflow/parser/XmlFlowParser.java index 606c5cddf..372524838 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/parser/XmlFlowParser.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/parser/XmlFlowParser.java @@ -22,7 +22,6 @@ import org.slf4j.LoggerFactory; import com.yomahub.liteflow.core.NodeComponent; import com.yomahub.liteflow.flow.FlowBus; import com.yomahub.liteflow.spring.ComponentScaner; -import org.dom4j.Attribute; /** * xml形式的解析器 @@ -140,15 +139,7 @@ public abstract class XmlFlowParser { if (condE.getName().equals("then")) { conditionList.add(new ThenCondition(chainNodeList)); } else if (condE.getName().equals("when")) { - /** - * 设置是否为async异步 - */ - Attribute isSync = condE.attribute("async"); - if (isSync != null) { - conditionList.add(new WhenCondition(chainNodeList, isSync.getValue().equals("true"))); - } else { - conditionList.add(new WhenCondition(chainNodeList)); - } + conditionList.add(new WhenCondition(chainNodeList)); } } FlowBus.addChain(chainName, new Chain(chainName,conditionList)); diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/property/LiteflowConfig.java b/liteflow-core/src/main/java/com/yomahub/liteflow/property/LiteflowConfig.java index 513704519..12b62aef3 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/property/LiteflowConfig.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/property/LiteflowConfig.java @@ -34,6 +34,12 @@ public class LiteflowConfig { //每隔多少秒打印 private Long period; + //异步线程池最大线程数 + private int whenMaxWorkers; + + //异步线程池最大队列数量 + private int whenQueueLimit; + public String getRuleSource() { return ruleSource; } @@ -89,4 +95,20 @@ public class LiteflowConfig { public void setEnableLog(Boolean enableLog) { this.enableLog = enableLog; } + + public int getWhenMaxWorkers() { + return whenMaxWorkers; + } + + public void setWhenMaxWorkers(int whenMaxWorkers) { + this.whenMaxWorkers = whenMaxWorkers; + } + + public int getWhenQueueLimit() { + return whenQueueLimit; + } + + public void setWhenQueueLimit(int whenQueueLimit) { + this.whenQueueLimit = whenQueueLimit; + } } diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/util/ExecutorHelper.java b/liteflow-core/src/main/java/com/yomahub/liteflow/util/ExecutorHelper.java index 7438ea303..a381ec7cb 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/util/ExecutorHelper.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/util/ExecutorHelper.java @@ -1,15 +1,19 @@ +/** + *

Title: liteflow

+ *

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

+ * @author Bryan.Zhang + * @email weenyc31@163.com + * @Date 2020/4/1 + */ package com.yomahub.liteflow.util; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicLong; + /** - * desc : - * name : ExecutorHelper - * - * @author : xujia - * date : 2021/3/24 - * @since : 1.8 + * 线程池工具类 + * @author justin.xu */ public class ExecutorHelper { diff --git a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowExecutorAutoConfiguration.java b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowExecutorAutoConfiguration.java index 1a337697f..6f6785e3b 100644 --- a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowExecutorAutoConfiguration.java +++ b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowExecutorAutoConfiguration.java @@ -1,30 +1,28 @@ package com.yomahub.liteflow.springboot; -import org.springframework.beans.factory.annotation.Value; +import com.yomahub.liteflow.property.LiteflowConfig; +import com.yomahub.liteflow.util.ExecutorHelper; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import java.util.concurrent.ExecutorService; -import static com.yomahub.liteflow.util.ExecutorHelper.buildExecutor; - /** - * desc : - * name : LiteflowExecutorAutoConfiguration - * - * @author : xujia - * date : 2021/3/24 - * @since : 1.8 + * 线程池装配类 + * 这个装配前置条件是需要LiteflowConfig,LiteflowPropertyAutoConfiguration以及SpringAware + * @author justin.xu */ @Configuration +@ConditionalOnBean(LiteflowConfig.class) +@AutoConfigureAfter({LiteflowPropertyAutoConfiguration.class}) public class LiteflowExecutorAutoConfiguration { - @Bean("parallelExecutor") - public ExecutorService parallelExecutor( - @Value("${threadPool.parallel.worker:0}") int worker, - @Value("${threadPool.parallel.queue:512}") int queue) { - int useWorker = worker; - int useQueue = queue; + @Bean + public ExecutorService executorService(LiteflowConfig liteflowConfig) { + int useWorker = liteflowConfig.getWhenMaxWorkers(); + int useQueue = liteflowConfig.getWhenQueueLimit(); if (useWorker == 0) { useWorker = Runtime.getRuntime().availableProcessors() + 1; } @@ -33,6 +31,6 @@ public class LiteflowExecutorAutoConfiguration { useQueue = 512; } - return buildExecutor(useWorker, useQueue, "parallel-executors", false); + return ExecutorHelper.buildExecutor(useWorker, useQueue, "liteflow-when-calls", false); } } diff --git a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowMainAutoConfiguration.java b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowMainAutoConfiguration.java index ff64e6166..19deb7ebc 100644 --- a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowMainAutoConfiguration.java +++ b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowMainAutoConfiguration.java @@ -1,26 +1,15 @@ package com.yomahub.liteflow.springboot; import cn.hutool.core.util.StrUtil; -import com.google.common.collect.Lists; import com.yomahub.liteflow.core.FlowExecutor; -import com.yomahub.liteflow.entity.data.DataBus; import com.yomahub.liteflow.monitor.MonitorBus; import com.yomahub.liteflow.property.LiteflowConfig; -import com.yomahub.liteflow.spring.ComponentScaner; import com.yomahub.liteflow.util.SpringAware; -import org.apache.commons.lang3.StringUtils; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.PropertySource; - -import javax.swing.*; -import java.util.List; -import java.util.concurrent.ExecutorService; /** * 主要的业务装配器 @@ -30,16 +19,15 @@ import java.util.concurrent.ExecutorService; */ @Configuration @ConditionalOnBean(LiteflowConfig.class) -@AutoConfigureAfter({LiteflowPropertyAutoConfiguration.class, LiteflowExecutorAutoConfiguration.class}) +@AutoConfigureAfter({LiteflowPropertyAutoConfiguration.class}) @Import(SpringAware.class) public class LiteflowMainAutoConfiguration { @Bean - public FlowExecutor flowExecutor(LiteflowConfig liteflowConfig, ExecutorService parallelExecutor){ + public FlowExecutor flowExecutor(LiteflowConfig liteflowConfig){ if(StrUtil.isNotBlank(liteflowConfig.getRuleSource())){ FlowExecutor flowExecutor = new FlowExecutor(); flowExecutor.setLiteflowConfig(liteflowConfig); - flowExecutor.setParallelExecutor(parallelExecutor); return flowExecutor; }else{ return null; diff --git a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowProperty.java b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowProperty.java index 0a6ddbc09..8f538eb48 100644 --- a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowProperty.java +++ b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowProperty.java @@ -18,6 +18,12 @@ public class LiteflowProperty { //异步线程最大等待描述 private int whenMaxWaitSeconds; + //异步线程池最大线程数 + private int whenMaxWorkers; + + //异步线程池最大队列数量 + private int whenQueueLimit; + public String getRuleSource() { return ruleSource; } @@ -41,4 +47,20 @@ public class LiteflowProperty { public void setWhenMaxWaitSeconds(int whenMaxWaitSeconds) { this.whenMaxWaitSeconds = whenMaxWaitSeconds; } + + public int getWhenMaxWorkers() { + return whenMaxWorkers; + } + + public void setWhenMaxWorkers(int whenMaxWorkers) { + this.whenMaxWorkers = whenMaxWorkers; + } + + public int getWhenQueueLimit() { + return whenQueueLimit; + } + + public void setWhenQueueLimit(int whenQueueLimit) { + this.whenQueueLimit = whenQueueLimit; + } } diff --git a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowPropertyAutoConfiguration.java b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowPropertyAutoConfiguration.java index e43d14842..6d773f3e3 100644 --- a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowPropertyAutoConfiguration.java +++ b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowPropertyAutoConfiguration.java @@ -31,6 +31,8 @@ public class LiteflowPropertyAutoConfiguration { liteflowConfig.setQueueLimit(liteflowMonitorProperty.getQueueLimit()); liteflowConfig.setDelay(liteflowMonitorProperty.getDelay()); liteflowConfig.setPeriod(liteflowMonitorProperty.getPeriod()); + liteflowConfig.setWhenMaxWorkers(property.getWhenMaxWorkers()); + liteflowConfig.setWhenQueueLimit(property.getWhenQueueLimit()); return liteflowConfig; } } diff --git a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/Shutdown.java b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/Shutdown.java index 07096eabb..9450ed6c4 100644 --- a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/Shutdown.java +++ b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/Shutdown.java @@ -11,12 +11,9 @@ import javax.annotation.Resource; import java.util.concurrent.ExecutorService; /** - * desc : - * name : Shutdown - * - * @author : xujia - * date : 2021/3/24 - * @since : 1.8 + * 关闭shutdown类 + * 执行清理工作 + * @author justin.xu */ @Order(Integer.MIN_VALUE) @Component @@ -24,14 +21,14 @@ public class Shutdown { private static final Logger LOG = LoggerFactory.getLogger(Shutdown.class); - @Resource(name = "parallelExecutor") - private ExecutorService parallelExecutor; + @Resource + private ExecutorService executorService; @PreDestroy public void destroy() throws Exception { - LOG.info("Start closing the parallel-executors..."); - ExecutorHelper.shutdownAwaitTermination(parallelExecutor, 3600); - LOG.info("Succeed closing the parallel-executors ok..."); + LOG.info("Start closing the liteflow-when-calls..."); + ExecutorHelper.shutdownAwaitTermination(executorService); + LOG.info("Succeed closing the liteflow-when-calls ok..."); } } diff --git a/liteflow-spring-boot-starter/src/main/resources/META-INF/liteflow-default.properties b/liteflow-spring-boot-starter/src/main/resources/META-INF/liteflow-default.properties index ef7873807..f85c10dbc 100644 --- a/liteflow-spring-boot-starter/src/main/resources/META-INF/liteflow-default.properties +++ b/liteflow-spring-boot-starter/src/main/resources/META-INF/liteflow-default.properties @@ -1,7 +1,9 @@ liteflow.rule-source=config/flow.xml liteflow.slot-size=1024 liteflow.when-max-wait-second=15 +liteflow.when-max-workers=3 +liteflow.when-queue-limit=512 liteflow.monitor.enable-log=false liteflow.monitor.queue-limit=200 liteflow.monitor.delay=300000 -liteflow.monitor.period=300000 \ No newline at end of file +liteflow.monitor.period=300000 diff --git a/liteflow-test-spring/src/main/resources/applicationContext.xml b/liteflow-test-spring/src/main/resources/applicationContext.xml index 944baa722..57c18aa26 100644 --- a/liteflow-test-spring/src/main/resources/applicationContext.xml +++ b/liteflow-test-spring/src/main/resources/applicationContext.xml @@ -21,6 +21,8 @@ + + @@ -31,5 +33,8 @@ + + + diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/ConcurrentCase.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/ConcurrentCase.java index 9bd1fa315..e50b26fe9 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/ConcurrentCase.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/ConcurrentCase.java @@ -9,14 +9,9 @@ import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; - /** - * desc : - * name : ConcurrentCase - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 流程的顺序执行、并发执行的CASE构造器 + * @author justin.xu */ public class ConcurrentCase { public static final Map, List>> CASES = new ConcurrentHashMap<>(); diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/SpringBootApp.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/SpringBootApp.java index 2c113b5f0..9846e2fb5 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/SpringBootApp.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/SpringBootApp.java @@ -5,12 +5,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; /** - * desc : - * name : SpringBootApp - * - * @author : xujia - * date : 2021/3/3 - * @since : 1.8 + * 启动类 + * @author justin.xu */ @SpringBootApplication(exclude={DataSourceAutoConfiguration.class}) public class SpringBootApp { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/TestParseFlow.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/TestParseFlow.java index 1f7946153..00ba958a3 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/TestParseFlow.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/TestParseFlow.java @@ -15,16 +15,13 @@ import org.springframework.test.context.junit4.SpringRunner; import java.util.AbstractMap; import java.util.Arrays; +import java.util.Collections; import java.util.List; /** - * desc : - * name : TestParseFlow - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试流程的解析 + * @author justin.xu */ @ActiveProfiles("test") @RunWith(SpringRunner.class) @@ -32,14 +29,14 @@ import java.util.List; public class TestParseFlow { private Check caseAsync = new Check("async", Arrays.asList( - new AbstractMap.SimpleEntry<>(ThenCondition.class, null), - new AbstractMap.SimpleEntry<>(WhenCondition.class, false), - new AbstractMap.SimpleEntry<>(WhenCondition.class, true), - new AbstractMap.SimpleEntry<>(WhenCondition.class, true) + ThenCondition.class, + WhenCondition.class, + WhenCondition.class, + WhenCondition.class )); - private Check caseConcurrent = new Check("async-concurrent1", Arrays.asList( - new AbstractMap.SimpleEntry<>(WhenCondition.class, true) + private Check caseConcurrent = new Check("async-concurrent1", Collections.singletonList( + WhenCondition.class )); @Test @@ -55,31 +52,28 @@ public class TestParseFlow { Assert.assertTrue(null != chain.getConditionList() && !chain.getConditionList().isEmpty()); for (int i = 0; i < chain.getConditionList().size(); i ++) { - AbstractMap.SimpleEntry, Boolean> expected = check.getAsyncWithWhen().get(i); + Class expected = check.getConditionClazz().get(i); Condition actual = chain.getConditionList().get(i); - Assert.assertEquals(expected.getKey(), actual.getClass()); - if (actual.getClass().equals(WhenCondition.class)) { - Assert.assertEquals(expected.getValue(), ((WhenCondition) actual).isASync()); - } + Assert.assertEquals(expected, actual.getClass()); } } public static class Check { private String chainCode; - private List, Boolean>> asyncWithWhen; + private List> conditionClazz; - public Check(String chainCode, List, Boolean>> asyncWithWhen) { + public Check(String chainCode, List> conditionClazz) { this.chainCode = chainCode; - this.asyncWithWhen = asyncWithWhen; + this.conditionClazz = conditionClazz; } public String getChainCode() { return chainCode; } - public List, Boolean>> getAsyncWithWhen() { - return asyncWithWhen; + public List> getConditionClazz() { + return conditionClazz; } } } diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/TestRunFlow.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/TestRunFlow.java index 7ec971022..bcb90b578 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/TestRunFlow.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/TestRunFlow.java @@ -17,12 +17,8 @@ import static com.yomahub.flowtest.concurrent.ConcurrentCase.caseAssertRandom; import static com.yomahub.flowtest.concurrent.ConcurrentCase.caseInit; /** - * desc : - * name : TestRunFlow - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试流程的顺序执行、并发执行等 + * @author justin.xu */ @ActiveProfiles("test") @RunWith(SpringRunner.class) diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C10Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C10Component.java index e92c245fc..360878450 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C10Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C10Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : C10 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c10") public class C10Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C1Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C1Component.java index 17d3d95f7..641a67629 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C1Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C1Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : c1 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c1") public class C1Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C2Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C2Component.java index 82564577d..7aa9ea9ab 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C2Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C2Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : C2 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c2") public class C2Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C3Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C3Component.java index 0be98bf76..104d2e1fd 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C3Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C3Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : C3Component - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c3") public class C3Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C4Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C4Component.java index d573fc658..207b20309 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C4Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C4Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : C4 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c4") public class C4Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C5Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C5Component.java index 29c0a7617..a5877c041 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C5Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C5Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : C5 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c5") public class C5Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C6Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C6Component.java index 108190689..af3bca011 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C6Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C6Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : C6 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c6") public class C6Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C7Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C7Component.java index 17d9e6336..30f47d0d1 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C7Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C7Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : c7 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c7") public class C7Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C8Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C8Component.java index eef38003a..ce9bb91e2 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C8Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C8Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : C8 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c8") public class C8Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C9Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C9Component.java index 7ee36f7d7..f770ac294 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C9Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/c/C9Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : C9 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("c9") public class C9Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P3Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P3Component.java index eae5f65d1..eaaa96423 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P3Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P3Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : P3Component - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("p3") public class P3Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P4Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P4Component.java index cf7bb188f..4b22bb1ad 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P4Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P4Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : P4Component - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("p4") public class P4Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P5Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P5Component.java index 820944c86..c222c5876 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P5Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P5Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : P5 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("p5") public class P5Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P6Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P6Component.java index be94347e3..a17f1ffcd 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P6Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P6Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : P6 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("p6") public class P6Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P7Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P7Component.java index 0c9edd806..da1bfa819 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P7Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P7Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : P7Component - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("p7") public class P7Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P8Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P8Component.java index 5bdf3a7cc..12f612e95 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P8Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/p/P8Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : P8Component - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("p8") public class P8Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S1Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S1Component.java index 01a33d474..e78c15f35 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S1Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S1Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : S1Component - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("s1") public class S1Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S2Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S2Component.java index 6a2aebd45..5d67adea1 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S2Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S2Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : S2Component - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("s2") public class S2Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S3Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S3Component.java index df52250ae..d85ca5822 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S3Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S3Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : S3 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("s3") public class S3Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S4Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S4Component.java index a0cb7306a..47bec234d 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S4Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S4Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : S4 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("s4") public class S4Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S5Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S5Component.java index 4e491d33b..4c20855dc 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S5Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S5Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : S5 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("s5") public class S5Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S6Component.java b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S6Component.java index d7cd20947..ee2578b6c 100644 --- a/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S6Component.java +++ b/liteflow-test-springboot/src/test/java/com/yomahub/flowtest/concurrent/mock/component/s/S6Component.java @@ -5,12 +5,8 @@ import com.yomahub.liteflow.core.NodeComponent; import org.springframework.stereotype.Component; /** - * desc : - * name : S6 - * - * @author : xujia - * date : 2021/3/25 - * @since : 1.8 + * 测试mock component + * @author justin.xu */ @Component("s6") public class S6Component extends NodeComponent { diff --git a/liteflow-test-springboot/src/test/resources/config/flow-test.xml b/liteflow-test-springboot/src/test/resources/config/flow-test.xml index 13245b27d..a2e66e396 100644 --- a/liteflow-test-springboot/src/test/resources/config/flow-test.xml +++ b/liteflow-test-springboot/src/test/resources/config/flow-test.xml @@ -4,17 +4,17 @@ - - + + - + - +