38 lines
898 B
Java
38 lines
898 B
Java
/**
|
|
* <p>Title: liteFlow</p>
|
|
* <p>Description: 轻量级的组件式流程框架</p>
|
|
* <p>Copyright: Copyright (c) 2017</p>
|
|
* @author Bryan.Zhang
|
|
* @email weenyc31@163.com
|
|
* @Date 2017-8-1
|
|
* @version 1.0
|
|
*/
|
|
package com.yomahub.flowtest.components;
|
|
|
|
import com.yomahub.liteflow.core.FlowExecutor;
|
|
import com.yomahub.liteflow.core.NodeComponent;
|
|
import com.yomahub.liteflow.core.NodeCondComponent;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
@Component("p")
|
|
public class PComponent extends NodeCondComponent {
|
|
|
|
@Resource
|
|
private FlowExecutor flowExecutor;
|
|
|
|
@Override
|
|
protected Class<? extends NodeComponent> processCond() throws Exception {
|
|
System.out.println("p conponent executed");
|
|
Integer flag = this.getSlot().getChainReqData("strategy2");
|
|
if(flag == 10) {
|
|
return P1Component.class;
|
|
}else {
|
|
return P2Component.class;
|
|
}
|
|
|
|
}
|
|
|
|
}
|