mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-23 19:08:09 +08:00
测试用例调整getRequestData的获取方式
This commit is contained in:
@@ -20,7 +20,7 @@ public class ACmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.IS_ACCESS)
|
||||
public boolean isAccess(NodeComponent bindCmp) {
|
||||
Integer requestData = bindCmp.getSlot().getRequestData();
|
||||
Integer requestData = bindCmp.getRequestData();
|
||||
if (Objects.nonNull(requestData) && requestData > 100){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class BCmp{
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
|
||||
public void process(NodeComponent bindCmp) {
|
||||
System.out.println("BComp executed!");
|
||||
Integer requestData = bindCmp.getSlot().getRequestData();
|
||||
Integer requestData = bindCmp.getRequestData();
|
||||
Integer divisor = 130;
|
||||
Integer result = divisor / requestData;
|
||||
bindCmp.getSlot().setResponseData(result);
|
||||
@@ -23,7 +23,7 @@ public class BCmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.IS_ACCESS)
|
||||
public boolean isAccess(NodeComponent bindCmp) {
|
||||
Integer requestData = bindCmp.getSlot().getRequestData();
|
||||
Integer requestData = bindCmp.getRequestData();
|
||||
if (Objects.nonNull(requestData)){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class CCmp{
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
|
||||
public void process(NodeComponent bindCmp) {
|
||||
System.out.println("CComp executed!");
|
||||
Integer requestData = bindCmp.getSlot().getRequestData();
|
||||
Integer requestData = bindCmp.getRequestData();
|
||||
Integer divisor = 130;
|
||||
Integer result = divisor / requestData;
|
||||
bindCmp.getSlot().setResponseData(result);
|
||||
@@ -24,7 +24,7 @@ public class CCmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.IS_CONTINUE_ON_ERROR)
|
||||
public boolean isContinueOnError(NodeComponent bindCmp) {
|
||||
Integer requestData = bindCmp.getSlot().getRequestData();
|
||||
Integer requestData = bindCmp.getRequestData();
|
||||
if (Objects.nonNull(requestData)){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Objects;
|
||||
public class FCondCmp{
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
|
||||
public String processCond(NodeComponent bindCmp) {
|
||||
Integer requestData = bindCmp.getSlot().getRequestData();
|
||||
Integer requestData = bindCmp.getRequestData();
|
||||
if (Objects.isNull(requestData)){
|
||||
return "d";
|
||||
} else if(requestData == 0){
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ACmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
|
||||
public void process(NodeComponent bindCmp) {
|
||||
String str = bindCmp.getSlot().getRequestData();
|
||||
String str = bindCmp.getRequestData();
|
||||
if(StrUtil.isNotBlank(str) && str.equals("exception")) {
|
||||
throw new RuntimeException("chain execute execption");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class BCmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
|
||||
public void process(NodeComponent bindCmp) throws InterruptedException {
|
||||
String str = bindCmp.getSlot().getRequestData();
|
||||
String str = bindCmp.getRequestData();
|
||||
if(StrUtil.isNotBlank(str) && str.equals("when")) {
|
||||
try {
|
||||
LOG.info("Bcomp sleep begin");
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ACmp{
|
||||
|
||||
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
|
||||
public void process(NodeComponent bindCmp) {
|
||||
String str = bindCmp.getSlot().getRequestData();
|
||||
String str = bindCmp.getRequestData();
|
||||
if(StrUtil.isNotBlank(str) && str.equals("exception")) {
|
||||
throw new FlowSystemException("chain execute execption");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user