DComponent.java 803 B

123456789101112131415161718192021222324252627282930313233343536
  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 com.yomahub.liteflow.entity.data.Slot;
  11. import org.springframework.stereotype.Component;
  12. @Component("d")
  13. public class DComponent extends NodeComponent {
  14. @Override
  15. public void process() {
  16. try {
  17. Slot slot = this.getSlot();
  18. String e = slot.getOutput("e");
  19. if(e == null){
  20. System.out.println(slot);
  21. }
  22. System.out.println("D:" + slot.getOutput("e"));
  23. String[] temp = new String[1400];
  24. Thread.sleep(450L);
  25. } catch (InterruptedException e) {
  26. e.printStackTrace();
  27. }
  28. System.out.println("Dcomponent executed!");
  29. }
  30. }