FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Fix #1612] Adding test with fixed collection by fjtirado · Pull Request #1614 · open-workflow-specification/sdk-java · GitHub

[Fix #1612] Adding test with fixed collection - #1614

Open
fjtirado wants to merge 1 commit into
open-workflow-specification:mainfrom
fjtirado:Fix_#1612
Open

[Fix #1612] Adding test with fixed collection#1614
fjtirado wants to merge 1 commit into
open-workflow-specification:mainfrom
fjtirado:Fix_#1612

Conversation

Copy link
Copy Markdown
Collaborator

Fix #1612

Copilot AI lite review requested due to automatic review settings August 11, 2026 11:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

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:

  • Added a new workflow sample (for-sum-fixed.yaml) that uses an inline collection for a for loop.
  • Extended WorkflowDefinitionTest parameterization to execute and assert the new sample’s output and exported context.

Reviewed 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.

Comment on lines +8 to +19
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

fjtirado Aug 11, 2026
edited
Loading

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

And how Im supposed to do that if the schema requires an object there?, probably schema should be changed to any

fjtirado Aug 11, 2026
edited
Loading

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@ibm.com>
Copilot AI review requested due to automatic review settings August 11, 2026 11:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test for hard coded collections in For task

2 participants


Back | FazBrowse Home | New Git URL