AComponent.java 596 B

12345678910111213141516171819202122232425
  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("a")
  12. public class AComponent extends NodeComponent {
  13. @Override
  14. public void process() {
  15. String str = this.getSlot().getRequestData();
  16. System.out.println(str);
  17. System.out.println("Acomponent executed!");
  18. this.getSlot().setOutput(this.getNodeId(), "A component output");
  19. }
  20. }