You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#462 Make IterationParam in foreach state optional (#477)
* #462 Make IterationParam in foreach state optional
Signed-off-by: cb-manick <[email protected]>
* updated text on spec doc and added to roadmap
Signed-off-by: Tihomir Surdilovic <[email protected]>
Co-authored-by: Tihomir Surdilovic <[email protected]>
Copy file name to clipboardExpand all lines: roadmap/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,9 @@ _Status description:_
23
23
| Status | Description | Comments |
24
24
| --- | --- | --- |
25
25
| ✔️| Support custom function `type` definition |[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
26
-
| ✔️| Workflow "name" no longer a required parameter |[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
27
-
| ✔️| Workflow "start" no longer a required parameter|[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
26
+
| ✔️| Workflow "name" no longer a required property |[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
27
+
| ✔️| Workflow "start" no longer a required property|[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
28
+
| ✔️| ForEach state "iterationParam" no longer a required property|[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
Copy file name to clipboardExpand all lines: specification.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2854,7 +2854,7 @@ The `timeouts` property can be used to define state specific timeout settings. I
2854
2854
| type | State type | string | yes |
2855
2855
| inputCollection | Workflow expression selecting an array element of the states data | string | yes |
2856
2856
| outputCollection | Workflow expression specifying an array element of the states data to add the results of each iteration | string | no |
2857
-
| 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 |
2857
+
| 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 |
2858
2858
| 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 |
2859
2859
| mode | Specifies how iterations are to be performed (sequentially or in parallel). Default is `parallel` | string | no |
2860
2860
| [actions](#Action-Definition) | Actions to be executed for each of the elements of inputCollection | array | yes |
@@ -2926,8 +2926,8 @@ Each iteration of the ForEach state is by default executed in parallel by defaul
2926
2926
However, executing iterations sequentially is also possible by setting the value of the `mode` property to
2927
2927
`sequential`.
2928
2928
2929
-
The `mode` property defines if iterations should be done sequentially or in parallel. By default
2930
-
(if `mode` is not specified) iterations should be done in parallel.
2929
+
The `mode` property defines if iterations should be done sequentially or in parallel. By default,
2930
+
if `mode` is not specified, iterations should be done in parallel.
2931
2931
2932
2932
If the default `parallel` iteration mode is used, the `batchSize` property to the number of iterations (batch)
2933
2933
that can be executed at a time. To give an example, if the number of iterations is 55 and `batchSize`
@@ -2942,9 +2942,10 @@ an error. This error can be handled inside the states [`onErrors`](#Error-Defini
2942
2942
The `outputCollection` property is a workflow expression which selects an array in the state data where the results
2943
2943
of each iteration should be added to. If this array does not exist, it should be created.
2944
2944
2945
-
The `iterationParam` property defines the name of the iteration parameter passed to each parallel execution of the ForEach state.
2946
-
It should contain the unique element of the `inputCollection` array and passed as data input to the actions/workflow defined.
2947
-
`iterationParam`should be created for each iteration, so it can be referenced/used in defined actions / workflow data input.
2945
+
The `iterationParam` property defines the name of the iteration parameter passed to each iteration of the ForEach state.
2946
+
It should contain the unique element of the `inputCollection` array and made available to actions of the ForEach state.
2947
+
If `iterationParam` is not explicitly defined, runtimes should create one and populate it with the value of the unique
2948
+
iteration parameter for each iteration of the ForEach state.
2948
2949
2949
2950
The `actions` property defines actions to be executed in each state iteration.
0 commit comments