소스 검색

去除节点打印start和end的标识

bryan.zhang 4 년 전
부모
커밋
34a9663342

+ 2 - 9
docs/guide_cn.md

@@ -9,7 +9,7 @@ liteflow需要你的项目使用maven
 	<version>${liteFlow.version}</version>
 </dependency>
 ```
-最新版本为<font color=red>*2.2.2*</font>,为稳定版本,目前jar包已上传中央仓库,可以直接依赖到
+最新版本为<font color=red>*2.3.1*</font>,为稳定版本,目前jar包已上传中央仓库,可以直接依赖到
 
 ## 1.2流程配置文件
 
@@ -303,20 +303,13 @@ public class HComponent extends NodeComponent {
 
 ## 7.7步骤打印
 
-liteFlow在执行每一条流程链后会打印步骤  
+liteFlow在执行每一条流程链后会打印步骤,这个步骤是程序实际执行的顺序  
 样例如下:
 
 ```
 a==>c==>m==>q==>p==>p1==>g
 ```
 
-当然你还可能看到这样的情况:
-
-```
-a==>c==>h(START)==>m==>p==>p1==>h(END)==>g
-```
-?> 其中h节点分start和end两个步骤,说明在h节点内调用了另一条流程。start和end之间的步骤就是另一条流程的步骤
-
 ## 7.8监控
 
 liteFlow提供了简单的监控,目前只统计一个指标:每个组件的平均耗时  

+ 1 - 1
liteflow-core/pom.xml

@@ -9,7 +9,7 @@
     <parent>
 		<groupId>com.yomahub</groupId>
 		<artifactId>liteflow</artifactId>
-		<version>2.3.0</version>
+		<version>2.3.1</version>
 	</parent>
 
 	<dependencies>

+ 2 - 2
liteflow-core/src/main/java/com/yomahub/liteflow/core/NodeComponent.java

@@ -36,7 +36,7 @@ public abstract class NodeComponent {
 	public void execute() throws Exception{
 		Slot slot = this.getSlot();
 		LOG.info("[{}]:[O]start component[{}] execution",slot.getRequestId(),this.getClass().getSimpleName());
-		slot.addStep(new CmpStep(nodeId, CmpStepType.START));
+		slot.addStep(new CmpStep(nodeId, CmpStepType.SINGLE));
 		StopWatch stopWatch = new StopWatch();
 		stopWatch.start();
 
@@ -45,7 +45,7 @@ public abstract class NodeComponent {
 		stopWatch.stop();
 		long timeSpent = stopWatch.getTime();
 
-		slot.addStep(new CmpStep(nodeId, CmpStepType.END));
+//		slot.addStep(new CmpStep(nodeId, CmpStepType.END));
 
 		//性能统计
 		CompStatistics statistics = new CompStatistics();

+ 1 - 6
liteflow-core/src/main/java/com/yomahub/liteflow/entity/data/AbsSlot.java

@@ -105,12 +105,7 @@ public abstract class AbsSlot implements Slot{
 	}
 
 	public void addStep(CmpStep step){
-		CmpStep lastStep = this.executeSteps.peekLast();
-		if(lastStep != null && lastStep.equals(step)) {
-			lastStep.setStepType(CmpStepType.SINGLE);
-		}else {
-			this.executeSteps.add(step);
-		}
+		this.executeSteps.add(step);
 	}
 
 	public void printStep(){

+ 1 - 1
liteflow-spring-boot-starter/pom.xml

@@ -10,7 +10,7 @@
     <parent>
         <artifactId>liteflow</artifactId>
         <groupId>com.yomahub</groupId>
-        <version>2.3.0</version>
+        <version>2.3.1</version>
     </parent>
 
     <dependencies>

+ 1 - 1
liteflow-test-spring/pom.xml

@@ -9,7 +9,7 @@
     <parent>
         <artifactId>liteflow</artifactId>
         <groupId>com.yomahub</groupId>
-        <version>2.3.0</version>
+        <version>2.3.1</version>
     </parent>
 
     <dependencies>

+ 1 - 1
liteflow-test-springboot/pom.xml

@@ -9,7 +9,7 @@
     <parent>
         <artifactId>liteflow</artifactId>
         <groupId>com.yomahub</groupId>
-        <version>2.3.0</version>
+        <version>2.3.1</version>
     </parent>
 
     <dependencyManagement>

+ 1 - 1
pom.xml

@@ -5,7 +5,7 @@
 	<groupId>com.yomahub</groupId>
     <artifactId>liteflow</artifactId>
     <packaging>pom</packaging>
-    <version>2.3.0</version>
+    <version>2.3.1</version>
 	<name>liteflow</name>
 	<description>a lightweight and practical micro-process framework</description>
 	<url>https://github.com/bryan31/liteflow</url>