修改隐式调用的测试用例

This commit is contained in:
everywhere.z
2022-06-13 14:36:03 +08:00
parent 9bc534347a
commit fea0828291
3 changed files with 10 additions and 0 deletions

View File

@@ -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!");
}
}

View File

@@ -21,6 +21,8 @@ public class GCmp extends NodeComponent {
System.out.println("Gcmp executed!");
flowExecutor.invoke("chain4", "it's implicit subflow.", this.getSlotIndex());
}
}

View File

@@ -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());