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: dsl-reference.md
+27-22Lines changed: 27 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ A [workflow](#workflow) serves as a blueprint outlining the series of [tasks](#t
73
73
| input |[`input`](#input)|`no`| Configures the workflow's input. |
74
74
| use |[`use`](#use)|`no`| Defines the workflow's reusable components, if any. |
75
75
| do |[`map[string, task][]`](#task)|`yes`| The [task(s)](#task) that must be performed by the [workflow](#workflow). |
76
-
| timeout |[`timeout`](#timeout)|`no`| The configuration, if any, of the workflow's timeout. |
76
+
| timeout |`string`<br>[`timeout`](#timeout)|`no`| The configuration, if any, of the workflow's timeout.<br>*If a `string`, must be the name of a [timeout](#timeout) defined in the [workflow's reusable components](#use).*|
77
77
| output |[`output`](#output)|`no`| Configures the workflow's output. |
78
78
| schedule |[`schedule`](#schedule)|`no`| Configures the workflow's schedule, if any. |
@@ -105,6 +105,7 @@ Defines the workflow's reusable components.
105
105
| functions |[`map[string, task]`](#task)|`no`| A name/value mapping of the workflow's reusable tasks. |
106
106
| retries |[`map[string, retryPolicy]`](#retry)|`no`| A name/value mapping of the workflow's reusable retry policies. |
107
107
| secrets |`string[]`|`no`| A list containing the workflow's secrets. |
108
+
| timeouts |[`map[string, timeout]`](#timeout)|`no`| A name/value mapping of the workflow's reusable timeouts. |
108
109
109
110
#### Schedule
110
111
@@ -252,7 +253,7 @@ The Serverless Workflow DSL defines a list of [tasks](#task) that **must be** su
252
253
| input | [`input`](#input) | `no` | An object used to customize the task's input and to document its schema, if any. |
253
254
| output | [`output`](#output) | `no` | An object used to customize the task's output and to document its schema, if any. |
254
255
| export | [`export`](#export) | `no` | An object used to customize the content of the workflow context. |
255
-
| timeout | [`timeout`](#timeout) | `no` | The configuration of the task's timeout, if any. |
256
+
| timeout | `string`<br>[`timeout`](#timeout) | `no` | The configuration of the task's timeout, if any.<br>*If a `string`, must be the name of a [timeout](#timeout) defined in the [workflow's reusable components](#use).* |
256
257
| then | [`flowDirective`](#flow-directive) | `no` | The flow directive to execute next.<br>*If not set, defaults to `continue`.* |
257
258
| metadata | `map` | `no` | Additional information about the task. |
258
259
@@ -653,7 +654,7 @@ Intentionally triggers and propagates errors. By employing the "Raise" task, wor
653
654
654
655
| Name | Type | Required | Description |
655
656
|:--|:---:|:---:|:---|
656
-
| raise.error | [`error`](#error) | `yes` | Defines the error to raise. |
657
+
| raise.error | `string`<br>[`error`](#error) | `yes` | Defines the [error](#error) to raise.<br>*If a `string`, must be the name of an [error](#error) defined in the [workflow's reusable components](#use).* |
657
658
658
659
##### Examples
659
660
@@ -1036,12 +1037,12 @@ Defines the configuration of a catch clause, which a concept used to catch error
1036
1037
1037
1038
| Name | Type | Required | Description |
1038
1039
|:--|:---:|:---:|:---|
1039
-
| errors | [`errorFilter`](#retry) | `no` | The definition of the errors to catch |
1040
+
| errors | [`errorFilter`](#retry) | `no` | The definition of the errors to catch. |
1040
1041
| as | `string` | `no` | The name of the runtime expression variable to save the error as. Defaults to 'error'. |
1041
-
| when | `string`| `no` | A runtime expression used to determine whether or not to catch the filtered error |
1042
-
| exceptWhen | `string` | `no` | A runtime expression used to determine whether or not to catch the filtered error |
1043
-
| retry | [`retryPolicy`](#retry) | `no` | The retry policy to use, if any, when catching errors |
1044
-
| do | [`map[string, task][]`](#task) | `no` | The definition of the task(s) to run when catching an error |
1042
+
| when | `string`| `no` | A runtime expression used to determine whether or not to catch the filtered error. |
1043
+
| exceptWhen | `string` | `no` | A runtime expression used to determine whether or not to catch the filtered error. |
1044
+
| retry | `string`<br>[`retryPolicy`](#retry) | `no` | The [`retry policy`](#retry) to use, if any, when catching [`errors`](#error).<br>*If a `string`, must be the name of a [retry policy](#retry) defined in the [workflow's reusable components](#use).* |
1045
+
| do | [`map[string, task][]`](#task) | `no` | The definition of the task(s) to run when catching an error. |
1045
1046
1046
1047
#### Wait
1047
1048
@@ -1590,17 +1591,17 @@ Represents the definition of the parameters that control the randomness or varia
1590
1591
1591
1592
### Input
1592
1593
1593
-
Documents the structure - and optionally configures the filtering of - workflow/task input data.
1594
+
Documents the structure - and optionally configures the transformation of - workflow/task input data.
1594
1595
1595
1596
It's crucial for authors to document the schema of input data whenever feasible. This documentation empowers consuming applications to provide contextual auto-suggestions when handling runtime expressions.
1596
1597
1597
-
When set, runtimes must validate input data against the defined schema, unless defined otherwise.
1598
+
When set, runtimes must validate raw input data against the defined schema before applying transformations, unless defined otherwise.
1598
1599
1599
1600
#### Properties
1600
1601
1601
1602
| Property | Type | Required | Description |
1602
1603
|----------|:----:|:--------:|-------------|
1603
-
| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate input data.<br>*Even though the schema is not required, it is strongly encouraged to document it, whenever feasible.* |
1604
+
| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate raw input data.<br>*Even though the schema is not required, it is strongly encouraged to document it, whenever feasible.* |
1604
1605
| from | `string`<br>`object` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to filter and/or mutate the workflow/task input. |
1605
1606
1606
1607
#### Examples
@@ -1611,9 +1612,16 @@ schema:
1611
1612
document:
1612
1613
type: object
1613
1614
properties:
1614
-
petId:
1615
-
type: string
1616
-
required: [ petId ]
1615
+
order:
1616
+
type: object
1617
+
required: [ pet ]
1618
+
properties:
1619
+
pet:
1620
+
type: object
1621
+
required: [ id ]
1622
+
properties:
1623
+
id:
1624
+
type: string
1617
1625
from: .order.pet
1618
1626
```
1619
1627
@@ -1623,7 +1631,7 @@ Documents the structure - and optionally configures the transformations of - wor
1623
1631
1624
1632
It's crucial for authors to document the schema of output data whenever feasible. This documentation empowers consuming applications to provide contextual auto-suggestions when handling runtime expressions.
1625
1633
1626
-
When set, runtimes must validate output data against the defined schema, unless defined otherwise.
1634
+
When set, runtimes must validate output data against the defined schema after applying transformations, unless defined otherwise.
1627
1635
1628
1636
#### Properties
1629
1637
@@ -1646,16 +1654,13 @@ output:
1646
1654
required: [ petId ]
1647
1655
as:
1648
1656
petId: '${ .pet.id }'
1649
-
export:
1650
-
as:
1651
-
'.petList += [ $task.output ]'
1652
1657
```
1653
1658
1654
1659
### Export
1655
1660
1656
-
Certain task needs to set the workflow context to save the task output for later usage. Users set the content of the context through a runtime expression. The result of the expression is the new value of the context. The expression is evaluated against the existing context.
1661
+
Certain task needs to set the workflow context to save the task output for later usage. Users set the content of the context through a runtime expression. The result of the expression is the new value of the context. The expression is evaluated against the transformed task output.
1657
1662
1658
-
Optionally, the context might have an associated schema.
1663
+
Optionally, the context might have an associated schema which is validated against the result of the expression.
1659
1664
1660
1665
#### Properties
1661
1666
@@ -1669,13 +1674,13 @@ Optionally, the context might have an associated schema.
0 commit comments