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
+20-21Lines changed: 20 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ They can bridge the gap between how we express and model business logic.
44
44
45
45
A key component of workflows is the domain-specific language (DSL) we use to model our
46
46
business logic and solutions. Selecting the appropriate workflow language for our business and technology domains is
47
-
a very important decision to be consider.
47
+
a very important decision to be considered.
48
48
49
49
Serverless Workflow focuses on defining a **vendor-neutral**, **platform-independent**, and **declarative** workflow
50
50
language that targets the serverless computing technology domain.
@@ -60,7 +60,7 @@ Portability as well as productivity that can be achieved from workflow orchestra
60
60
Serverless Workflow addresses the need for a community-driven, vendor-neutral and a platform-independent
61
61
workflow language specification that targets the serverless computing technology domain.
62
62
63
-
Having and using a specification-based workflow language allows us to model our worflows once and deploy them
63
+
Having and using a specification-based workflow language allows us to model our workflows once and deploy them
64
64
onto many different container/cloud platforms, expecting the same execution results.
65
65
66
66
<palign="center">
@@ -75,7 +75,7 @@ For more information on the history, development and design rationale behind the
75
75
<imgsrc="media/spec/spec-parts.png"width="600"alt="Serverless Workflow Specification Focus On Standards"/>
76
76
</p>
77
77
78
-
Serverless Workflow language takes advantage of wellestablished and known standards such as [CloudEvents](https://cloudevents.io/) and [OpenApi](https://www.openapis.org/) specifications.
78
+
Serverless Workflow language takes advantage of well-established and known standards such as [CloudEvents](https://cloudevents.io/) and [OpenApi](https://www.openapis.org/) specifications.
79
79
80
80
## Project Components
81
81
@@ -87,7 +87,7 @@ The specification has multiple components:
87
87
88
88
* Definitions of the workflow language. This is defined via the [Workflow JSON Schema](schema/workflow.json). You can use both
89
89
[JSON](https://www.json.org/json-en.html) and [YAML](https://yaml.org/) formats to model your workflows.
90
-
* Software Development Kits (SDKs) for both [Go](https://github.com/serverlessworkflow/sdk-go) and [Java](https://github.com/serverlessworkflow/sdk-java)
90
+
* Software Development Kits (SDKs) for both [Go](https://github.com/serverlessworkflow/sdk-go) and [Java](https://github.com/serverlessworkflow/sdk-java),
91
91
and we plan to add them for more languages in the future.
92
92
* Set of [Workflow Extensions](extensions/README.md) which
93
93
allow users to define additional, non-execution-related workflow information. This information can be used to improve
@@ -105,12 +105,12 @@ This section describes some of the core Serverless Workflow concepts:
105
105
106
106
### Workflow Definition
107
107
108
-
A workflow definition is a single artefact written in the Serverless Workflow
108
+
A workflow definition is a single artifact written in the Serverless Workflow
109
109
language. It consists of a set of [workflow model](#Workflow-Model) constructs,
110
110
and defines a blueprint used by runtimes for its execution.
111
111
112
112
A business solution can be composed of any number of related workflow definitions.
113
-
Their relationships are explicitly modelled with the Serverless Workflow language (for example
113
+
Their relationships are explicitly modeled with the Serverless Workflow language (for example
114
114
by using [SubFlow](#SubFlow-State) states).
115
115
116
116
Runtimes can initialize workflow definitions for some particular set of data inputs or events
@@ -135,7 +135,7 @@ you can enforce instance creations upon arrival of certain events with a startin
135
135
on a defined [schedule](#Start-Definition).
136
136
137
137
Workflow instance termination is also explicitly described in the workflow definition.
138
-
By default instances should be terminated once there are no active workflow paths (all active
138
+
By default, instances should be terminated once there are no active workflow paths (all active
139
139
paths reach a state containing the default [end definition](#End-Definition)). Other ways, such as
140
140
using the `terminate` property of the [end definition](#End-Definition) to terminate instance execution,
141
141
or defining an [execution timeout](#ExecTimeout-Definition) are also possible.
@@ -831,8 +831,7 @@ that the workflow instance creates during its execution (produced).
831
831
The default value (if not specified) of the `kind` property is `consumed`.
832
832
Note that for `produced` event definitions, implementations must provide the value of the CloudEvent source attribute.
833
833
In this case (i.e., when the `kind` property is set to `produced`), the `source` property of the event definition is not required.
834
-
Otherwise (i.e., when the `kind` property is set to `consumed`), the `source` property must be defined in the event definition.
835
-
834
+
Otherwise, (i.e., when the `kind` property is set to `consumed`), the `source` property must be defined in the event definition.
836
835
837
836
Event correlation plays a big role in large event-driven applications. Correlating one or more events with a particular workflow instance
838
837
can be done by defining the event correlation rules within the `correlation` property.
@@ -905,7 +904,7 @@ If a workflow instance is created (e.g., via Event state) by consuming a "HeartR
905
904
from the defined source and with the defined type that have the same "patientId" as the event that triggered the workflow instance
906
905
should then also be associated with the same instance.
907
906
908
-
You can also correlate multiple events together. In the following example, we assume that the workflow consumes two different event types
907
+
You can also correlate multiple events together. In the following example, we assume that the workflow consumes two different event types,
909
908
and we want to make sure that both are correlated, as in the above example, with the same "patientId":
910
909
911
910
@@ -1634,7 +1633,7 @@ Defines the states retry policy (strategy). This is an explicit definition and c
1634
1633
defined workflow state errors.
1635
1634
1636
1635
The `name` property specifies the unique name of the retry definition (strategy). This unique name
1637
-
can be refered by workflow states [error definitions](#Error-Definition).
1636
+
can be referred by workflow states [error definitions](#Error-Definition).
1638
1637
1639
1638
The `delay` property specifies the initial time delay between retry attempts (ISO 8601 duration format).
1640
1639
@@ -1676,7 +1675,7 @@ reducing total time to complete requests and overall congestion. How this value
1676
1675
is used in the exponential backoff algorithm is left up to implementations.
1677
1676
1678
1677
`jitter`may be specified as a percentage relative to the total delay.
1679
-
For example, if `interval` is 2 seconds, `multiplier` is 2 seconds and we're at
1678
+
For example, if `interval` is 2 seconds, `multiplier` is 2 seconds, and we're at
1680
1679
the third attempt, there will be a delay of 6 seconds. If we set `jitter` to
1681
1680
0.3, then a random amount of time between 0 and 1.8 (`totalDelay * jitter == 6 * 0.3`)
1682
1681
will be added or subtracted from the delay.
@@ -1926,7 +1925,7 @@ These are exclusive, meaning that a switch state can define one or the other con
1926
1925
1927
1926
At times multiple defined conditions can be evaluated to `true` by runtime implementations.
1928
1927
Conditions defined first take precedence over conditions defined later. This is backed by the fact that arrays/sequences
1929
-
are orderd in both JSON and YAML. For example, let's say there are two `true` conditions: A and B, defined in that order.
1928
+
are ordered in both JSON and YAML. For example, let's say there are two `true` conditions: A and B, defined in that order.
1930
1929
Because A was defined first, its transition will be executed, not B's.
1931
1930
1932
1931
In case of data-based conditions definition, switch state controls workflow transitions based on the states data.
@@ -2691,7 +2690,7 @@ It should contain the unique element of the `inputCollection` array and passed a
2691
2690
The `actions` property defines actions to be executed in each state iteration.
2692
2691
2693
2692
If actions are not defined, you can specify the `workflowid` to reference a workflow id which needs to be executed
2694
-
for each iteration. Note that `workflowid` should not be the same as the workflow id of the workflow wher the foreach state
2693
+
for each iteration. Note that `workflowid` should not be the same as the workflow id of the workflow where the foreach state
2695
2694
is defined.
2696
2695
2697
2696
Let's take a look at an example:
@@ -2990,7 +2989,7 @@ SubFlow states [`onErrors`](#Error-Definition) definition, the control flow must
2990
2989
and repeat execution must halt.
2991
2990
2992
2991
An alternative way to limit repeat executions is via the `stopOnEvents` property. It contains a list of one or more
2993
-
defined consumed workflow events (referened by the unique event name). When `stopOnEvents` is defined,
2992
+
defined consumed workflow events (referenced by the unique event name). When `stopOnEvents` is defined,
2994
2993
SubFlow will repeat execution until one of the defined events is consumed, or until the max property count is reached.
2995
2994
2996
2995
#### Start Definition
@@ -3000,7 +2999,7 @@ Can be either `boolean` or `object` type. If type boolean, must be set to `true`
3000
2999
```json
3001
3000
"start": true
3002
3001
```
3003
-
In this case it's assumed that the `schedule`property is not defined.
3002
+
In this case it's assumed that the `schedule`property is not defined.
3004
3003
3005
3004
If the start definition is of type `object`, it has the following structure:
3006
3005
@@ -3140,7 +3139,7 @@ directInvoke: true
3140
3139
The `interval` property uses the ISO 8601 time interval format to describe when workflow instances can be created.
3141
3140
There is a number of ways to express the time interval:
3142
3141
3143
-
1. **Start** + **End**: Defines the start and end time, for example "2020-03-20T13:00:00Z/2021-05-11T15:30:00Z", meaning workflow intances can be
3142
+
1. **Start** + **End**: Defines the start and end time, for example "2020-03-20T13:00:00Z/2021-05-11T15:30:00Z", meaning workflow instances can be
3144
3143
created from March 20th 2020 at 1PM UTC until May 11th 2021 at 3:30pm UTC.
3145
3144
2. **Start** + **Duration**: Defines the start time and the duration, for example: "2020-03-20T13:00:00Z/P1Y2M10DT2H30M", meaning workflow instances can be created
3146
3145
from March 20th 2020 at 1pm UTC and continue to do so for 1 year, 2 months, 10 days 2 hours and 30 minutes.
@@ -3946,7 +3945,7 @@ the entire state data as the data available to functions that should be executed
3946
3945
specifies that results of all functions executed in this action should be placed back to the state data as part
3947
3946
of a new "finalCustomerGreeting" object.
3948
3947
3949
-
The action then calls the "greetingFunction" function passing in as parameters the spanish greeting and the name of the customer that arrived.
3948
+
The action then calls the "greetingFunction" function passing in as parameters the Spanish greeting and the name of the customer that arrived.
3950
3949
3951
3950
We assume that for this example "greetingFunction" returns:
3952
3951
@@ -4126,8 +4125,8 @@ onErrors:
4126
4125
Retries are related to errors. When certain errors are encountered we might want to retry the states execution.
4127
4126
4128
4127
We can define retries within the workflow states [error definitions](#Defining-Errors).
4129
-
This is done by defining the [retry stragy](#Retry-Definition) as the workflow top-level parameter using its `retries` array, and then
4130
-
adding a `retryRef` parameter to the error definition which references this retry strategy for a specific error.
4128
+
This is done by defining the [retry strategy](#Retry-Definition) as the workflow top-level parameter using its `retries` array, and then
4129
+
adding a `retryRef` parameter to the error definition which references these retry strategies for a specific error.
4131
4130
4132
4131
If a defined retry for the defined error is successful, the defined workflow control flow logic of the state
4133
4132
should be performed, meaning either workflow can transition according to the states `transition`
@@ -4511,7 +4510,7 @@ After it is cancelled, compensation should be performed.
4511
4510
States that are marked as `usedForCompensation` can define [error handling](#Workflow-Error-Handling) via their
4512
4511
`onErrors`property just like any other workflow states. In case of unrecoverable errors during their execution
4513
4512
(errors not explicitly handled),
4514
-
workflow execution should be stopped, which is the same behaviour as when not using compensation as well.
4513
+
workflow execution should be stopped, which is the same behavior as when not using compensation as well.
0 commit comments