mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
修改隐式调用的测试用例
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.yomahub.liteflow.test.subflow.cmp2;
|
||||
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
import com.yomahub.liteflow.slot.DefaultContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import static com.yomahub.liteflow.test.subflow.ImplicitSubFlowSpringbootTest.RUN_TIME_SLOT;
|
||||
@@ -13,6 +14,9 @@ public class FCmp extends NodeComponent {
|
||||
|
||||
RUN_TIME_SLOT.add(this.getSlot().getRequestId());
|
||||
|
||||
DefaultContext context = this.getContextBean();
|
||||
context.setData("innerRequestData", "inner request");
|
||||
|
||||
System.out.println("Fcomp executed!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ public class GCmp extends NodeComponent {
|
||||
|
||||
System.out.println("Gcmp executed!");
|
||||
|
||||
|
||||
|
||||
flowExecutor.invoke("chain4", "it's implicit subflow.", this.getSlotIndex());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yomahub.liteflow.test.subflow.cmp2;
|
||||
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
import com.yomahub.liteflow.slot.DefaultContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import static com.yomahub.liteflow.test.subflow.ImplicitSubFlowSpringbootTest.RUN_TIME_SLOT;
|
||||
@@ -10,6 +11,9 @@ import static com.yomahub.liteflow.test.subflow.ImplicitSubFlowSpringbootTest.RU
|
||||
public class HCmp extends NodeComponent {
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
DefaultContext context = this.getContextBean();
|
||||
String str = context.getData("innerRequestData");
|
||||
System.out.println(str);
|
||||
|
||||
RUN_TIME_SLOT.add(this.getSlot().getRequestId());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user