22 lines
591 B
Java
22 lines
591 B
Java
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.execute("chain2", "it's a request");
|
|
System.out.println(response);
|
|
}
|
|
}
|