Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions roadmap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ _Status description:_
| Status | Description | Comments |
| --- | --- | --- |
| ✔️| Support custom function `type` definition | [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
| ✔️| Workflow "name" no longer a required parameter | [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
| ✔️| Workflow "start" no longer a required parameter| [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
| ✔️| Workflow "name" no longer a required property | [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
| ✔️| Workflow "start" no longer a required property| [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
| ✔️| ForEach state "iterationParam" no longer a required property| [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
| ✏️️| Support for async action invocation | |
| ✏️️| Start work on TCK | |
| ✏️️| Add more samples | |
Expand Down
3 changes: 0 additions & 3 deletions schema/workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,6 @@
"name",
"type",
"inputCollection",
"iterationParam",
"actions"
]
},
Expand All @@ -1619,7 +1618,6 @@
"name",
"type",
"inputCollection",
"iterationParam",
"actions",
"end"
]
Expand All @@ -1629,7 +1627,6 @@
"name",
"type",
"inputCollection",
"iterationParam",
"actions",
"transition"
]
Expand Down
13 changes: 7 additions & 6 deletions specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -2854,7 +2854,7 @@ The `timeouts` property can be used to define state specific timeout settings. I
| type | State type | string | yes |
| inputCollection | Workflow expression selecting an array element of the states data | string | yes |
| outputCollection | Workflow expression specifying an array element of the states data to add the results of each iteration | string | no |
| iterationParam | Name of the iteration parameter that can be referenced in actions/workflow. For each parallel iteration, this param should contain an unique element of the inputCollection array | string | yes |
| iterationParam | Name of the iteration parameter that can be referenced in actions/workflow. For each parallel iteration, this param should contain an unique element of the inputCollection array | string | no |
| batchSize | Specifies how many iterations may run in parallel at the same time. Used if `mode` property is set to `parallel` (default). If not specified, its value should be the size of the `inputCollection` | string or number | no |
| mode | Specifies how iterations are to be performed (sequentially or in parallel). Default is `parallel` | string | no |
| [actions](#Action-Definition) | Actions to be executed for each of the elements of inputCollection | array | yes |
Expand Down Expand Up @@ -2926,8 +2926,8 @@ Each iteration of the ForEach state is by default executed in parallel by defaul
However, executing iterations sequentially is also possible by setting the value of the `mode` property to
`sequential`.

The `mode` property defines if iterations should be done sequentially or in parallel. By default
(if `mode` is not specified) iterations should be done in parallel.
The `mode` property defines if iterations should be done sequentially or in parallel. By default,
if `mode` is not specified, iterations should be done in parallel.

If the default `parallel` iteration mode is used, the `batchSize` property to the number of iterations (batch)
that can be executed at a time. To give an example, if the number of iterations is 55 and `batchSize`
Expand All @@ -2942,9 +2942,10 @@ an error. This error can be handled inside the states [`onErrors`](#Error-Defini
The `outputCollection` property is a workflow expression which selects an array in the state data where the results
of each iteration should be added to. If this array does not exist, it should be created.

The `iterationParam` property defines the name of the iteration parameter passed to each parallel execution of the ForEach state.
It should contain the unique element of the `inputCollection` array and passed as data input to the actions/workflow defined.
`iterationParam` should be created for each iteration, so it can be referenced/used in defined actions / workflow data input.
The `iterationParam` property defines the name of the iteration parameter passed to each iteration of the ForEach state.
It should contain the unique element of the `inputCollection` array and made available to actions of the ForEach state.
If `iterationParam` is not explicitly defined, runtimes should create one and populate it with the value of the unique
iteration parameter for each iteration of the ForEach state.

The `actions` property defines actions to be executed in each state iteration.

Expand Down