Skip to content

Commit 25810f8

Browse files
authored
Merge branch 'main' into feat-form-based-issue-templates
2 parents fc51e59 + 36ec4ed commit 25810f8

9 files changed

+44
-34
lines changed

dsl-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ The Serverless Workflow DSL defines a list of [tasks](#task) that **must be** su
243243
- [Raise](#raise), used to raise an [error](#error) and potentially fault the [workflow](#workflow).
244244
- [Run](#run), used to run a [container](#container-process), a [script](#script-process) , a [shell](#shell-process) command or even another [workflow](#workflow-process).
245245
- [Switch](#switch), used to dynamically select and execute one of multiple alternative paths based on specified conditions
246-
- [Set](#set), used to dynamically set or update the [workflow](#workflow)'s data during the its execution.
246+
- [Set](#set), used to dynamically set the [workflow](#workflow)'s data during the its execution.
247247
- [Try](#try), used to attempt executing a specified [task](#task), and to handle any resulting [errors](#error) gracefully, allowing the [workflow](#workflow) to continue without interruption.
248248
- [Wait](#wait), used to pause or wait for a specified duration before proceeding to the next task.
249249
@@ -1818,7 +1818,7 @@ Describes an enpoint.
18181818
| Property | Type | Required | Description |
18191819
|----------|:----:|:--------:|-------------|
18201820
| uri | `string` | `yes` | The endpoint's URI. |
1821-
| authentication | `[authentication](#authentication)` | `no` | The authentication policy to use. |
1821+
| authentication | [authentication](#authentication) | `no` | The authentication policy to use. |
18221822

18231823
### HTTP Response
18241824

dsl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ The Serverless Workflow DSL defines several default [task](dsl-reference.md#task
131131
- [Listen](dsl-reference.md#listen), used to listen for an [event](dsl-reference.md#event) or more.
132132
- [Raise](dsl-reference.md#raise), used to raise an [error](dsl-reference.md#error) and potentially fault the [workflow](dsl-reference.md#workflow).
133133
- [Run](dsl-reference.md#run), used to run a [container](dsl-reference.md#container-process), a [script](dsl-reference.md#script-process), a [shell](dsl-reference.md#shell-process) command or even another [workflow](dsl-reference.md#workflow-process).
134-
- [Set](dsl-reference.md#set), used to dynamically set or update the [workflow](dsl-reference.md#workflow)'s data during the its execution.
134+
- [Set](dsl-reference.md#set), used to dynamically set the [workflow](dsl-reference.md#workflow)'s data during the its execution.
135135
- [Switch](dsl-reference.md#switch), used to dynamically select and execute one of multiple alternative paths based on specified conditions
136136
- [Try](dsl-reference.md#try), used to attempt executing a specified [task](dsl-reference.md#task), and to handle any resulting [errors](dsl-reference.md#error) gracefully, allowing the [workflow](dsl-reference.md#workflow) to continue without interruption.
137137
- [Wait](dsl-reference.md#wait), used to pause or wait for a specified duration before proceeding to the next task.
File renamed without changes.

examples/switch-then-string.yaml

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,17 @@ do:
1515
- default:
1616
then: handleUnknownOrderType
1717
- processElectronicOrder:
18-
do:
19-
- validatePayment:
20-
set:
21-
validate: true
22-
- fulfillOrder:
23-
set:
24-
status: fulfilled
18+
set:
19+
validate: true
20+
status: fulfilled
2521
then: exit
2622
- processPhysicalOrder:
27-
do:
28-
- checkInventory:
29-
set:
30-
inventory: clear
31-
- packItems:
32-
set:
33-
items: 1
34-
- scheduleShipping:
35-
set:
36-
address: Elmer St
23+
set:
24+
inventory: clear
25+
items: 1
26+
address: Elmer St
3727
then: exit
3828
- handleUnknownOrderType:
39-
do:
40-
- logWarning:
41-
set:
42-
log: warn
43-
- notifyAdmin:
44-
set:
45-
message: something's wrong
29+
set:
30+
log: warn
31+
message: something's wrong

examples/try-catch-retry-inline.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ do:
1414
catch:
1515
errors:
1616
with:
17-
type: https://serverlessworkflow.io.io/dsl/errors/types/communication
17+
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
1818
status: 503
1919
retry:
2020
delay:

examples/try-catch-retry-reusable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ do:
2424
catch:
2525
errors:
2626
with:
27-
type: https://serverlessworkflow.io.io/dsl/errors/types/communication
27+
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
2828
status: 503
2929
retry: default
3030

examples/try-catch-then.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ do:
1414
catch:
1515
errors:
1616
with:
17-
type: https://serverlessworkflow.io.io/dsl/errors/types/communication
17+
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
1818
status: 404
1919
as: error
2020
do:

examples/try-catch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ do:
1414
catch:
1515
errors:
1616
with:
17-
type: https://serverlessworkflow.io.io/dsl/errors/types/communication
17+
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
1818
status: 404

schema/workflow.yaml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -777,19 +777,22 @@ $defs:
777777
errors:
778778
type: object
779779
title: CatchErrors
780-
description: The configuration of a concept used to catch errors.
780+
properties:
781+
with:
782+
$ref: '#/$defs/errorFilter'
783+
description: static error filter
781784
as:
782785
type: string
783786
title: CatchAs
784787
description: The name of the runtime expression variable to save the error as. Defaults to 'error'.
785788
when:
786789
type: string
787790
title: CatchWhen
788-
description: A runtime expression used to determine whether or not to catch the filtered error.
791+
description: A runtime expression used to determine whether to catch the filtered error.
789792
exceptWhen:
790793
type: string
791794
title: CatchExceptWhen
792-
description: A runtime expression used to determine whether or not to catch the filtered error.
795+
description: A runtime expression used to determine whether not to catch the filtered error.
793796
retry:
794797
oneOf:
795798
- $ref: '#/$defs/retryPolicy'
@@ -1152,6 +1155,27 @@ $defs:
11521155
title: ErrorDetails
11531156
description: A human-readable explanation specific to this occurrence of the error.
11541157
required: [ type, status ]
1158+
errorFilter:
1159+
type: object
1160+
title: ErrorFilter
1161+
description: Error filtering base on static values. For error filtering on dynamic values, use catch.when property
1162+
minProperties: 1
1163+
properties:
1164+
type:
1165+
type: string
1166+
description: if present, means this value should be used for filtering
1167+
status:
1168+
type: integer
1169+
description: if present, means this value should be used for filtering
1170+
instance:
1171+
type: string
1172+
description: if present, means this value should be used for filtering
1173+
title:
1174+
type: string
1175+
description: if present, means this value should be used for filtering
1176+
details:
1177+
type: string
1178+
description: if present, means this value should be used for filtering
11551179
uriTemplate:
11561180
title: UriTemplate
11571181
anyOf:

0 commit comments

Comments
 (0)