How to interpret actionDataFilter when used in an action in a foreach state #763
Replies: 2 comments
-
I am also interested in this! We're trying to implement I found this part of the code in Synapse (runtime implementation) which might hint to how this should be done. |
Beta Was this translation helpful? Give feedback.
-
Hi! You can refer to the new DSL and how we handle "for each" at the moment: https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#for. The data handling is simpler now. I'm closing this discussion since it refers to an old spec version. If you still have questions or comments, please feel free to reopen it! |
Beta Was this translation helpful? Give feedback.
-
Hello,
As the title suggests, I am not clear on what the expected behavior is when actionDataFilter parameter is used in an action in a foreach state. I could not find specific examples in either documentation or the discussions related to this so I would appreciate any help you could provide to clarify things for me.
First, let me paste a few definitions from the spec relevant to my questions here for convenience:
I have two questions on data handling, one on the input and one on the output side.
On the input side, should the fromStateData be applied to the iteration parameter as if it were the state data or should iteration parameter be considered as a JQ expression variable that can be referenced and fromStateData should be applied to the state data as would be the case say in an operation type state?
On the output side, what should happen if an action in a foreach state as an actionDataFilter property defined (assuming that actionDataFilter will not have useResults set to false)? Should the actionDataFilter.toStateData be ignored or should one view the iteration parameter as if it were the state data that an action would merge its output to?
Thanks,
Murat
Beta Was this translation helpful? Give feedback.
All reactions