TestFlow.java 596 B

123456789101112131415161718192021
  1. package com.yomahub.flowtest;
  2. import com.yomahub.liteflow.core.FlowExecutor;
  3. import com.yomahub.liteflow.entity.data.LiteflowResponse;
  4. import org.springframework.boot.CommandLineRunner;
  5. import org.springframework.stereotype.Component;
  6. import javax.annotation.Resource;
  7. @Component
  8. public class TestFlow implements CommandLineRunner {
  9. @Resource
  10. private FlowExecutor flowExecutor;
  11. @Override
  12. public void run(String... args) throws Exception {
  13. LiteflowResponse response= flowExecutor.execute2Resp("chain3", "it's a request");
  14. System.out.println(response);
  15. }
  16. }