Skip to content

Commit 8f3b8a9

Browse files
author
Tihomir Surdilovic
authored
small typos and text fixes (#290) (#291)
Signed-off-by: Tihomir Surdilovic <[email protected]>
1 parent 3e5ba37 commit 8f3b8a9

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

specification.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ This section describes some of the core Serverless Workflow concepts:
106106

107107
### Workflow Definition
108108

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
110110
language. It consists of a set of [workflow model](#Workflow-Model) constructs,
111111
and defines a blueprint used by runtimes for its execution.
112112

@@ -753,11 +753,11 @@ Because our event state is also an end state, its data output becomes the final
753753
Consumed event data (payload) and action execution results should be merged into the state data.
754754
Event and action data filters can be used to give more details about this operation.
755755

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

759759
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
761761
be created first.
762762

763763
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
788788
}
789789
```
790790

791-
After the merge the state data should be:
791+
After merging the state data should be:
792792

793793
```json
794794
{
@@ -1552,7 +1552,7 @@ By default, as described in the [Core Concepts](#Core-Concepts) section, a workf
15521552
active execution paths, one of its active paths ends in a "terminate" [end definition](#End-Definition), or when
15531553
its [`execTimeout`](#ExecTimeout-Definition) time is reached.
15541554

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
15561556
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
15571557
its [`execTimeout`](#ExecTimeout-Definition) time is reached.
15581558
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
36223622
The `outputCollection` property is a workflow expression which selects an array in the state data where the results
36233623
of each iteration should be added to. If this array does not exist, it should be created.
36243624

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.
36263626
It should contain the unique element of the `inputCollection` array and passed as data input to the actions/workflow defined.
36273627
`iterationParam` should be created for each iteration, so it can be referenced/used in defined actions / workflow data input.
36283628

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

36313631
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
36333633
is defined.
36343634

36353635
Let's take a look at an example:
@@ -3732,8 +3732,8 @@ states:
37323732
</tr>
37333733
</table>
37343734

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`.
37373737

37383738
For each element of the array selected by `inputCollection` a JSON object defined by `iterationParam` should be
37393739
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
42254225
execution paths.
42264226
If a terminate end is reached inside a ForEach, Parallel, or SubFlow state, the entire workflow instance is terminated.
42274227

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
42294229
by the workflow instance before workflow stops its execution.
42304230

42314231
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
44974497
In this particular case we define a retry strategy for "Service Call Timeouts" which says that the states
44984498
control-flow logic should be retried up to 4 times, with a 1 minute delay between each retry attempt.
44994499

4500-
Different states now can use this retry strategy defined. For example:
4500+
Different states now can use the defined retry strategy. For example:
45014501

45024502
<table>
45034503
<tr>
@@ -4560,7 +4560,7 @@ and the received event information used for all of the issued retries.
45604560

45614561
Compensation deals with undoing or reversing the work of one or more states which have
45624562
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
45644564
doing that is to credit the customer $100.
45654565

45664566
It's important to understand that compensation with workflows is not the same as for example rolling back
@@ -4578,7 +4578,7 @@ errors.
45784578
#### Defining Compensation
45794579

45804580
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.
45824582

45834583
States referenced by `compensatedBy` (as well as any other states that they transition to) must obey following rules:
45844584
* 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
48124812
<img src="media/spec/compensation-exec2.png" height="200px" alt="Compensation Execution Example 2"/>
48134813
</p>
48144814

4815-
In our example when compensation is triggered,
4815+
In our example, when compensation triggers,
48164816
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.
48184818

48194819
#### Compensation and Active States
48204820

@@ -4890,8 +4890,9 @@ evaluated with the end goal being overall workflow improvements in terms of time
48904890

48914891
Serverless Workflow specification provides extensions which can be found [here](extensions/README.md).
48924892

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

48964897
If you have an idea for a new workflow extension, or would like to enhance an existing one,
48974898
please open an `New Extension Request` issue in this repository.

0 commit comments

Comments
 (0)