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
Copy file name to clipboardExpand all lines: specification.md
+19-18Lines changed: 19 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ This section describes some of the core Serverless Workflow concepts:
106
106
107
107
### Workflow Definition
108
108
109
-
A workflow definition is a single artifact written in the Serverless Workflow
109
+
A workflow definition is a single artefact written in the Serverless Workflow
110
110
language. It consists of a set of [workflow model](#Workflow-Model) constructs,
111
111
and defines a blueprint used by runtimes for its execution.
112
112
@@ -753,11 +753,11 @@ Because our event state is also an end state, its data output becomes the final
753
753
Consumed event data (payload) and action execution results should be merged into the state data.
754
754
Event and action data filters can be used to give more details about this operation.
755
755
756
-
By default (no data filters specified), when an event is consumed, its entire data section (payload) should be merged
757
-
to the state data. The merge should be applied to the entire state data JSON element.
756
+
By default, with no data filters specified, when an event is consumed, its entire data section (payload) should be merged
757
+
to the state data. Merging should be applied to the entire state data JSON element.
758
758
759
759
In case of event and action filters, their "toStateData" property can be defined to select a specific element
760
-
of the state data with which the merge should be done against. If this element does not exist, a new one should
760
+
of the state data with which merging should be done against. If this element does not exist, a new one should
761
761
be created first.
762
762
763
763
When merging, the state data element and the data (payload)/action result should have the same type, meaning
@@ -788,7 +788,7 @@ and we have the following event payload that needs to be merged into the state d
788
788
}
789
789
```
790
790
791
-
After the merge the state data should be:
791
+
After merging the state data should be:
792
792
793
793
```json
794
794
{
@@ -1552,7 +1552,7 @@ By default, as described in the [Core Concepts](#Core-Concepts) section, a workf
1552
1552
active execution paths, one of its active paths ends in a "terminate" [end definition](#End-Definition), or when
1553
1553
its [`execTimeout`](#ExecTimeout-Definition) time is reached.
1554
1554
1555
-
Setting the `keepActive` property to "true" allows you change this default behavior in that a workflow instance
1555
+
Setting the `keepActive` property to "true" allows you to change this default behavior in that a workflow instance
1556
1556
created from this workflow definition can only be terminated if one of its active paths ends in a "terminate" [end definition](#End-Definition), or when
1557
1557
its [`execTimeout`](#ExecTimeout-Definition) time is reached.
1558
1558
This allows you to explicitly model workflows where an instance should be kept alive, to collect (event) data for example.
@@ -3622,14 +3622,14 @@ an error. This error can be handled inside the states [`onErrors`](#Error-Defini
3622
3622
The `outputCollection` property is a workflow expression which selects an array in the state data where the results
3623
3623
of each iteration should be added to. If this array does not exist, it should be created.
3624
3624
3625
-
The `iterationParam` property defines the name of the iteration parameter passed to each parallel execution of the foreach state.
3625
+
The `iterationParam` property defines the name of the iteration parameter passed to each parallel execution of the ForEach state.
3626
3626
It should contain the unique element of the `inputCollection` array and passed as data input to the actions/workflow defined.
3627
3627
`iterationParam`should be created for each iteration, so it can be referenced/used in defined actions / workflow data input.
3628
3628
3629
3629
The `actions` property defines actions to be executed in each state iteration.
3630
3630
3631
3631
If actions are not defined, you can specify the `workflowid` to reference a workflow id which needs to be executed
3632
-
for each iteration. Note that `workflowid` should not be the same as the workflow id of the workflow where the foreach state
3632
+
for each iteration. Note that `workflowid` should not be the same as the workflow id of the workflow where the ForEach state
3633
3633
is defined.
3634
3634
3635
3635
Let's take a look at an example:
@@ -3732,8 +3732,8 @@ states:
3732
3732
</tr>
3733
3733
</table>
3734
3734
3735
-
The workflow data input containing order information is passed to the `SendConfirmState` foreach state.
3736
-
The foreach state defines an `inputCollection` property which selects all orders that have the `completed` property set to `true`.
3735
+
The workflow data input containing order information is passed to the `SendConfirmState` [ForEach](#ForEach-State) state.
3736
+
The ForEach state defines an `inputCollection` property which selects all orders that have the `completed` property set to `true`.
3737
3737
3738
3738
For each element of the array selected by `inputCollection` a JSON object defined by `iterationParam` should be
3739
3739
created containing an unique element of `inputCollection` and passed as the data input to the parallel executed actions.
@@ -4225,7 +4225,7 @@ The `terminate` property, if set to `true`, completes the workflow instance exec
4225
4225
execution paths.
4226
4226
If a terminate end is reached inside a ForEach, Parallel, or SubFlow state, the entire workflow instance is terminated.
4227
4227
4228
-
The [`produceEvents`](#ProducedEvent-Definition) allows to define events which should be produced
4228
+
The [`produceEvents`](#ProducedEvent-Definition) allows defining events which should be produced
4229
4229
by the workflow instance before workflow stops its execution.
4230
4230
4231
4231
It's important to mention that if the workflow `keepActive` property is set to`true`,
@@ -4497,7 +4497,7 @@ retries that need to performed for some specific errors that might be encountere
4497
4497
In this particular case we define a retry strategy for "Service Call Timeouts" which says that the states
4498
4498
control-flow logic should be retried up to 4 times, with a 1 minute delay between each retry attempt.
4499
4499
4500
-
Different states now can use this retry strategy defined. For example:
4500
+
Different states now can use the defined retry strategy. For example:
4501
4501
4502
4502
<table>
4503
4503
<tr>
@@ -4560,7 +4560,7 @@ and the received event information used for all of the issued retries.
4560
4560
4561
4561
Compensation deals with undoing or reversing the work of one or more states which have
4562
4562
already successfully completed. For example, let's say that we have charged a customer $100 for an item
4563
-
purchase. If later the customer decides to cancel this purchase we need to undo this. One way of
4563
+
purchase. In the case customer laster on decides to cancel this purchase we need to undo it. One way of
4564
4564
doing that is to credit the customer $100.
4565
4565
4566
4566
It's important to understand that compensation with workflows is not the same as for example rolling back
@@ -4578,7 +4578,7 @@ errors.
4578
4578
#### Defining Compensation
4579
4579
4580
4580
Each workflow state can define how it should be compensated via its `compensatedBy` property.
4581
-
This property references another workflow state (by it's unique name) which is responsible for the actual compensation.
4581
+
This property references another workflow state (by its unique name) which is responsible for the actual compensation.
4582
4582
4583
4583
States referenced by `compensatedBy` (as well as any other states that they transition to) must obey following rules:
4584
4584
* They should not have any incoming transitions (should not be part of the main workflow control-flow logic)
@@ -4812,9 +4812,9 @@ So if we look just at the workflow execution flow, the same workflow could be se
4812
4812
<img src="media/spec/compensation-exec2.png" height="200px" alt="Compensation Execution Example 2"/>
4813
4813
</p>
4814
4814
4815
-
In our example when compensation is triggered,
4815
+
In our example, when compensation triggers,
4816
4816
the current workflow data is passed as input to the "D1" state, the first compensation state for our example.
4817
-
It state data output is then passed as state data input to "B1", and so on.
4817
+
The states data output is then passed as states data input to "B1", and so on.
4818
4818
4819
4819
#### Compensation and Active States
4820
4820
@@ -4890,8 +4890,9 @@ evaluated with the end goal being overall workflow improvements in terms of time
4890
4890
4891
4891
Serverless Workflow specification provides extensions which can be found [here](extensions/README.md).
4892
4892
4893
-
Even tho users can define their own extensions, it is encouraged to use the ones provided by the specification,
4894
-
and for the community to contribute their extension to the specification so they can grow alongside it.
4893
+
Even tho users can define their own extensions, it is encouraged to use the ones provided by the specification.
4894
+
We also encourage users to contribute their extensions to the specification. That way they can be shared
4895
+
with the rest of the community.
4895
4896
4896
4897
If you have an idea for a new workflow extension, or would like to enhance an existing one,
4897
4898
please open an `New Extension Request` issue in this repository.
0 commit comments