Data Orchestrator DSL reference (based on Open Workflow Specification)
This page explains the concepts supported by the Data Orchestrator DSL with detailed definitions and property tables. Data Orchestrator is vendor-neutral and open-source as it is based on the Open Workflow DSL Reference.
Some concepts are exclusive to Data Orchestrator and are marked as such in the reference. Concepts that are not yet implemented in the current version are listed in the Concepts not implemented in Data Orchestrator section.
Workflow
A workflow is a blueprint outlining the series of tasks required to execute a specific business operation. It details the sequence in which tasks must be completed, guiding users through the process from start to finish, and helps streamline operations, ensure consistency, and optimize efficiency within an organization.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
document | document | yes | Documents the defined workflow. |
input | input | no | Configures the input of the workflow. |
use | use | no | Defines the reusable components of the workflow, if any. |
do | map[string, task] | yes | The task(s) that must be performed by the workflow. |
timeout | string timeout | no | The configuration, if any, of the timeout of the workflow. If a string, must be the name of a timeout defined in the reusable components of the workflow. |
output | output | no | Configures the output of the workflow. |
evaluate | evaluate | no | Configures runtime expression evaluation. |
Document
Documents the workflow definition.
| Property name | Type | Required | Description |
|---|---|---|---|
dsl | string | yes | The version of the DSL used to define the workflow. |
namespace | string | yes | The namespace of the workflow. |
name | string | yes | The name of the workflow. |
version | string | yes | The semantic version of the workflow. |
title | string | no | The title of the workflow. |
summary | string | no | The Markdown summary of the workflow. |
tags | map[string, string] | no | A key/value mapping of the tags of the workflow, if any. |
metadata | map | no | Additional information about the workflow. |
Use
Defines the reusable components of the workflow.
| Property name | Type | Required | Description |
|---|---|---|---|
authentications | map[string, authentication] | no | A name/value mapping of the reusable authentication policies. |
errors | map[string, error] | no | A name/value mapping of the reusable errors. |
functions | map[string, task] | no | A name/value mapping of the reusable tasks. |
retries | map[string, retryPolicy] | no | A name/value mapping of the reusable retry policies. |
secrets | string[] | no | A list containing the secrets of the workflow. |
timeouts | map[string, timeout] | no | A name/value mapping of the reusable timeouts. |
Evaluate
Configures a runtime expression evaluation for the workflow.
| Property name | Type | Required | Description |
|---|---|---|---|
language | string | no | The language used for writing runtime expressions. Defaults to jq. |
mode | string | no | The runtime expression evaluation mode. Supported values are: - strict: requires all expressions to be enclosed within ${ } for proper identification and evaluation.- loose: evaluates any value provided. If the evaluation fails, it results in a string with the expression as its content.Defaults to strict. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: order-pet
version: '0.1.0'
title: Order Pet - 1.0.0
summary: >
# Order Pet - 1.0.0
## Table of Contents
- [Description](#description)
- [Requirements](#requirements)
## Description
A sample workflow used to process an hypothetic pet order using the [PetStore API](https://petstore.swagger.io/)
## Requirements
## Secrets
- my-oauth2-secret
use:
authentications:
petStoreOAuth2:
oauth2:
authority: https://petstore.swagger.io/.well-known/openid-configuration
grant: client_credentials
client:
id: workflow-runtime
secret: "**********"
scopes: [ api ]
audiences: [ runtime ]
extensions:
- externalLogging:
extend: all
before:
- sendLog:
call: http
with:
method: post
endpoint: https://fake.log.collector.com
body:
message: ${ "Executing task '\($task.reference)'..." }
after:
- sendLog:
call: http
with:
method: post
endpoint: https://fake.log.collector.com
body:
message: ${ "Executed task '\($task.reference)'..." }
functions:
getAvailablePets:
call: openapi
with:
document:
endpoint: https://petstore.swagger.io/v2/swagger.json
operationId: findByStatus
parameters:
status: available
secrets:
- my-oauth2-secret
do:
- getAvailablePets:
call: getAvailablePets
output:
as: "$input + { availablePets: [.[] | select(.category.name == \"dog\" and (.tags[] | .breed == $input.order.breed))] }"
- submitMatchesByMail:
call: http
with:
method: post
endpoint:
uri: https://fake.smtp.service.com/email/send
authentication:
use: petStoreOAuth2
body:
from: noreply@fake.petstore.com
to: ${ .order.client.email }
subject: Candidates for Adoption
body: >
Hello ${ .order.client.preferredDisplayName }!
Following your interest to adopt a dog, here is a list of candidates that you might be interested in:
${ .pets | map("-\(.name)") | join("\n") }
Please do not hesitate to contact us at info@fake.petstore.com if your have questions.
Hope to hear from you soon!
----------------------------------------------------------------------------------------------
DO NOT REPLY
----------------------------------------------------------------------------------------------Task
A task within a workflow represents a discrete unit of work that contributes to achieving the overall objectives defined by the workflow.
It encapsulates a specific action or set of actions that need to be executed in a predefined order to advance the workflow towards its completion.
Tasks are designed to be modular and focused, each serving a distinct purpose within the broader context of the workflow.
By breaking down the workflow into manageable tasks, organizations can effectively coordinate and track progress, enabling efficient collaboration and ensuring that work is completed in a structured and organized manner.
The Open Workflow DSL defines a list of tasks that must be supported by all runtimes:
- Call, used to call services and/or functions.
- Do, used to define one or more subtasks to perform in sequence.
- Fork, used to define one or more subtasks to perform concurrently.
- Raise, used to raise an error and potentially fault the workflow.
- Run, used to run a Serverless container.
- Switch, used to dynamically select and execute one of multiple alternative paths based on specified conditions
- Set, used to dynamically set the data of the workflow during its execution.
- Try, used to attempt executing a specified task, and to handle any resulting errors gracefully, allowing the workflow to continue without interruption.
- Wait, used to pause or wait for a specified duration before proceeding to the next task.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
if | string | no | A runtime expression used to determine whether the task should be run, if any. The task is considered skipped if not run, and the raw task input becomes the task output. The expression is evaluated against the raw task input before any other expression of the task. |
input | input | no | An object used to customize the task input and to document its schema, if any. |
output | output | no | An object used to customize the task output and to document its schema, if any. |
export | export | no | An object used to customize the content of the workflow context. |
timeout | string timeout | no | The configuration of the task timeout, if any. If a string, must be the name of a timeout defined in the reusable components of the workflow. |
then | flowDirective | no | The flow directive to execute next. If not set, defaults to continue. |
metadata | map | no | Additional information about the task. |
Call
Enables the execution of a specified function within a workflow, allowing seamless integration with custom business logic or external services.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
call | string | yes | The name of the function to call. |
with | map | no | A name/value mapping of the parameters to call the function with. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: call-example
version: '0.1.0'
do:
- getPet:
call: http
with:
method: get
endpoint: https://petstore.swagger.io/v2/pet/{petId}Open Workflow Specification defines several default functions that must be supported by all implementations and runtimes:
HTTP Call
The HTTP Call lets you call any external service over HTTP.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
method | string | yes | The HTTP request method. |
endpoint | string|endpoint | yes | An URI or object that describes the HTTP endpoint to call. |
headers | map | no | A name/value mapping of the HTTP headers to use, if any. |
body | any | no | The HTTP request body, if any. |
query | map[string, any] | no | A name/value mapping of the query parameters to use, if any. |
output | string | no | The output format of the HTTP call. Supported values are: - content: output the content of the HTTP response, possibly deserialized.- raw: output the base-64 encoded HTTP response content, if any.- response: output the HTTP response.Defaults to content. |
redirect | boolean | no | Specifies whether to include or exclude status codes 300–399 from the error range.- If set to true, runtimes raise an error for status codes outside the 200–399 range.- If set to false, runtimes raise an error for response status codes outside the 200–299 range.Defaults to false. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: http-example
version: '0.1.0'
do:
- getPet:
call: http
with:
method: get
endpoint: https://petstore.swagger.io/v2/pet/{petId}Serverless-Job Call (exclusive to Data Orchestrator)
The Scaleway Serverless Job Call lets you run recurring and autonomous tasks in the cloud.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The ID of the Scaleway serverless job. |
region | string | yes | The region of the Scaleway serverless job. Supported values: fr-par, nl-ams, pl-waw. |
startupCommand | string[] | no | The command to execute on the Scaleway Serverless Job. |
args | string[] | no | Arguments to pass to the command. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: mcp-example
version: '0.1.0'
do:
- pushDataOnS3:
call: "serverless_job"
with:
id: "0dbc8c9f-e6f2-4dd5-88e0-a4b7a4743f02"
region: "fr-par"
startupCommand:
- "sh"
- "-c"
args:
- "echo 'print from workflow args'"Serverless-Function Call (exclusive to Data Orchestrator)
The Scaleway Serverless Function Call lets you call the default endpoint of a Serverless Function.
Instead of using an HTTP endpoint (with potential authentication), you provide the function identifier (id) and the region (region) to invoke the function. The call handles authentication automatically.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The ID of the Serverless Function. |
region | string | yes | The region where the Serverless Function is deployed. Supported values: fr-par, nl-ams, pl-waw. |
method | string | yes | The HTTP request method. |
headers | map | no | A name/value mapping of the HTTP headers to use, if any. |
body | any | no | The HTTP request body, if any. |
query | map[string, any] | no | A name/value mapping of the query parameters to use, if any. |
output | string | no | The output format of the HTTP call. Supported values are: - content: output the content of the HTTP response, possibly deserialized.- raw: output the base-64 encoded HTTP response content, if any.- response: output the HTTP response.Defaults to content. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: function-example
version: '0.1.0'
do:
- WeCallOurAwesomeServerlessFunction:
call: "serverless_function"
with:
method: GET
id: "c351de27-d595-44eb-8e4c-2f3d660baff8"
region: "fr-par"
output: "response"Serverless-Container Call (exclusive to Data Orchestrator)
The Scaleway Serverless Container Call lets you call the default endpoint of a Serverless Container.
Instead of using an HTTP endpoint (with potential authentication), you provide the container identifier (containerId) - or the container name (name) together with the namespace identifier (namespaceName or namespaceId) - and region (region) to invoke the container. The call handles authentication automatically.
Properties
| Property name | Type | Required | Description | |
|---|---|---|---|---|
containerId | string | no | The ID of the Serverless Container. Required if name is not set. | |
name | string | no | The name of the Serverless Container. Required if containerId is not set. | |
namespaceId | string | no | The ID of the Serverless Container namespace. Required if both containerId and namespaceName are not set. | |
namespaceName | string | no | The name of the Serverless Container namespace. Required if both containerId and namespaceId are not set. | |
region | string | yes | The Scaleway region where the container is deployed. Supported values: fr-par, nl-ams, pl-waw, it-mil. | |
method | string | yes | The HTTP request method. | |
headers | map | no | A name/value mapping of the HTTP headers to use, if any. | |
body | any | no | The HTTP request body, if any. | |
query | map[string, any] | no | A name/value mapping of the query parameters to use, if any. | |
output | string | no | The output format of the HTTP call. Supported values are: - content: output the content of the HTTP response, possibly deserialized.- raw: output the base-64 encoded HTTP response content, if any.- response: output the HTTP response.Defaults to content. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: call-container-example
version: '0.1.0'
do:
- WeCallOurAwesomeServerlessContainer:
call: "serverless_container"
with:
method: GET
name: "mycontainer"
namespaceId: "a351de27-d596-33eb-8e4c-2f3d120baff8"
region: "fr-par"
output: "response"Do
Serves as a fundamental building block within workflows, enabling the sequential execution of multiple subtasks. By defining a series of subtasks to perform in sequence, the Do task facilitates the efficient execution of complex operations, ensuring that each subtask is completed before the next one begins.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
do | map[string, task] | yes | The tasks to perform sequentially. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: do-example
version: '0.1.0'
use:
authentications:
fake-booking-agency-oauth2:
oauth2:
authority: https://fake-booking-agency.com
grant: client_credentials
client:
id: serverless-workflow-runtime
secret: secret0123456789
do:
- bookHotel:
call: http
with:
method: post
endpoint:
uri: https://fake-booking-agency.com/hotels/book
authentication:
use: fake-booking-agency-oauth2
body:
name: Four Seasons
city: Antwerp
country: Belgium
- bookFlight:
call: http
with:
method: post
endpoint:
uri: https://fake-booking-agency.com/flights/book
authentication:
use: fake-booking-agency-oauth2
body:
departure:
date: '01/01/26'
time: '07:25:00'
from:
airport: BRU
city: Zaventem
country: Belgium
arrival:
date: '01/01/26'
time: '11:12:00'
to:
airport: LIS
city: Lisbon
country: PortugalFork
A Fork task lets you run multiple tasks at the same time in their respective branches.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
branches | map[string, task] | no | The tasks to perform concurrently. |
compete | boolean | no | - If false (default), returns an array of outputs from all branches, in declaration order. - If true, only the branches following the first task to complete successfully will continue running. All other competing tasks are terminated whether they succeed or not. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: fork-example
version: '0.1.0'
do:
- raiseAlarm:
fork:
compete: true
branches:
- callNurse:
call: http
with:
method: put
endpoint: https://fake-hospital.com/api/v3/alert/nurses
body:
patientId: ${ .patient.fullName }
room: ${ .room.number }
- callDoctor:
call: http
with:
method: put
endpoint: https://fake-hospital.com/api/v3/alert/doctor
body:
patientId: ${ .patient.fullName }
room: ${ .room.number }Raise
Intentionally triggers and propagates errors. By employing the Raise task, workflows can deliberately generate error conditions, allowing for explicit error handling and fault management strategies to be implemented.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
error | string error | yes | Defines the error to raise. If a string, must be the name of an error defined in the reusable components of the workflow. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: raise-example
version: '0.1.0'
do:
- processTicket:
switch:
- highPriority:
when: .ticket.priority == "high"
then: escalateToManager
- mediumPriority:
when: .ticket.priority == "medium"
then: assignToSpecialist
- lowPriority:
when: .ticket.priority == "low"
then: resolveTicket
- default:
then: raiseUndefinedPriorityError
- raiseUndefinedPriorityError:
raise:
error:
type: https://fake.com/errors/tickets/undefined-priority
status: 400
instance: /raiseUndefinedPriorityError
title: Undefined Priority
- escalateToManager:
call: http
with:
method: post
endpoint: https://fake-ticketing-system.com/tickets/escalate
body:
ticketId: ${ .ticket.id }
- assignToSpecialist:
call: http
with:
method: post
endpoint: https://fake-ticketing-system.com/tickets/assign
body:
ticketId: ${ .ticket.id }
- resolveTicket:
call: http
with:
method: post
endpoint: https://fake-ticketing-system.com/tickets/resolve
body:
ticketId: ${ .ticket.id }Run
Provides the capability to execute external Scaleway Serverless Containers.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
serverless_container | serverless_container | yes | The definition of the Scaleway Serverless Container to run. |
await | boolean | no | Determines whether the process to run should be awaited for. When set to false, the task cannot wait for the process to complete and thus cannot output the result. In this case, it should simply output its transformed input.Defaults to true. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: run-example
version: '0.1.0'
do:
- deployServerlessContainer:
run:
serverless_container:
action: deploy
name: my-api-container
namespaceName: production
region: fr-par
imageUrl: rg.fr-par.scw.cloud/my-registry/api:v2.1.0
port: 8080
minScale: 2
maxScale: 10
environmentVariables:
LOG_LEVEL: info
API_VERSION: v2
secretEnvironmentVariables:
DB_PASSWORD: 11111111-1111-1111-1111-111111111111
scalingOption:
ConcurrentRequestsThreshold: 100
- getServerlessContainer:
run:
serverless_container:
action: get
name: my-api-container
namespaceName: production
region: fr-par
await: false
- deleteServerlessContainer:
run:
serverless_container:
action: delete
name: old-container
namespaceName: staging
region: fr-parServerless Container Run (exclusive to Data Orchestrator)
The Scaleway Serverless Container Run allows you to deploy, manage, and delete Scaleway Serverless Containers directly from your workflows.
Instead of manually managing container infrastructure, run: serverless_container provides a declarative way to:
- Deploy containers with automatic scaling and configuration
- Get container status and information
- Delete containers when they are no longer needed
The task handles authentication, provisioning, and lifecycle management automatically.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
action | string | yes | The action to perform on the Serverless Container. Supported values are: - deploy: Deploys a container- get: Retrieves container information- delete: Deletes a container. |
name | string | no | The name of the Serverless Container. Required for deploy action and else required if containedId not set. |
namespaceId | string | no | The ID of the Serverless Container namespace. Required if namespaceName is not set. |
namespaceName | string | no | The name of the Serverless Container namespace. Required if namespaceId is not set. |
containerId | string | no | The ID of an existing Serverless Container. Forbidden if action is deploy. Required if name not set. |
region | string | yes | The Scaleway region where the container is deployed. Supported values: fr-par, nl-ams, pl-waw. |
imageUrl | string | no | The URL of the container image to deploy. Required when action is deploy and scalewayRegistryImage is not set.Format: registry.region.scw.cloud/namespace/image:tag. |
scalewayRegistryImage | ScalewayRegistryImage | no | Alternative to imageUrl for specifying container images from Scaleway Container Registry.Required when action is deploy, and imageUrl is not set. |
port | uint32 | no | The port exposed by the container. Required when action is deploy. |
minScale | uint32 | no | The minimum number of container instances. Required when action is deploy. |
maxScale | uint32 | no | The maximum number of container instances. Required when action is deploy. |
description | string | no | A human-readable description of the container. |
environmentVariables | map[string, string] | no | A key/value mapping of environment variables to inject into the container. |
secretEnvironmentVariables | map[string, string] | no | A key/value mapping of secrets to inject as environment variables. Format: { "SECRET_NAME": "secret-id-or-name" }. |
scalingOption | ServerlessContainerScalingOption | no | Configuration for automatic scaling based on metrics. |
cpuLimit | uint32 | no | The CPU limit in mVPCU. |
memoryLimitBytes | uint64 | no | The memory limit in MB. |
timeout | int64 | no | The request timeout in seconds. |
privacy | string | no | Container privacy setting. Supported values: public, privateDefaults to private. |
protocol | string | no | The HTTP protocol version. Supported values: http1, h2cDefaults to http1. |
httpsConnectionsOnly | bool | no | Forces HTTPS connections only. Defaults to true. |
sandbox | string | no | The sandbox runtime version. Supported values: v1, v2Defaults to v2. |
command | string[] | no | The command to execute in the container. |
args | string[] | no | Arguments to pass to the command. |
tags | string[] | no | A list of tags to associate with the container. |
privateNetworkId | string | no | The ID of the private network to attach the container to. |
localStorageLimitBytes | uint64 | no | The local storage limit in bytes. |
mvcpuLimit | uint32 | no | The virtual CPU limit in milli-cores. |
livenessProbe | ServerlessContainerProbe | no | Configuration for the liveness probe. |
startupProbe | ServerlessContainerProbe | no | Configuration for the startup probe. |
ignoreErrors | ServerlessContainerIgnoreErrors | no | Configuration for ignoring specific errors. |
await | boolean | no | Determines whether to wait for the operation to complete. When set to false, the task returns immediately.Defaults to true. |
Serverless Container Scaling Option
| Property name | Type | Required | Description |
|---|---|---|---|
ScalingRule | string | yes | The scaling rule to apply. Supported values: ConcurrentRequestsThreshold, CpuUsageThreshold, MemoryUsageThreshold |
ScalingValue | uint32 | yes | The threshold value that triggers scaling. |
Serverless Container Probe
| Property name | Type | Required | Description |
|---|---|---|---|
failureThreshold | uint32 | yes | Number of consecutive failures before considering the probe failed. |
interval | string | yes | Duration between probe attempts (e.g., 10s). |
timeout | string | yes | Timeout for each probe attempt (e.g., 5s). |
healthCheckProbe | string | yes | Type of health check probe. Supported values: http, tcp. |
pathProbeHttp | string | no | HTTP path for health check. Required when healthCheckProbe is http. |
Serverless Container Ignore Errors
| Property name | Type | Required | Description |
|---|---|---|---|
onDeploy | ServerlessContainerIgnoreDeployErrors | no | Configuration for ignoring deploy errors. |
onDelete | ServerlessContainerIgnoreDeleteErrors | no | Configuration for ignoring delete errors. |
Scaleway Registry Image
Alternative to imageUrl for specifying container images from Scaleway Container Registry.
| Property name | Type | Required | Description |
|---|---|---|---|
registryNamespace | string | yes | The name of the Container Registry namespace. |
registryRegion | string | yes | The region where the registry is located. |
image | string | yes | The name of the container image. |
tag | string | yes | The image tag to deploy. |
Serverless Container Ignore Deploy Errors
| Property name | Type | Required | Description |
|---|---|---|---|
alreadyExists | bool | yes | Ignore "container already exists" errors. |
Serverless Container Ignore Delete Errors
| Property name | Type | Required | Description |
|---|---|---|---|
notExists | bool | yes | Ignore "container not found" errors. |
Examples
document:
dsl: '1.0.3'
namespace: examples
name: serverless-container-deploy
version: '1.0.0'
do:
- deployMyContainer:
run:
serverless_container:
action: deploy
name: my-api
namespaceName: production
region: fr-par
imageUrl: rg.fr-par.scw.cloud/my-registry/api:v2.1.0
# OR use Scaleway Registry:
# scalewayRegistryImage:
# registryNamespace: my-registry
# registryRegion: fr-par
# image: api
# tag: v2.1.0
port: 8080
minScale: 2
maxScale: 10
cpuLimit: 2000
memoryLimitBytes: 2147483648
environmentVariables:
LOG_LEVEL: info
API_VERSION: v2
secretEnvironmentVariables:
DB_PASSWORD: 11111111-1111-1111-1111-111111111111
API_KEY: 22222222-2222-2222-2222-222222222222
scalingOption:
ScalingRule: ConcurrentRequestsThreshold
ScalingValue: 100
livenessProbe:
failureThreshold: 3
interval: 10s
timeout: 5s
healthCheckProbe: http
pathProbeHttp: /healthdocument:
dsl: '1.0.3'
namespace: examples
name: serverless-container-get
version: '1.0.0'
do:
- getContainerStatus:
run:
serverless_container:
action: get
name: my-api
namespaceName: production
region: fr-par
await: falsedocument:
dsl: '1.0.3'
namespace: examples
name: serverless-container-delete
version: '1.0.0'
do:
- deleteOldContainer:
run:
serverless_container:
action: delete
name: old-api
namespaceName: staging
region: fr-par
ignoreErrors:
onDelete:
notExists: trueSet
A task used to set data.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
set | map string | yes | The data to set. Can be an object or a direct runtime expression. |
Examples
document:
dsl: '1.0.3'
namespace: default
name: set-example
version: '0.1.0'
do:
- setShape:
set:
shape: circle
size: ${ .configuration.size }
fill: ${ .configuration.fill }
- setColor:
set: ${ .configuration.color }Switch
Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
switch | case[] | yes | A name/value map of the cases to switch on. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: switch-example
version: '0.1.0'
do:
- processOrder:
switch:
- case1:
when: .orderType == "electronic"
then: processElectronicOrder
- case2:
when: .orderType == "physical"
then: processPhysicalOrder
- default:
then: handleUnknownOrderType
- processElectronicOrder:
do:
- validatePayment:
call: http
with:
method: post
endpoint: https://fake-payment-service.com/validate
- fulfillOrder:
call: http
with:
method: post
endpoint: https://fake-fulfillment-service.com/fulfill
then: exit
- processPhysicalOrder:
do:
- checkInventory:
call: http
with:
method: get
endpoint: https://fake-inventory-service.com/inventory
- packItems:
call: http
with:
method: post
endpoint: https://fake-packaging-service.com/pack
- scheduleShipping:
call: http
with:
method: post
endpoint: https://fake-shipping-service.com/schedule
then: exit
- handleUnknownOrderType:
do:
- logWarning:
call: http
with:
method: post
endpoint: https://fake-logging-service.com/warn
- notifyAdmin:
call: http
with:
method: post
endpoint: https://fake-notification-service.com/notifySwitch Case
A switch case defines a condition to evaluate and an action to execute when that condition is met.
| Property name | Type | Required | Description |
|---|---|---|---|
when | string | no | A runtime expression used to determine whether the case matches. If not set, the case will be matched by default if no other case matches. There can be only one default case, all others must set a condition. |
then | flowDirective | yes | The flow directive to execute when the case matches. |
Try
A Try-catch task lets you handle known error types, such as authentication, authorization, and timeout. You can retry a failed task a set number of times before falling back to an alternative task if it keeps failing.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
try | map[string, task] | yes | The task(s) to perform. |
catch | catch | yes | The errors to catch and how to handle them. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: try-example
version: '0.1.0'
do:
- trySomething:
try:
- invalidHttpCall:
call: http
with:
method: get
endpoint: https://
catch:
errors:
with:
type: https://open-workflow-specification.org/dsl/errors/types/communication
status: 503
as: error
retry:
delay:
seconds: 3
backoff:
exponential: {}
limit:
attempt:
count: 5Catch
Defines the configuration of a catch clause, which a concept used to catch errors.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
errors | errorFilter | no | The definition of the errors to catch. |
as | string | no | The name of the runtime expression variable to save the error as. Defaults to error. |
when | string | no | A runtime expression used to determine whether to catch the filtered error. |
exceptWhen | string | no | A runtime expression used to determine whether to catch the filtered error. |
retry | string retryPolicy | no | The retry policy to use, if any, when catching errors. If a string, must be the name of a retry policy defined in the reusable components of the workflow. |
do | map[string, task] | no | The definition of the task(s) to run when catching an error. |
then | flowDirective | no | The flow directive to execute for the error path after the error has been caught (and after executing any do tasks, if set). This determines the next transition for the catch path (overriding the try task normal completion flow). |
Wait
Allows workflows to pause or delay their execution for a specified period of time.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
wait | string duration | yes | The amount of time to wait. If a string, must be a valid ISO 8601 duration expression. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: wait-example
version: '0.1.0'
do:
- waitAWhile:
wait:
seconds: 10Flow Directive
Flow Directives are commands within a workflow that dictate its progression.
| Flow directive | Description |
|---|---|
continue | Instructs the workflow to proceed with the next task in line. This may conclude the execution of a workflow or branch if there is no task defined after the continue. |
end | Concludes the workflow execution and signal its completion with a succeeded status. |
exit | Completes the current parent do execution. This may conclude the execution of a workflow or branch if there is no task defined after the parent do scope. |
| string | Continues the workflow at the task with the specified name. |
task | Redirects to a task declared within the scope. |
Authentication
Defines the mechanism used to authenticate users and workflows attempting to access a service or a resource.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
use | string | no | The name of the top-level authentication definition to use. Cannot be used by authentication definitions defined at top level. |
basic | basicAuthentication | no | The basic authentication scheme to use, if any.Required if no other property has been set, otherwise ignored. |
bearer | bearerAuthentication | no | The bearer authentication scheme to use, if any.Required if no other property has been set, otherwise ignored. |
digest | digestAuthentication | no | The digest authentication scheme to use, if any.Required if no other property has been set, otherwise ignored. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: authentication-example
version: '0.1.0'
use:
secrets:
- usernamePasswordSecret
authentications:
sampleBasicFromSecret:
basic:
use: usernamePasswordSecret
do:
- sampleTask:
call: http
with:
method: get
endpoint:
uri: https://secured.fake.com/sample
authentication:
use: sampleBasicFromSecretBasic Authentication
Defines the fundamentals of a basic authentication.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
username | string | yes | The username to use. |
password | string | yes | The password to use. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: basic-authentication-example
version: '0.1.0'
use:
authentications:
sampleBasic:
basic:
username: admin
password: password123
do:
- sampleTask:
call: http
with:
method: get
endpoint:
uri: https://secured.fake.com/sample
authentication:
use: sampleBasicBearer Authentication
Defines the fundamentals of a bearer authentication.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
token | string | yes | The bearer token to use. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: bearer-authentication-example
version: '0.1.0'
do:
- sampleTask:
call: http
with:
method: get
endpoint:
uri: https://secured.fake.com/sample
authentication:
bearer:
token: ${ .user.token }Digest Authentication
Defines the fundamentals of a digest authentication.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
username | string | yes | The username to use. |
password | string | yes | The password to use. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: digest-authentication-example
version: '0.1.0'
use:
authentications:
sampleDigest:
digest:
username: admin
password: password123
do:
- sampleTask:
call: http
with:
method: get
endpoint:
uri: https://secured.fake.com/sample
authentication:
use: sampleDigestError
Defines the Problem Details RFC compliant description of an error.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
type | uri-template | yes | A URI reference that identifies the error type. For cross-compatibility concerns, it is recommended to use Standard Error Types whenever possible. Runtimes must ensure that the property has been set when raising or escalating the error. |
status | integer | yes | The status code generated by the origin for this occurrence of the error. For cross-compatibility concerns, it is recommended to use HTTP Status Codes whenever possible. Runtimes must ensure that the property has been set when raising or escalating the error. |
instance | string | no | A JSON Pointer used to reference the component the error originates from. Runtimes must set the property when raising or escalating the error. Otherwise ignore. |
title | string | no | A short, human-readable summary of the error or a runtime expression |
detail | string | no | A human-readable explanation specific to this occurrence of the error or a runtime expression |
Examples
type: https://open-workflow-specification.org/spec/1.0.0/errors/communication
title: Service Not Available
status: 503Standard Error Types
Standard error types serve the purpose of categorizing errors consistently across different runtimes, facilitating seamless migration from one runtime environment to another.
| Type | Status code¹ | Description |
|---|---|---|
| configuration | 400 | Errors resulting from incorrect or invalid configuration settings, such as missing or misconfigured environment variables, incorrect parameter values, or configuration file errors. |
| validation | 400 | Errors arising from validation processes, such as validation of input data, schema validation failures, or validation constraints not being met. These errors indicate that the provided data or configuration does not adhere to the expected format or requirements specified by the workflow. |
| expression | 400 | Errors occurring during the evaluation of runtime expressions, such as invalid syntax or unsupported operations. |
| authentication | 401 | Errors related to authentication failures. |
| authorization | 403 | Errors related to unauthorized access attempts or insufficient permissions to perform certain actions within the workflow. |
| timeout | 408 | Errors caused by timeouts during the execution of tasks or during interactions with external services. |
| communication | 500 | Errors encountered while communicating with external services, including network errors, service unavailable, or invalid responses. |
| runtime | 500 | Errors occurring during the runtime execution of a workflow, including unexpected exceptions, errors related to resource allocation, or failures in handling workflow tasks. These errors typically occur during the actual execution of workflow components and may require runtime-specific handling and resolution strategies. |
¹ Default value. The status code that best describe the error should always be used.
Retry
The Retry is used to define the strategy for retrying a failed task when an error is encountered during execution. This policy provides developers with control over how and when to retry failed tasks, enabling robust error handling and fault tolerance within workflows.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
when | string | no | A a runtime expression used to determine whether to retry running the task, in a given context. |
exceptWhen | string | no | A runtime expression used to determine whether to retry running the task, in a given context. |
delay | duration | no | The duration, if any, to wait between retry attempts. |
limit | retry | no | The limits, if any, to impose to the retry policy. |
backoff | backoff | no | The backoff strategy to use, if any. |
jitter | jitter | no | The parameters, if any, that control the randomness or variability of the delay between retry attempts. |
Retry Limit
The definition of a retry policy.
| Property name | Type | Required | Description |
|---|---|---|---|
attempt.count | integer | no | The maximum attempts count. |
attempt.duration | duration | no | The duration limit, if any, for all retry attempts. |
duration | duration | no | The maximum duration, if any, during which to retry a given task. |
Backoff
The definition of a retry backoff strategy.
| Property name | Type | Required | Description |
|---|---|---|---|
constant | object | no | The definition of the constant backoff to use, if any. Required if exponential and linear are not set, otherwise ignored. |
exponential | object | no | The definition of the exponential backoff to use, if any. Required if constant and linear are not set, otherwise ignored. |
linear | object | no | The definition of the linear backoff to use, if any. Required if constant and exponential are not set, otherwise ignored. |
Jitter
Represents the definition of the parameters that control the randomness or variability of a delay, typically between retry attempts.
| Property name | Type | Required | Description |
|---|---|---|---|
from | duration | yes | The minimum duration of the jitter range. |
to | duration | yes | The maximum duration of the jitter range. |
Input
Documents the structure - and optionally configures the transformation of - workflow/task input data.
It is 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.
When set, runtimes must validate raw input data against the defined schema before applying transformations, unless defined otherwise.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
schema | schema | no | The schema used to describe and validate raw input data. Even though the schema is not required, it is strongly encouraged to document it, whenever feasible. |
from | string object | no | A runtime expression, if any, used to filter and/or mutate the workflow/task input. |
Examples
schema:
format: json
document:
type: object
properties:
order:
type: object
required: [ pet ]
properties:
pet:
type: object
required: [ id ]
properties:
id:
type: string
from: .order.petOutput
Documents the structure - and optionally configures the transformations of - workflow/task output data.
It is 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.
When set, runtimes must validate output data against the defined schema after applying transformations, unless defined otherwise.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
schema | schema | no | The schema used to describe and validate output data. Even though the schema is not required, it is strongly encouraged to document it, whenever feasible. |
as | string object | no | A runtime expression, if any, used to filter and/or mutate the workflow/task output. |
Examples
output:
schema:
format: json
document:
type: object
properties:
petId:
type: string
required: [ petId ]
as:
petId: '${ .pet.id }'Export
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.
Optionally, the context might have an associated schema which is validated against the result of the expression.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
schema | schema | no | The schema used to describe and validate context. Included to handle the case in which the context has a known format. |
as | string object | no | A runtime expression, if any, used to export the output data to the context. |
Examples
Merge the task output into the current context.
as: '$context+.'Replace the context with the task output.
as: '.'Schema
Describes a data schema.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
format | string | yes | The schema format. Supported values are: - json, which indicates the JsonSchema format. |
document | object | no | The inline schema document. Required if resource has not been set, otherwise ignored. |
Examples
Example of an inline JsonSchema:
format: json
document:
type: object
properties:
id:
type: string
firstName:
type: string
lastName:
type: string
required: [ id, firstName, lastName ]Example of a JsonSchema based on an external resource:
format: json
resource:
endpoint: https://test.com/fake/schema/json/document.jsonTimeout
Defines a workflow or task timeout.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
after | duration | yes | The duration after which the workflow or task times out. |
Examples
document:
dsl: '1.0.3'
namespace: default
name: timeout-example
version: '0.1.0'
do:
- waitAMinute:
wait:
seconds: 60
timeout:
after:
seconds: 30Duration
Defines a duration. Durations can be defined through properties, with an ISO 8601 string or with a runtime expression that is evaluated to an ISO 8601 string.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
days | integer | no | Number of days, if any. |
hours | integer | no | Number of hours, if any. |
minutes | integer | no | Number of minutes, if any. |
seconds | integer | no | Number of seconds, if any. |
milliseconds | integer | no | Number of milliseconds, if any. |
Examples
Example of a duration of 2 hours, 15 minutes and 30 seconds:
hours: 2
minutes: 15
seconds: 30Endpoint
Describes an endpoint.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
uri | string | yes | The endpoint URI. |
authentication | authentication | no | The authentication policy to use. |
HTTP Response
Describes an HTTP response.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
request | request | yes | The HTTP request associated with the HTTP response. |
statusCode | integer | yes | The HTTP response status code. |
headers | map[string, string] | no | The HTTP response headers, if any. |
content | any | no | The HTTP response content, if any. It can contain the deserialized response content or the base-64 encoded response content. |
Examples
request:
method: get
uri: https://petstore.swagger.io/v2/pet/1
headers:
Content-Type: application/json
headers:
Content-Type: application/json
statusCode: 200
content:
id: 1
name: milou
status: pendingHTTP Request
Describes an HTTP request.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
method | string | yes | The request method. |
uri | uri | yes | The request URI. |
headers | map[string, string] | no | The HTTP request headers, if any. |
Examples
method: get
uri: https://petstore.swagger.io/v2/pet/1
headers:
Content-Type: application/jsonURI Template
The DSL has limited support for URI template syntax as defined by RFC 6570. Specifically, only the Simple String Expansion is supported, which allows authors to embed variables in a URI.
URI-typed string fields that use the schema uriTemplate type accept URI-references as defined by RFC 3986, meaning both absolute URIs (e.g., https://example.com/path) and relative references (e.g., openapi/petstore.json, /api/v1/users) are accepted. In the JSON Schema, both LiteralUri and LiteralUriTemplate are validated using the RFC 3986 Appendix B URI-reference regex (with an extra guard to avoid matching runtime expressions).
To substitute a variable within a URI, use the {} syntax. The identifier inside the curly braces will be replaced with its value during runtime evaluation. If no value is found for the identifier, an empty string will be used.
This has the following limitations compared to runtime expressions:
- Only top-level properties can be interpolated within strings, thus identifiers are treated verbatim. This means that
{pet.id}will be replaced with the value of the"pet.id"property, not the value of theidproperty of thepetproperty. - The referenced variable must be of type
string,number,boolean, ornull. If the variable is of a different type an error with typehttps://open-workflow-specification.org/spec/1.0.0/errors/expressionand status400will be raised. - Runtime expression arguments are not available for string substitution.
Examples
uri: https://petstore.swagger.io/v2/pet/{petId}Container Lifetime
Configures the lifetime of a container.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
cleanup | string | yes | The cleanup policy to use. Supported values are: - always: the container is deleted immediately after execution.- never: the runtime should never delete the container.- eventually: the container is deleted after a configured amount of time after its execution.Defaults to never. |
after | duration | no | The duration, if any, after which to delete the container once executed. Required if cleanup has been set to eventually, otherwise ignored. |
Process Result
Describes the result of a process.
Properties
| Property name | Type | Required | Description |
|---|---|---|---|
code | integer | yes | The process exit code. |
stdout | string | yes | The process STDOUT output. |
stderr | string | yes | The process STDERR output. |
Examples
document:
dsl: '1.0.3'
namespace: test
name: run-container-example
version: '0.1.0'
do:
- runContainer:
run:
container:
image: fake-image
lifetime:
cleanup: eventually
after:
minutes: 30
return: stderr
- runScript:
run:
script:
language: js
code: >
Some cool multiline script
return: code
- runShell:
run:
shell:
command: 'echo "Hello, ${ .user.name }"'
return: all
- runWorkflow:
run:
workflow:
namespace: another-one
name: do-stuff
version: '0.1.0'
input: {}
return: noneConcepts not implemented in Data Orchestrator
The following concepts are not supported in the current version:
- Schedule
- Call:
- AsyncAPI
- gRPC
- OpenAPI
- A2A
- MCP
- Emit
- For
- Listen
- Run:
- Container
- Script
- Shell
- Workflow
- Lifecycle events
- External resources
- Authentication:
- OAuth2
- OpenIDConnect
- Catalog
- Extension
- Event Consumption Strategy
- Event Filter
- Event Properties
- AsyncAPI Outbound Message
- AsyncAPI Server
- AsyncAPI Subscription
- Workflow Definition Reference
- Subscription Iterator