版本更新到2.3.5

This commit is contained in:
bryan31
2021-04-02 15:20:38 +08:00
parent b8422ca5ff
commit c6ef1be10a
2 changed files with 9 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package com.yomahub.flowtest;
import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.entity.data.Slot;
import com.yomahub.liteflow.exception.ChainEndException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
@@ -17,7 +18,12 @@ public class TestFlow implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
Slot slot = flowExecutor.execute("chain3", "it's a request");
System.out.println(slot);
try{
Slot slot = flowExecutor.execute("chain1", "it's a request");
System.out.println(slot);
}catch (ChainEndException e){
e.printStackTrace();
}
}
}

View File

@@ -17,6 +17,7 @@ public class EComponent extends NodeComponent {
public void process() {
try {
Thread.sleep(120L);
this.setIsEnd(true);
System.out.println("E:" + this.getSlot().getOutput("a"));
this.getSlot().setOutput(this.getNodeId(), "E component output");
} catch (InterruptedException e) {