Skip to content

Commit

Permalink
Merge branch 'main' into feat-form-based-issue-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
cdavernas authored Dec 19, 2024
2 parents fc51e59 + 36ec4ed commit 25810f8
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 34 deletions.
4 changes: 2 additions & 2 deletions dsl-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ The Serverless Workflow DSL defines a list of [tasks](#task) that **must be** su
- [Raise](#raise), used to raise an [error](#error) and potentially fault the [workflow](#workflow).
- [Run](#run), used to run a [container](#container-process), a [script](#script-process) , a [shell](#shell-process) command or even another [workflow](#workflow-process).
- [Switch](#switch), used to dynamically select and execute one of multiple alternative paths based on specified conditions
- [Set](#set), used to dynamically set or update the [workflow](#workflow)'s data during the its execution.
- [Set](#set), used to dynamically set the [workflow](#workflow)'s data during the its execution.
- [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.
- [Wait](#wait), used to pause or wait for a specified duration before proceeding to the next task.
Expand Down Expand Up @@ -1818,7 +1818,7 @@ Describes an enpoint.
| Property | Type | Required | Description |
|----------|:----:|:--------:|-------------|
| uri | `string` | `yes` | The endpoint's URI. |
| authentication | `[authentication](#authentication)` | `no` | The authentication policy to use. |
| authentication | [authentication](#authentication) | `no` | The authentication policy to use. |

### HTTP Response

Expand Down
2 changes: 1 addition & 1 deletion dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ The Serverless Workflow DSL defines several default [task](dsl-reference.md#task
- [Listen](dsl-reference.md#listen), used to listen for an [event](dsl-reference.md#event) or more.
- [Raise](dsl-reference.md#raise), used to raise an [error](dsl-reference.md#error) and potentially fault the [workflow](dsl-reference.md#workflow).
- [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).
- [Set](dsl-reference.md#set), used to dynamically set or update the [workflow](dsl-reference.md#workflow)'s data during the its execution.
- [Set](dsl-reference.md#set), used to dynamically set the [workflow](dsl-reference.md#workflow)'s data during the its execution.
- [Switch](dsl-reference.md#switch), used to dynamically select and execute one of multiple alternative paths based on specified conditions
- [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.
- [Wait](dsl-reference.md#wait), used to pause or wait for a specified duration before proceeding to the next task.
Expand Down
File renamed without changes.
34 changes: 10 additions & 24 deletions examples/switch-then-string.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,17 @@ do:
- default:
then: handleUnknownOrderType
- processElectronicOrder:
do:
- validatePayment:
set:
validate: true
- fulfillOrder:
set:
status: fulfilled
set:
validate: true
status: fulfilled
then: exit
- processPhysicalOrder:
do:
- checkInventory:
set:
inventory: clear
- packItems:
set:
items: 1
- scheduleShipping:
set:
address: Elmer St
set:
inventory: clear
items: 1
address: Elmer St
then: exit
- handleUnknownOrderType:
do:
- logWarning:
set:
log: warn
- notifyAdmin:
set:
message: something's wrong
set:
log: warn
message: something's wrong
2 changes: 1 addition & 1 deletion examples/try-catch-retry-inline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ do:
catch:
errors:
with:
type: https://serverlessworkflow.io.io/dsl/errors/types/communication
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
status: 503
retry:
delay:
Expand Down
2 changes: 1 addition & 1 deletion examples/try-catch-retry-reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ do:
catch:
errors:
with:
type: https://serverlessworkflow.io.io/dsl/errors/types/communication
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
status: 503
retry: default

2 changes: 1 addition & 1 deletion examples/try-catch-then.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ do:
catch:
errors:
with:
type: https://serverlessworkflow.io.io/dsl/errors/types/communication
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
status: 404
as: error
do:
Expand Down
2 changes: 1 addition & 1 deletion examples/try-catch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ do:
catch:
errors:
with:
type: https://serverlessworkflow.io.io/dsl/errors/types/communication
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
status: 404
30 changes: 27 additions & 3 deletions schema/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -777,19 +777,22 @@ $defs:
errors:
type: object
title: CatchErrors
description: The configuration of a concept used to catch errors.
properties:
with:
$ref: '#/$defs/errorFilter'
description: static error filter
as:
type: string
title: CatchAs
description: The name of the runtime expression variable to save the error as. Defaults to 'error'.
when:
type: string
title: CatchWhen
description: A runtime expression used to determine whether or not to catch the filtered error.
description: A runtime expression used to determine whether to catch the filtered error.
exceptWhen:
type: string
title: CatchExceptWhen
description: A runtime expression used to determine whether or not to catch the filtered error.
description: A runtime expression used to determine whether not to catch the filtered error.
retry:
oneOf:
- $ref: '#/$defs/retryPolicy'
Expand Down Expand Up @@ -1152,6 +1155,27 @@ $defs:
title: ErrorDetails
description: A human-readable explanation specific to this occurrence of the error.
required: [ type, status ]
errorFilter:
type: object
title: ErrorFilter
description: Error filtering base on static values. For error filtering on dynamic values, use catch.when property
minProperties: 1
properties:
type:
type: string
description: if present, means this value should be used for filtering
status:
type: integer
description: if present, means this value should be used for filtering
instance:
type: string
description: if present, means this value should be used for filtering
title:
type: string
description: if present, means this value should be used for filtering
details:
type: string
description: if present, means this value should be used for filtering
uriTemplate:
title: UriTemplate
anyOf:
Expand Down

0 comments on commit 25810f8

Please sign in to comment.