EComponent.java 678 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * <p>Title: liteflow</p>
  3. * <p>Description: 轻量级的组件式流程框架</p>
  4. * @author Bryan.Zhang
  5. * @email weenyc31@163.com
  6. * @Date 2020/4/1
  7. */
  8. package com.yomahub.flowtest.components;
  9. import com.yomahub.liteflow.core.NodeComponent;
  10. import org.springframework.stereotype.Component;
  11. @Component("e")
  12. public class EComponent extends NodeComponent {
  13. @Override
  14. public void process() {
  15. try {
  16. Thread.sleep(120L);
  17. System.out.println("E:" + this.getSlot().getOutput("a"));
  18. this.getSlot().setOutput(this.getNodeId(), "E component output");
  19. } catch (InterruptedException e) {
  20. e.printStackTrace();
  21. }
  22. System.out.println("Eomponent executed!");
  23. }
  24. }