Skip to content

Commit 41f16ae

Browse files
committed
Include Actions of ForEachState for GetFunctionDefinitionForAction
Signed-off-by: manick02 <[email protected]>
1 parent 8e699b1 commit 41f16ae

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,18 @@ private static FunctionRef getFunctionRefFromAction(Workflow workflow, String ac
318318
}
319319
}
320320
}
321+
} else if (state instanceof ForEachState) {
322+
ForEachState forEachState = (ForEachState) state;
323+
List<Action> forEachStateActions = forEachState.getActions();
324+
if (forEachStateActions != null) {
325+
for (Action forEachStateAction : forEachStateActions) {
326+
if (forEachStateAction != null
327+
&& forEachStateAction.getName() != null
328+
&& forEachStateAction.getName().equals(action)) {
329+
return forEachStateAction.getFunctionRef();
330+
}
331+
}
332+
}
321333
}
322334
}
323335

0 commit comments

Comments
 (0)