Skip to content

Commit aae4738

Browse files
committed
[fel] subflows inherit ordering flag from parent flow
1 parent 0a50001 commit aae4738

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

framework/fel/java/fel-flow/src/main/java/modelengine/fel/engine/operators/patterns/AbstractFlowPattern.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public FlowEmitter<O> invoke(I data) {
8989
public Pattern<I, O> sync() {
9090
return new SimplePattern<>(data -> {
9191
FlowSession require = AiFlowSession.require();
92-
FlowSession session = new FlowSession(true);
92+
FlowSession session = new FlowSession(require.preserved());
9393
Window window = session.begin();
9494
session.copySessionState(require);
9595
ConverseLatch<O> conversation = this.getFlow().converse(session).offer(data);
@@ -116,7 +116,7 @@ public Flow<I> origin() {
116116
*/
117117
protected static <O> FlowSession buildFlowSession(FlowEmitter<O> emitter) {
118118
FlowSession mainSession = AiFlowSession.require();
119-
FlowSession flowSession = FlowSession.newRootSession(mainSession, true);
119+
FlowSession flowSession = FlowSession.newRootSession(mainSession, mainSession.preserved());
120120
flowSession.setInnerState(PARENT_SESSION_ID_KEY, mainSession.getId());
121121
ResultAction<O> resultAction = emitter::emit;
122122
flowSession.setInnerState(RESULT_ACTION_KEY, resultAction);

0 commit comments

Comments
 (0)