mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 04:02:09 +08:00
版本更新到2.3.5
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user