Skip to content

[Fix #1040] Set behaviour clarification #1041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 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
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
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
Loading