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
+24-21Lines changed: 24 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ You can find the specification roadmap [here](roadmap/README.md).
116
116
117
117
## Overview
118
118
119
-
Workflows allow us to capture and organize business requirements in an unified manner.
119
+
Workflows allow us to capture and organize business requirements in a unified manner.
120
120
They can bridge the gap between how we express and model business logic.
121
121
122
122
A key component of workflows is the domain-specific language (DSL) we use to model our
@@ -183,44 +183,45 @@ This section describes some of the core Serverless Workflow concepts:
183
183
184
184
### Workflow Definition
185
185
186
-
A workflow definition is a single artifact written in the Serverless Workflow
187
-
language. It consists of the core [Workflow Definition Structure](#Workflow-Definition-Structure)
186
+
A workflow definition is a JSON or YAML file that conforms to the Serverless Workflow specification DSL.
187
+
It consists of the core [Workflow Definition Structure](#Workflow-Definition-Structure)
188
188
and the [Workflow Model](#Workflow-Model) It defines a blueprint used by runtimes for its execution.
189
189
190
190
A business solution can be composed of any number of related workflow definitions.
191
191
Their relationships are explicitly modeled with the Serverless Workflow language (for example
192
192
by using [SubFlowRef Definition](#SubFlowRef-Definition) in actions).
193
193
194
-
Runtimes can initialize workflow definitions for some particular set of data inputs or events
195
-
which forms [workflow instances](#Workflow-Instance).
194
+
Runtimes can initialize workflow definitions for some particular set of data inputs or events.
196
195
197
196
### Workflow Instance
198
197
199
-
A workflow instance represents a single workflow execution according to the given
200
-
workflow definition. Instances should be kept isolated, but
201
-
still be able to have access to other running instances.
198
+
A workflow instance represents a single workflow execution corresponding to the instructions provided by a
199
+
workflow definition. A workflow instance can be short or long-running. A single workflow instance
200
+
should be isolated, meaning it should not share state and data with other workflow instances.
201
+
Workflow instances should be able to communicate with each other via events.
202
202
203
203
Depending on their workflow definition, workflow instances can be short-lived or
204
-
can execute for days, weeks, or longer.
204
+
can execute for days, weeks, or years.
205
205
206
206
Each workflow instances should have its unique identifier, which should remain
207
207
unchanged throughout its execution.
208
208
209
-
Workflow definitions can describe how/when workflow instances should be created via
210
-
its `start` property. This property is described in detail in the [start definition section](#Start-Definition).
211
-
For example, instance creation can be defined for some set of data, but other ways are also possible.
212
-
For example you can enforce instance creations upon arrival of certain events with a starting [EventState](#Event-State), as well
213
-
on a defined [schedule](#Schedule-Definition).
209
+
Workflow instances can be started providing some data input. This is described in detail in the
210
+
[workflow data input](#Workflow-Data-Input) section.
211
+
Workflow instances can also wait for examples to start their execution, which is the case
212
+
where a workflow definition contains a [EventState](#Event-State) starting workflow state.
214
213
215
-
Workflow instance termination is also explicitly described in the workflow definition.
216
-
By default, instances should be terminated once there are no active workflow paths (all active
217
-
paths reach a state containing the default [end definition](#End-Definition)). Other ways, such as
218
-
using the `terminate` property of the [end definition](#End-Definition) to terminate instance execution,
214
+
The workflow definition also explicitly defines when a workflow instance should be completed.
215
+
By default, instances should be completed once there are no active workflow paths (all active
216
+
paths reach a state containing the default [end definition](#End-Definition)),
217
+
or if the defined [`workflowExecTimeout`](#Workflow-Timeouts) time is reached.
218
+
Other ways, such as using the `terminate` property of the [end definition](#End-Definition) to terminate instance execution,
219
219
or defining an [`workflowExecTimeout`](#Workflow-Timeouts) property are also possible.
220
220
221
-
This default behavior can be changed by setting the `keepActive` workflow property to `true`.
222
-
In this case the only way to terminate a workflow instance is for its control flow to explicitly end with a "terminate" [end definition](#End-Definition),
223
-
or if the defined [`workflowExecTimeout`](#Workflow-Timeouts) time is reached.
221
+
For long-running workflow-executions, you can utilize the `keepActive` workflow property which
222
+
provides more control as to when exactly to terminate workflow execution. In cases where a
223
+
workflow execution should be continued as a new one, the DSL also provides the `continueAs` property which is described
224
+
in detail in the [Continuing a new Execution](#Continuing-as-a-new-Execution) section.
224
225
225
226
### Workflow Model
226
227
@@ -229,6 +230,8 @@ The Serverless Workflow language is composed of:
229
230
*[Function definitions](#Function-Definition) - Reusable functions that can declare services that need to be invoked, or expressions to be evaluated.
230
231
*[Event definitions](#Event-Definition) - Reusable declarations of events that need to be `consumed` to start or continue workflow instances, trigger function/service execution, or be `produced` during workflow execution.
231
232
*[Retry definitions](#Retry-Definition) - Reusable retry definitions. Can specify retry strategies for service invocations during workflow execution.
233
+
*[Timeout definitions](#Workflow-Timeouts) - Reusable timeout definitions. Can specify default workflow execution timeout, as well as workflow state, action, and branch execution timeouts.
234
+
*[Errors definition](#Defining-Errors) - Reusable error definitions. Provide domain-specific error definitions which can be referenced in workflow states error handling.
232
235
*[State definitions](#Workflow-States) - Definition of states, the building blocks of workflow `control flow logic`. States can reference the reusable function, event and retry definitions.
0 commit comments