Skip to content

Commit bd29ecd

Browse files
authored
update first couple sections (#515)
Signed-off-by: Tihomir Surdilovic <[email protected]>
1 parent bd7e9d1 commit bd29ecd

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

specification.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ You can find the specification roadmap [here](roadmap/README.md).
116116

117117
## Overview
118118

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.
120120
They can bridge the gap between how we express and model business logic.
121121

122122
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:
183183

184184
### Workflow Definition
185185

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)
188188
and the [Workflow Model](#Workflow-Model) It defines a blueprint used by runtimes for its execution.
189189

190190
A business solution can be composed of any number of related workflow definitions.
191191
Their relationships are explicitly modeled with the Serverless Workflow language (for example
192192
by using [SubFlowRef Definition](#SubFlowRef-Definition) in actions).
193193

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

197196
### Workflow Instance
198197

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

203203
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.
205205

206206
Each workflow instances should have its unique identifier, which should remain
207207
unchanged throughout its execution.
208208

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

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,
219219
or defining an [`workflowExecTimeout`](#Workflow-Timeouts) property are also possible.
220220

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

225226
### Workflow Model
226227

@@ -229,6 +230,8 @@ The Serverless Workflow language is composed of:
229230
* [Function definitions](#Function-Definition) - Reusable functions that can declare services that need to be invoked, or expressions to be evaluated.
230231
* [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.
231232
* [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.
232235
* [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.
233236

234237
### Workflow Data

0 commit comments

Comments
 (0)