EComponent.java 734 B

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