| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Adds a regression test (per #1612) to ensure for tasks can iterate over a hard-coded (inline) collection, validating the runtime/schema support for fixed collections.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| impl/test/src/test/resources/workflows-samples/for-sum-fixed.yaml | New workflow sample exercising for.in as a hard-coded collection. |
| impl/test/src/test/java/io/serverlessworkflow/impl/test/WorkflowDefinitionTest.java | Adds a new parameterized test case to run/assert the new sample. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| for: | ||
| each: number | ||
| in: | ||
| - item: 1 | ||
| - item: 2 | ||
| - item: 3 | ||
| do: | ||
| - accumulate: | ||
| set: | ||
| counter: ${.counter+$number.item} | ||
| export: | ||
| as: if .incr==null then {incr:[$number.item+1]} else .incr+=[$number.item+1] end |
There was a problem hiding this comment.
And how Im supposed to do that if the schema requires an object there?, probably schema should be changed to any
Sorry, something went wrong.
There was a problem hiding this comment.
@ricardozanini After writing the example, I feel that, for maximun flexibility, the type of the array should be any in the workflow schema, so lets keep thisPR opened while we evaluate that and update it if the schema is finally updated.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
Signed-off-by: Francisco Javier Tirado Sarti <ftirados@ibm.com>
| Back | FazBrowse Home | New Git URL |
Fix #1612