diff --git a/.gherkin-lintrc b/.gherkin-lintrc
new file mode 100644
index 00000000..9e26dfee
--- /dev/null
+++ b/.gherkin-lintrc
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/.markdownlint.yaml b/.markdownlint.yaml
index ee4a52fc..f6aa43a8 100644
--- a/.markdownlint.yaml
+++ b/.markdownlint.yaml
@@ -11,13 +11,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
+---
{
"default": true,
- "MD024": { "allow_different_nesting": true },
+ "MD024": { "siblings_only": true },
"MD029": { "style": "ordered" },
- "ul-style": false, # MD004
- "line-length": false, # MD013
- "no-inline-html": false, # MD033
- "fenced-code-language": false # MD040
+ "ul-style": false, # MD004
+ "line-length": false, # MD013
+ "no-inline-html": false, # MD033
+ "fenced-code-language": false, # MD040
}
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 00000000..155f98e7
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,3 @@
+{
+ "recommendations": ["davidanson.vscode-markdownlint", "redhat.vscode-yaml"]
+}
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
index d1289e8e..81c39de6 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,12 +1,22 @@
{
"rewrap.wrappingColumn": 80,
"editor.rulers": [80],
- "markdownlint.config": {
- "MD004": false,
- "MD013": false,
- "MD024": {"allow_different_nesting": true},
- "MD029": {"style": "ordered"},
- "MD033": false,
- "MD040": false,
+ "yaml.format.singleQuote": false,
+ "yaml.format.proseWrap": "always",
+ "yaml.format.bracketSpacing": true,
+ "yaml.format.enable": true,
+ "[yaml]": {
+ "editor.defaultFormatter": "redhat.vscode-yaml"
+ },
+ "[markdown]": {
+ "editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
-}
+ "markdownlint.config": {
+ "MD004": false,
+ "MD013": false,
+ "MD024": { "siblings_only": true },
+ "MD029": { "style": "ordered" },
+ "MD033": false,
+ "MD040": false
+ }
+ }
\ No newline at end of file
diff --git a/.yamllint.yaml b/.yamllint.yaml
new file mode 100644
index 00000000..3dd2f110
--- /dev/null
+++ b/.yamllint.yaml
@@ -0,0 +1,9 @@
+---
+extends: default
+
+rules:
+ comments:
+ min-spaces-from-content: 1
+ braces:
+ min-spaces-inside: 1
+ max-spaces-inside: 1
\ No newline at end of file
diff --git a/GOVERNANCE.md b/GOVERNANCE.md
index 53acfa15..f958ddb8 100644
--- a/GOVERNANCE.md
+++ b/GOVERNANCE.md
@@ -5,17 +5,17 @@ As a CNCF member project, we abide by the [CNCF Code of Conduct](https://github.
For specific guidance on practical contribution steps for any Serverless Workflow sub-project please
see our [contributing guide](contributing.md).
-You can contact the project maintainers at any time by sending an email to the
+You can contact the project maintainers at any time by sending an email to the
[Serverless Workflow Specification Maintainers](mailto:cncf-serverlessws-maintainers@lists.cncf.io)
- mailing list.
+mailing list.
## Maintainership
Main responsibilities of maintainers include:
-1) Sharing responsibility for the project's success.
-2) Making a long-term, recurring time investment to improve the project.
-3) Performing necessary tasks, even if they are not the most interesting or fun.
+1. Sharing responsibility for the project's success.
+2. Making a long-term, recurring time investment to improve the project.
+3. Performing necessary tasks, even if they are not the most interesting or fun.
## Reviewers
@@ -26,9 +26,9 @@ Their pull request approvals are needed to merge code changes into the project.
Emeritus maintainers are retired maintainers who have provided valuable contributions to the project in the past but are not able to dedicate the time necessary to be fully active maintainers going forward. While their efforts will be focused elsewhere, it is hoped that they will try to find the time to continue to be active participants in the community by:
-1) Providing guidance and mentorship to current maintainers and contributors.
-2) Offering historical context and insights based on their past experiences.
-3) Participating in discussions and reviews on an advisory basis, without the obligations of active maintainers.
+1. Providing guidance and mentorship to current maintainers and contributors.
+2. Offering historical context and insights based on their past experiences.
+3. Participating in discussions and reviews on an advisory basis, without the obligations of active maintainers.
## Adding maintainers
@@ -100,8 +100,8 @@ by a pull request removing them.
Serverless Workflow is an open-source project with an open design philosophy. This means
that the repository is the source of truth for EVERY aspect of the project,
-including its philosophy, design, road map, and APIs. *If it's part of the
-project, it's in the repository. If it's in the repository, it's part of the project.*
+including its philosophy, design, road map, and APIs. _If it's part of the
+project, it's in the repository. If it's in the repository, it's part of the project._
As a result, all decisions can be expressed as changes to the repository. An
implementation change is a change to the source code. An API change is a change
@@ -115,12 +115,12 @@ the [discussion](discussions) tool.
All decisions affecting Serverless Workflow, big and small, follow the same 3 steps:
-* Step 1: Open a pull request. Anyone can do this.
+- Step 1: Open a pull request. Anyone can do this.
-* Step 2: Discuss the pull request. Anyone can do this.
+- Step 2: Discuss the pull request. Anyone can do this.
-* Step 3: Merge or refuse the pull request. Who does this depends on the nature
-of the pull request and which areas of the project it affects.
+- Step 3: Merge or refuse the pull request. Who does this depends on the nature
+ of the pull request and which areas of the project it affects.
## I'm a maintainer. Should I make pull requests too?
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
index 561e6ea1..bec44e2f 100644
--- a/MAINTAINERS.md
+++ b/MAINTAINERS.md
@@ -1,11 +1,13 @@
# Serverless Workflow Org Maintainers
-* [Charles d'Avernas](https://github.com/cdavernas)
-* [Ricardo Zanini](https://github.com/ricardozanini)
+- [Charles d'Avernas](https://github.com/cdavernas)
+- [Ricardo Zanini](https://github.com/ricardozanini)
# Serverless Workflow Org Emeritus Maintainers
-* [Antonio Mendoza Pérez](https://github.com/antmendoza)
-* [Tihomir Surdilovic](https://github.com/tsurdilo)
+
+- [Antonio Mendoza Pérez](https://github.com/antmendoza)
+- [Tihomir Surdilovic](https://github.com/tsurdilo)
# Maintainers Mailing list
+
[cncf-serverlessws-maintainers](mailto:cncf-serverlessws-maintainers@lists.cncf.io)
diff --git a/README.md b/README.md
index ed61db4c..c8b9213c 100644
--- a/README.md
+++ b/README.md
@@ -1,34 +1,35 @@
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-green.svg?style=flat)](https://github.com/serverlessworkflow/specification/issues)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/serverlessworkflow/specification/blob/master/LICENSE)
-[](https://cloud-native.slack.com/messages/serverless-workflow)
-[](https://serverlessworkflow.io/)
+[](https://cloud-native.slack.com/messages/serverless-workflow)
+[](https://serverlessworkflow.io/)
[](https://twitter.com/CNCFWorkflow)
## Table of Contents
- [About](#about)
- [Ecosystem](#ecosystem)
- + [DSL](dsl.md)
- + [CTK](/ctk/readme.md)
- + [SDKs](#sdks)
- + [Runtimes](#runtimes)
- + [Tooling](#Tooling)
- + [Landscape](#cncf-landscape)
+ - [DSL](dsl.md)
+ - [CTK](/ctk/readme.md)
+ - [SDKs](#sdks)
+ - [Runtimes](#runtimes)
+ - [Tooling](#Tooling)
+ - [Landscape](#cncf-landscape)
- [Documentation](#documentation)
- [Community](#community)
- + [Communication](#communication)
- + [Governance](#governance)
- + [Code of Conduct](#code-of-conduct)
- + [Weekly Meetings](#weekly-meetings)
-+ [Support](#support)
+ - [Communication](#communication)
+ - [Governance](#governance)
+ - [Code of Conduct](#code-of-conduct)
+ - [Weekly Meetings](#weekly-meetings)
+
+* [Support](#support)
- [Adoption](#adoption)
- [Sponsoring](#sponsoring)
## About
-Serverless Workflow presents a vendor-neutral, open-source, and entirely community-driven ecosystem tailored for defining and executing DSL-based workflows in the realm of Serverless technology.
+Serverless Workflow presents a vendor-neutral, open-source, and entirely community-driven ecosystem tailored for defining and executing DSL-based workflows in the realm of Serverless technology.
-The Serverless Workflow DSL is a high-level language that reshapes the terrain of workflow creation, boasting a design that is ubiquitous, intuitive, imperative, and fluent.
+The Serverless Workflow DSL is a high-level language that reshapes the terrain of workflow creation, boasting a design that is ubiquitous, intuitive, imperative, and fluent.
Bid farewell to convoluted coding and platform dependencies—now, crafting powerful workflows is effortlessly within reach for everyone!
@@ -50,7 +51,7 @@ Key features:
Serverless Workflow ecosystem is hosted by the [Cloud Native Computing Foundation (CNCF)](https://www.cncf.io/) and was approved as a
Cloud Native Sandbox level project on July 14, 2020.
-It encompasses a comprehensive suite of components and tools designed to facilitate the creation, management, and execution of serverless workflows.
+It encompasses a comprehensive suite of components and tools designed to facilitate the creation, management, and execution of serverless workflows.
1. **[DSL](dsl.md) (Domain Specific Language)**: The core of the ecosystem, defining the fundamental syntax and semantics of Serverless Workflow specifications.
@@ -82,10 +83,10 @@ No matter your preferred language, our SDKs provide the tools you need to levera
### Runtimes
-| Name | About |
-| --- | --- |
-| [Apache KIE SonataFlow](https://sonataflow.org) | Apache KIE SonataFlow is a tool for building cloud-native workflow applications. You can use it to do the services and events orchestration and choreography. |
-| [Synapse](https://github.com/serverlessworkflow/synapse) | Synapse is a scalable, cross-platform, fully customizable platform for managing and running Serverless Workflows. |
+| Name | About |
+| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [Apache KIE SonataFlow](https://sonataflow.org) | Apache KIE SonataFlow is a tool for building cloud-native workflow applications. You can use it to do the services and events orchestration and choreography. |
+| [Synapse](https://github.com/serverlessworkflow/synapse) | Synapse is a scalable, cross-platform, fully customizable platform for managing and running Serverless Workflows. |
### Tooling
@@ -106,6 +107,7 @@ It is a member project of the [CNCF Serverless Working Group](https://github.com
## Documentation
The documentation for Serverless Workflow includes:
+
- [**DSL**](dsl.md): Documents the fundamentals aspects and concepts of the Serverless Workflow DSL
- [**DSL Reference**](dsl-reference.md): References all the definitions used by the Serverless Workflow DSL
@@ -120,10 +122,10 @@ To learn how to contribute to the specification please refer to ['how to contrib
If you have any copyright questions when contributing to a CNCF project like this one,
reference the [Ownership of Copyrights in CNCF Project Contributions](https://github.com/cncf/foundation/blob/master/copyright-notices.md).
-
+
### Communication
-- Community Slack Channel: [https://slack.cncf.io/](https://slack.cncf.io/) - #serverless-workflow
+- Community Slack Channel: [https://slack.cncf.io/](https://slack.cncf.io/) - #serverless-workflow
- [Weekly project meetings](#weekly-meetings)
- Project Maintainers Email: [cncf-serverlessws-maintainers](mailto:cncf-serverlessws-maintainers@lists.cncf.io)
- Serverless WG Email: [cncf-wg-serverless](mailto:cncf-wg-serverless@lists.cncf.io)
@@ -131,11 +133,11 @@ reference the [Ownership of Copyrights in CNCF Project Contributions](https://gi
### Governance
-The Serverless Workflow Project Governance [document](governance.md) delineates the roles, procedures, and principles guiding the collaborative development and maintenance of the project.
+The Serverless Workflow Project Governance [document](governance.md) delineates the roles, procedures, and principles guiding the collaborative development and maintenance of the project.
It emphasizes adherence to the CNCF Code of Conduct, defines the responsibilities of maintainers, reviewers, and emeritus maintainers, outlines procedures for their addition and removal, and establishes guidelines for subprojects' inclusion and compliance.
-Decision-making processes are consensus-driven, facilitated through structured proposal and discussion mechanisms, with conflict resolution procedures prioritizing amicable resolution.
+Decision-making processes are consensus-driven, facilitated through structured proposal and discussion mechanisms, with conflict resolution procedures prioritizing amicable resolution.
Overall, the document reflects the project's commitment to transparency, accountability, and inclusive collaboration, fostering an environment conducive to sustained growth and innovation.
@@ -171,10 +173,10 @@ If you're using Serverless Workflow in your projects and would like to showcase
### Sponsoring
-As an open-source project, Serverless Workflow relies on the support of sponsors to sustain its development and growth.
+As an open-source project, Serverless Workflow relies on the support of sponsors to sustain its development and growth.
-By becoming a sponsor, you'll not only demonstrate your commitment to advancing serverless technologies but also gain visibility within our vibrant community.
+By becoming a sponsor, you'll not only demonstrate your commitment to advancing serverless technologies but also gain visibility within our vibrant community.
Sponsorship opportunities range from financial contributions to in-kind support, and every sponsorship makes a meaningful impact on the project's success and sustainability.
-Support our project by [becoming a Sponsor](https://crowdfunding.lfx.linuxfoundation.org/projects/serverless-workflow).
\ No newline at end of file
+Support our project by [becoming a Sponsor](https://crowdfunding.lfx.linuxfoundation.org/projects/serverless-workflow).
diff --git a/code-of-conduct.md b/code-of-conduct.md
index 97a8526a..d5320231 100644
--- a/code-of-conduct.md
+++ b/code-of-conduct.md
@@ -7,5 +7,6 @@ We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/mai
If your project isn't prepared to handle reports, remove the project email address and just have
reporters send to conduct@cncf.io.
-->
+
Please contact the [CNCF Code of Conduct Committee](mailto:conduct@cncf.io)
in order to report violations of the Code of Conduct.
diff --git a/community/README.md b/community/README.md
index 456e19b7..08489275 100644
--- a/community/README.md
+++ b/community/README.md
@@ -1,7 +1,7 @@
-# Community
+# Community
Here you can find information about our:
- [Contributors](contributors.md): People and companies contributing to the
Serverless workflow specification and ecosystem
-- [Presentations](https://serverlessworkflow.io/): Community presentations about the project (see the 'Resources' section)
\ No newline at end of file
+- [Presentations](https://serverlessworkflow.io/): Community presentations about the project (see the 'Resources' section)
diff --git a/community/contributors.md b/community/contributors.md
index 5fcaf6e4..2ddcc1ea 100644
--- a/community/contributors.md
+++ b/community/contributors.md
@@ -1,85 +1,102 @@
# Community Contributors
-This list acknowledges community contributors to the Serverless Workflow
-project.
+This list acknowledges community contributors to the Serverless Workflow
+project.
-We welcome everyone to join our community and contribute.
+We welcome everyone to join our community and contribute.
For more information on how, please reference the ['how to contribute'](../contributing.md) doc.
-We try to add every contributor here, but if for some reason we missed
-adding your name, feel free to add it via pull request to this document or let
+We try to add every contributor here, but if for some reason we missed
+adding your name, feel free to add it via pull request to this document or let
us know in chat or team meeting.
-* **Independent**
- * Louis Fourie
- * Achilleas Tzenetopoulos
- * Richard Gibson
- * Lucas Stocksmeier
-
-* **Accenture**
- * Mona Borham
+- **Independent**
+ - Louis Fourie
+ - Achilleas Tzenetopoulos
+ - Richard Gibson
+ - Lucas Stocksmeier
+- **Accenture**
-* **Camunda**
- * Mauricio Salatino
- * Falko Menge
+ - Mona Borham
-* **Chargebee**
- * Manickavasagam Sundaram
+- **Camunda**
-* **Fujitsu**
- * Naohiro Tamura
+ - Mauricio Salatino
+ - Falko Menge
-* **Google**
- * Evan Anderson
- * Rachael Myers
+- **Chargebee**
-* **Huawei**
- * Cathy Hong Zhang
- * Farhad Sunavala
+ - Manickavasagam Sundaram
-* **IBM**
- * Doug Davis
+- **Fujitsu**
-* **Microsoft**
- * Josh Lane
- * Chris Gillum
+ - Naohiro Tamura
-* **Neuroglia**
- * Charles d'Avernas
- * Jean-Baptiste Bianchi
+- **Google**
-* **Nokia**
- * Manuel Stein
- * Istemi Ekin Akkus
+ - Evan Anderson
+ - Rachael Myers
-* **OpenEnterprise**
- * Maciek Swiderski
+- **Huawei**
-* **Oracle**
- * Varun Madan
+ - Cathy Hong Zhang
+ - Farhad Sunavala
-* **Oracle Cloud Infrastructure**
- * Kay Singh
- * Jorgen Johnson
+- **IBM**
-* **Red Hat**
- * Ruben Romero Montes
- * Ricardo Zanini
- * Lucas Caparelli
- * Paul Morie
+ - Doug Davis
-* **SecureDocs, Inc**
- * Stephen Crosby
+- **Microsoft**
-* **Serverless**
- * Brian Neisler
+ - Josh Lane
+ - Chris Gillum
-* **Sophos**
- * Matt Nicholls
+- **Neuroglia**
-* **Temporal Technologies**
- * Antonio Mendoza Pérez
- * Tihomir Surdilovic
+ - Charles d'Avernas
+ - Jean-Baptiste Bianchi
-* **WSO2**
- * Chathura Ekanayake
\ No newline at end of file
+- **Nokia**
+
+ - Manuel Stein
+ - Istemi Ekin Akkus
+
+- **OpenEnterprise**
+
+ - Maciek Swiderski
+
+- **Oracle**
+
+ - Varun Madan
+
+- **Oracle Cloud Infrastructure**
+
+ - Kay Singh
+ - Jorgen Johnson
+
+- **Red Hat**
+
+ - Ruben Romero Montes
+ - Ricardo Zanini
+ - Lucas Caparelli
+ - Paul Morie
+
+- **SecureDocs, Inc**
+
+ - Stephen Crosby
+
+- **Serverless**
+
+ - Brian Neisler
+
+- **Sophos**
+
+ - Matt Nicholls
+
+- **Temporal Technologies**
+
+ - Antonio Mendoza Pérez
+ - Tihomir Surdilovic
+
+- **WSO2**
+ - Chathura Ekanayake
diff --git a/contributing.md b/contributing.md
index 55347397..2e75a77f 100644
--- a/contributing.md
+++ b/contributing.md
@@ -118,15 +118,56 @@ you can also use the `fixAll` command of the
To otherwise check for style violations, use:
```bash
-# Ruby and gem are required for mdl
-gem install mdl
-mdl -c .mdlrc .
+npm install -g markdownlint-cli
+markdownlint **/*.md
+```
+
+```bash
+brew install markdownlint-cli
+markdownlint **/*.md
```
To fix style violations, follow the
[instruction](https://github.com/DavidAnson/markdownlint#optionsresultversion)
with the Node version of markdownlint.
+### YAML style
+
+YAML files should be appropriately formatted before a pull request is sent out.
+In this repository, we follow the
+[yamllint rules](https://github.com/adrienverge/yamllint/blob/master/docs/rules.rst).
+See [yamllint](.yamllint.yaml) for details.
+
+We highly encourage using line breaks in markdown files at `80` characters
+wide. Some tools can do it for you effectively. Please submit the proposal
+to include your editor settings required to enable this behavior so the
+out-of-the-box settings for this repository will be consistent.
+
+If you are using Visual Studio Code,
+you can also use the formatter of the
+[vscode YAML Language Support extension](https://github.com/redhat-developer/vscode-yaml).
+
+To install yamllint follow the [instructions outlined here](https://github.com/adrienverge/yamllint/blob/master/docs/quickstart.rst#installing-yamllint).
+
+### Gherkin style
+
+Gherkin files should be appropriately formatted before a pull request is sent out.
+In this repository, we follow the
+[gherkin-lint rules](https://github.com/gherkin-lint/gherkin-lint?tab=readme-ov-file#available-rules).
+See [gherkin-lint](.gherkin-lintrc) for details.
+
+We highly encourage using line breaks in markdown files at `80` characters
+wide. Some tools can do it for you effectively. Please submit the proposal
+to include your editor settings required to enable this behavior so the
+out-of-the-box settings for this repository will be consistent.
+
+To install gherkin-lint run:
+
+```bash
+npm install -g gherkin-lint
+gherkin-lint **/*.feature
+```
+
### Typos
In addition, please make sure to clean up typos before you submit the change.
diff --git a/ctk/README.md b/ctk/README.md
index a1db9817..0f00f13c 100644
--- a/ctk/README.md
+++ b/ctk/README.md
@@ -4,30 +4,30 @@
- [Introduction](#introduction)
- [Using the CTK](#using-the-ctk)
- + [Conformance testing](#conformance-testing)
- + [Behavior Driven Development](#behavior-driven-development-bdd)
+ - [Conformance testing](#conformance-testing)
+ - [Behavior Driven Development](#behavior-driven-development-bdd)
- [Writing Features and Scenarios](#writing-features-and-scenarios)
- + [Feature File Structure](#feature-file-structure)
- + [Steps](#steps)
- - [Arrange](#arrange)
- + [Define workflow](#define-workflow)
- + [Set workflow input](#set-workflow-input)
- - [Act](#act)
- + [Execute Workflow](#execute-workflow)
- - [Assert](#assert)
- - [Workflow has been cancelled](#workflow-has-been-cancelled)
- - [Workflow ran to completion](#workflow-ran-to-completion)
- - [Workflow has faulted](#workflow-has-faulted)
- - [Workflow output should have properties](#workflow-output-should-have-properties)
- - [Workflow output should have property with value](#workflow-output-should-have-property-with-value)
- - [Workflow output should have property with item count](#workflow-output-should-have-property-with-item-count)
- - [Task ran first](#task-ran-first)
- - [Task ran last](#task-ran-last)
- - [Task ran before](#task-ran-before)
- - [Task ran after](#task-ran-after)
- - [Task has been cancelled](#task-has-been-cancelled)
- - [Task ran to completion](#task-ran-to-completion)
- - [Task has faulted](#task-has-faulted)
+ - [Feature File Structure](#feature-file-structure)
+ - [Steps](#steps)
+ - [Arrange](#arrange)
+ - [Define workflow](#define-workflow)
+ - [Set workflow input](#set-workflow-input)
+ - [Act](#act)
+ - [Execute Workflow](#execute-workflow)
+ - [Assert](#assert)
+ - [Workflow has been cancelled](#workflow-has-been-cancelled)
+ - [Workflow ran to completion](#workflow-ran-to-completion)
+ - [Workflow has faulted](#workflow-has-faulted)
+ - [Workflow output should have properties](#workflow-output-should-have-properties)
+ - [Workflow output should have property with value](#workflow-output-should-have-property-with-value)
+ - [Workflow output should have property with item count](#workflow-output-should-have-property-with-item-count)
+ - [Task ran first](#task-ran-first)
+ - [Task ran last](#task-ran-last)
+ - [Task ran before](#task-ran-before)
+ - [Task ran after](#task-ran-after)
+ - [Task has been cancelled](#task-has-been-cancelled)
+ - [Task ran to completion](#task-ran-to-completion)
+ - [Task has faulted](#task-has-faulted)
## Introduction
@@ -44,14 +44,14 @@ The Serverless Workflow CTK serves two primary purposes: conformance testing and
Conformance testing is the process of verifying that an implementation adheres to a given specification. By running the CTK, developers can ensure that their implementations of the Serverless Workflow DSL behave as expected and meet the defined standards. This is crucial for maintaining interoperability and consistency across different implementations of the Serverless Workflow specification.
1. **Clone the Repository**: Start by cloning the Serverless Workflow CTK repository to your local machine.
-
+
```sh
git clone https://github.com/serverlessworkflow/specification.git
```
2. **Install Dependencies**: Ensure that you have all the necessary dependencies installed. This typically involves setting up a testing framework that can execute Gherkin tests.
-3. **Run the Tests**: Execute the Gherkin features using your preferred test runner.
+3. **Run the Tests**: Execute the Gherkin features using your preferred test runner.
4. **Review Results**: After running the tests, review the results to ensure that your implementation passes all the scenarios. Any failures indicate deviations from the Serverless Workflow specification.
@@ -98,17 +98,17 @@ Feature:
### Steps
-For clarity, we've categorized the Gherkin steps used in the Serverless Workflow CTK into three main groups: Arrange, Act, and Assert.
+For clarity, we've categorized the Gherkin steps used in the Serverless Workflow CTK into three main groups: Arrange, Act, and Assert.
-These divisions help clarify the purpose of each step and streamline scenario comprehension.
+These divisions help clarify the purpose of each step and streamline scenario comprehension.
The Arrange section sets up the initial state or context, the Act section describes the action, and the Assert section verifies the outcome. This structure enhances readability, aiding stakeholders in understanding the scenario flow and step intent.
#### Arrange
-Sets up the initial conditions for the test scenario.
+Sets up the initial conditions for the test scenario.
-It includes steps to define the workflow, set the input data for the workflow, and prepare any necessary resources or configurations required for executing the workflow.
+It includes steps to define the workflow, set the input data for the workflow, and prepare any necessary resources or configurations required for executing the workflow.
The arrange section of the test ensures that the environment is properly configured before the workflow execution begins.
@@ -150,9 +150,9 @@ When the workflow is executed
#### Assert
-Contains assertions that verify the outcome of the workflow execution.
+Contains assertions that verify the outcome of the workflow execution.
-It includes steps to check various conditions such as whether the workflow was canceled, completed successfully, or encountered any faults or errors during execution.
+It includes steps to check various conditions such as whether the workflow was canceled, completed successfully, or encountered any faults or errors during execution.
The assert section ensures that the workflow behaves as expected and meets the specified criteria for correctness and reliability.
@@ -223,7 +223,6 @@ And the workflow output should have a '' property with value:
And the workflow output should have a '' property containing items
```
-
##### Task ran first
Asserts that a specific task within the workflow executed first during workflow execution. It ensures the correct sequence of task execution based on the provided workflow definition.
@@ -296,4 +295,4 @@ And should fault with error:
"""yaml
"""
-```
\ No newline at end of file
+```
diff --git a/dsl-reference.md b/dsl-reference.md
index 005ca263..00e3627e 100644
--- a/dsl-reference.md
+++ b/dsl-reference.md
@@ -4,16 +4,16 @@
- [Abstract](#abstract)
- [Definitions](#definitions)
- + [Workflow](#workflow)
+ - [Workflow](#workflow)
- [Document](#document)
- [Use](#use)
- [Schedule](#schedule)
- + [Task](#task)
+ - [Task](#task)
- [Call](#call)
- + [AsyncAPI](#asyncapi-call)
- + [gRPC](#grpc-call)
- + [HTTP](#http-call)
- + [OpenAPI](#openapi-call)
+ - [AsyncAPI](#asyncapi-call)
+ - [gRPC](#grpc-call)
+ - [HTTP](#http-call)
+ - [OpenAPI](#openapi-call)
- [Do](#do)
- [Emit](#emit)
- [For](#for)
@@ -21,35 +21,35 @@
- [Listen](#listen)
- [Raise](#raise)
- [Run](#run)
- + [Container](#container-process)
- + [Shell](#shell-process)
- + [Script](#script-process)
- + [Workflow](#workflow-process)
+ - [Container](#container-process)
+ - [Shell](#shell-process)
+ - [Script](#script-process)
+ - [Workflow](#workflow-process)
- [Switch](#switch)
- [Set](#set)
- [Try](#try)
- [Wait](#wait)
- + [Flow Directive](#flow-directive)
- + [External Resource](#external-resource)
- + [Authentication](#authentication)
+ - [Flow Directive](#flow-directive)
+ - [External Resource](#external-resource)
+ - [Authentication](#authentication)
- [Basic](#basic-authentication)
- [Bearer](#bearer-authentication)
- [Certificate](#certificate-authentication)
- [Digest](#digest-authentication)
- [OAUTH2](#oauth2-authentication)
- + [Extension](#extension)
- + [Error](#error)
+ - [Extension](#extension)
+ - [Error](#error)
- [Standard Error Types](#standard-error-types)
- + [Event Consumption Strategy](#event-consumption-strategy)
- + [Event Filter](#event-filter)
- + [Retry](#retry)
- + [Input](#input)
- + [Output](#output)
- + [Export](#export)
- + [Timeout](#timeout)
- + [Duration](#duration)
- + [HTTP Response](#http-response)
- + [HTTP Request](#http-request)
+ - [Event Consumption Strategy](#event-consumption-strategy)
+ - [Event Filter](#event-filter)
+ - [Retry](#retry)
+ - [Input](#input)
+ - [Output](#output)
+ - [Export](#export)
+ - [Timeout](#timeout)
+ - [Duration](#duration)
+ - [HTTP Response](#http-response)
+ - [HTTP Request](#http-request)
## Abstract
@@ -63,72 +63,72 @@ A [workflow](#workflow) serves as a blueprint outlining the series of [tasks](#t
#### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| document | [`document`](#document) | `yes` | Documents the defined workflow. |
-| input | [`input`](#input) | `no` | Configures the workflow's input. |
-| use | [`use`](#use) | `no` | Defines the workflow's reusable components, if any. |
-| do | [`map[string, task][]`](#task) | `yes` | The [task(s)](#task) that must be performed by the [workflow](#workflow). |
-| timeout | [`timeout`](#timeout) | `no` | The configuration, if any, of the workflow's timeout. |
-| output | [`output`](#output) | `no` | Configures the workflow's output. |
-| schedule | [`schedule`](#schedule) | `no` | Configures the workflow's schedule, if any. |
-| evaluate | [`evaluate`](#evaluate) | `no` | Configures runtime expression evaluation. |
+| Name | Type | Required | Description |
+| :------- | :----------------------------: | :------: | :------------------------------------------------------------------------ |
+| document | [`document`](#document) | `yes` | Documents the defined workflow. |
+| input | [`input`](#input) | `no` | Configures the workflow's input. |
+| use | [`use`](#use) | `no` | Defines the workflow's reusable components, if any. |
+| do | [`map[string, task][]`](#task) | `yes` | The [task(s)](#task) that must be performed by the [workflow](#workflow). |
+| timeout | [`timeout`](#timeout) | `no` | The configuration, if any, of the workflow's timeout. |
+| output | [`output`](#output) | `no` | Configures the workflow's output. |
+| schedule | [`schedule`](#schedule) | `no` | Configures the workflow's schedule, if any. |
+| evaluate | [`evaluate`](#evaluate) | `no` | Configures runtime expression evaluation. |
#### Document
Documents the workflow definition.
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| dsl | `string` | `yes` | The version of the DSL used to define the workflow. |
-| namespace | `string` | `yes` | The workflow's namespace.
|
-| name | `string` | `yes` | The workflow's name.
|
-| version | `string` | `yes` | The workflow's [semantic version]
-| title | `string` | `no` | The workflow's title. |
-| summary | `string` | `no` | The workflow's Markdown summary. |
-| tags | `map[string, string]` | `no` | A key/value mapping of the workflow's tags, if any. |
+| Name | Type | Required | Description |
+| :-------- | :-------------------: | :------: | :-------------------------------------------------- |
+| dsl | `string` | `yes` | The version of the DSL used to define the workflow. |
+| namespace | `string` | `yes` | The workflow's namespace.
|
+| name | `string` | `yes` | The workflow's name.
|
+| version | `string` | `yes` | The workflow's [semantic version] |
+| title | `string` | `no` | The workflow's title. |
+| summary | `string` | `no` | The workflow's Markdown summary. |
+| tags | `map[string, string]` | `no` | A key/value mapping of the workflow's tags, if any. |
#### Use
Defines the workflow's reusable components.
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| authentications | [`map[string, authentication]`](#authentication) | `no` | A name/value mapping of the workflow's reusable authentication policies. |
-| errors | [`map[string, error]`](#error) | `no` | A name/value mapping of the workflow's reusable errors. |
-| extensions | [`map[string, extension][]`](#extension) | `no` | A list of the workflow's reusable extensions. |
-| functions | [`map[string, task]`](#task) | `no` | A name/value mapping of the workflow's reusable tasks. |
-| retries | [`map[string, retryPolicy]`](#retry) | `no` | A name/value mapping of the workflow's reusable retry policies. |
-| secrets | `string[]` | `no` | A list containing the workflow's secrets. |
+| Name | Type | Required | Description |
+| :-------------- | :----------------------------------------------: | :------: | :----------------------------------------------------------------------- |
+| authentications | [`map[string, authentication]`](#authentication) | `no` | A name/value mapping of the workflow's reusable authentication policies. |
+| errors | [`map[string, error]`](#error) | `no` | A name/value mapping of the workflow's reusable errors. |
+| extensions | [`map[string, extension][]`](#extension) | `no` | A list of the workflow's reusable extensions. |
+| functions | [`map[string, task]`](#task) | `no` | A name/value mapping of the workflow's reusable tasks. |
+| retries | [`map[string, retryPolicy]`](#retry) | `no` | A name/value mapping of the workflow's reusable retry policies. |
+| secrets | `string[]` | `no` | A list containing the workflow's secrets. |
#### Schedule
Configures the schedule of a workflow.
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| every | [`duration`](#duration) | `no` | Specifies the duration of the interval at which the workflow should be executed. Unlike `after`, this option will run the workflow regardless of whether the previous run is still in progress.
*Required when no other property has been set.* |
-| cron | `string` | `no` | Specifies the schedule using a CRON expression, e.g., '0 0 * * *' for daily at midnight.
*Required when no other property has been set.* |
-| after | [`duration`](#duration) | `no` | Specifies a delay duration that the workflow must wait before starting again after it completes. In other words, when this workflow completes, it should run again after the specified amount of time.
*Required when no other property has been set.* |
-| on | [`eventConsumptionStrategy`](#event-consumption-strategy) | `no` | Specifies the events that trigger the workflow execution.
*Required when no other property has been set.* |
+| Name | Type | Required | Description |
+| :---- | :-------------------------------------------------------: | :------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| every | [`duration`](#duration) | `no` | Specifies the duration of the interval at which the workflow should be executed. Unlike `after`, this option will run the workflow regardless of whether the previous run is still in progress.
_Required when no other property has been set._ |
+| cron | `string` | `no` | Specifies the schedule using a CRON expression, e.g., '0 0 \* \* *' for daily at midnight.
*Required when no other property has been set.\* |
+| after | [`duration`](#duration) | `no` | Specifies a delay duration that the workflow must wait before starting again after it completes. In other words, when this workflow completes, it should run again after the specified amount of time.
_Required when no other property has been set._ |
+| on | [`eventConsumptionStrategy`](#event-consumption-strategy) | `no` | Specifies the events that trigger the workflow execution.
_Required when no other property has been set._ |
#### Evaluate
Configures a workflow's runtime expression evaluation.
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| language | `string` | `yes` | The language used for writting runtime expressions.
*Defaults to `jq`.* |
-| mode | `string` | `yes` | 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`.*
+| Name | Type | Required | Description |
+| :------- | :------: | :------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| language | `string` | `yes` | The language used for writting runtime expressions.
_Defaults to `jq`._ |
+| mode | `string` | `yes` | 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
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: order-pet
- version: '1.0.0'
+ version: "1.0.0"
title: Order Pet - 1.0.0
summary: >
# Order Pet - 1.0.0
@@ -143,14 +143,14 @@ document:
use:
authentications:
petStoreOAuth2:
- oauth2:
+ oauth2:
authority: https://petstore.swagger.io/.well-known/openid-configuration
grant: client-credentials
client:
id: workflow-runtime
secret: "**********"
- scopes: [ api ]
- audiences: [ runtime ]
+ scopes: [api]
+ audiences: [runtime]
extensions:
- externalLogging:
extend: all
@@ -185,7 +185,7 @@ do:
- getAvailablePets:
call: getAvailablePets
output:
- as: "$input + { availablePets: [.[] | select(.category.name == \"dog\" and (.tags[] | .breed == $input.order.breed))] }"
+ as: '$input + { availablePets: [.[] | select(.category.name == "dog" and (.tags[] | .breed == $input.order.breed))] }'
- submitMatchesByMail:
call: http
with:
@@ -215,11 +215,11 @@ do:
### Task
-A task within a [workflow](#workflow) represents a discrete unit of work that contributes to achieving the overall objectives defined by the [workflow](#workflow).
+A task within a [workflow](#workflow) represents a discrete unit of work that contributes to achieving the overall objectives defined by the [workflow](#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.
+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](#task) are designed to be modular and focused, each serving a distinct purpose within the broader context of the [workflow](#workflow).
+[Tasks](#task) are designed to be modular and focused, each serving a distinct purpose within the broader context of the [workflow](#workflow).
By breaking down the [workflow](#workflow) into manageable [tasks](#task), organizations can effectively coordinate and track progress, enabling efficient collaboration and ensuring that work is completed in a structured and organized manner.
@@ -232,22 +232,22 @@ The Serverless Workflow DSL defines a list of [tasks](#task) that **must be** su
- [For](#for), used to iterate over a collection of items, and conditionally perform a task for each of them.
- [Listen](#listen), used to listen for an [event](#event) or more.
- [Raise](#raise), used to raise an [error](#error) and potentially fault the [workflow](#workflow).
-- [Run](#run), used to run a [container](#container), a [script](#script) or event a [shell](#shell) command.
+- [Run](#run), used to run a [container](#container), a [script](#script) or event a [shell](#shell) command.
- [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 or update 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.
#### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| if | `string` | `no` | A [`runtime expression`](dsl.md#runtime-expressions), if any, used to determine whether or not the task should be run.
The task is considered skipped if not run. |
-| input | [`input`](#input) | `no` | An object used to customize the task's input and to document its schema, if any. |
-| output | [`output`](#output) | `no` | An object used to customize the task's output and to document its schema, if any. |
-| export | [`export`](#export) | `no` | An object used to customize the content of the workflow context. |
-| timeout | [`timeout`](#timeout) | `no` | The configuration of the task's timeout, if any. |
-| then | [`flowDirective`](#flow-directive) | `no` | The flow directive to execute next.
*If not set, defaults to `continue`.* |
+| Name | Type | Required | Description |
+| :------ | :--------------------------------: | :------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| if | `string` | `no` | A [`runtime expression`](dsl.md#runtime-expressions), if any, used to determine whether or not the task should be run.
The task is considered skipped if not run. |
+| input | [`input`](#input) | `no` | An object used to customize the task's input and to document its schema, if any. |
+| output | [`output`](#output) | `no` | An object used to customize the task's output and to document its schema, if any. |
+| export | [`export`](#export) | `no` | An object used to customize the content of the workflow context. |
+| timeout | [`timeout`](#timeout) | `no` | The configuration of the task's timeout, if any. |
+| then | [`flowDirective`](#flow-directive) | `no` | The flow directive to execute next.
_If not set, defaults to `continue`._ |
#### Call
@@ -255,19 +255,19 @@ Enables the execution of a specified function within a workflow, allowing seamle
##### Properties
-| 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 |
+| 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
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: call-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- getPet:
call: http
@@ -289,24 +289,24 @@ The [AsyncAPI Call](#asyncapi-call) enables workflows to interact with external
###### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| document | [`externalResource`](#external-resource) | `yes` | The AsyncAPI document that defines the operation to call. |
-| operationRef | `string` | `yes` | A reference to the AsyncAPI operation to call. |
-| server | `string` | `no` | A reference to the server to call the specified AsyncAPI operation on.
If not set, default to the first server matching the operation's channel. |
-| message | `string` | `no` | The name of the message to use.
If not set, defaults to the first message defined by the operation. |
-| binding | `string` | `no` | The name of the binding to use.
If not set, defaults to the first binding defined by the operation |
-| payload | `any` | `no` | The operation's payload, as defined by the configured message |
-| authentication | `string`
[`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the AsyncAPI operation. |
+| Name | Type | Required | Description |
+| :------------- | :---------------------------------------------: | :------: | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
+| document | [`externalResource`](#external-resource) | `yes` | The AsyncAPI document that defines the operation to call. |
+| operationRef | `string` | `yes` | A reference to the AsyncAPI operation to call. |
+| server | `string` | `no` | A reference to the server to call the specified AsyncAPI operation on.
If not set, default to the first server matching the operation's channel. |
+| message | `string` | `no` | The name of the message to use.
If not set, defaults to the first message defined by the operation. |
+| binding | `string` | `no` | The name of the binding to use.
If not set, defaults to the first binding defined by the operation |
+| payload | `any` | `no` | The operation's payload, as defined by the configured message |
+| authentication | `string`
[`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the AsyncAPI operation. |
###### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: asyncapi-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- findPet:
call: asyncapi
@@ -326,24 +326,24 @@ The [gRPC Call](#grpc-call) enables communication with external systems via the
###### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| proto | [`externalResource`](#external-resource) | `yes` | The proto resource that describes the GRPC service to call. |
-| service.name | `string` | `yes` | The name of the GRPC service to call. |
-| service.host | `string` | `yes` | The hostname of the GRPC service to call. |
-| service.port | `integer` | `no` | The port number of the GRPC service to call. |
-| service.authentication | [`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the GRPC service. |
-| method | `string` | `yes` | The name of the GRPC service method to call. |
-| arguments | `map` | `no` | A name/value mapping of the method call's arguments, if any. |
+| Name | Type | Required | Description |
+| :--------------------- | :--------------------------------------: | :------: | :--------------------------------------------------------------------------------------------------------- |
+| proto | [`externalResource`](#external-resource) | `yes` | The proto resource that describes the GRPC service to call. |
+| service.name | `string` | `yes` | The name of the GRPC service to call. |
+| service.host | `string` | `yes` | The hostname of the GRPC service to call. |
+| service.port | `integer` | `no` | The port number of the GRPC service to call. |
+| service.authentication | [`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the GRPC service. |
+| method | `string` | `yes` | The name of the GRPC service method to call. |
+| arguments | `map` | `no` | A name/value mapping of the method call's arguments, if any. |
###### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: grpc-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- greet:
call: grpc
@@ -364,22 +364,22 @@ The [HTTP Call](#http-call) enables workflows to interact with external services
###### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| method | `string` | `yes` | The HTTP request method. |
-| endpoint | [`endpoint`](#endpoint) | `yes` | An URI or an 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. |
-| output | `string` | `no` | The http call's output format.
*Supported values are:*
*- `raw`, which output's the base-64 encoded [http response](#http-response) content, if any.*
*- `content`, which outputs the content of [http response](#http-response), possibly deserialized.*
*- `response`, which outputs the [http response](#http-response).*
*Defaults to `content`.* |
+| Name | Type | Required | Description |
+| :------- | :---------------------: | :------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| method | `string` | `yes` | The HTTP request method. |
+| endpoint | [`endpoint`](#endpoint) | `yes` | An URI or an 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. |
+| output | `string` | `no` | The http call's output format.
_Supported values are:_
_- `raw`, which output's the base-64 encoded [http response](#http-response) content, if any._
_- `content`, which outputs the content of [http response](#http-response), possibly deserialized._
_- `response`, which outputs the [http response](#http-response)._
_Defaults to `content`._ |
###### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: http-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- getPet:
call: http
@@ -394,22 +394,22 @@ The [OpenAPI Call](#openapi-call) enables workflows to interact with external se
###### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| document | [`externalResource`](#external-resource) | `yes` | The OpenAPI document that defines the operation to call. |
-| operationId | `string` | `yes` | The id of the OpenAPI operation to call. |
-| arguments | `map` | `no` | A name/value mapping of the parameters, if any, of the OpenAPI operation to call. |
-| authentication | [`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the OpenAPI operation. |
-| output | `string` | `no` | The OpenAPI call's output format.
*Supported values are:*
*- `raw`, which output's the base-64 encoded [http response](#http-response) content, if any.*
*- `content`, which outputs the content of [http response](#http-response), possibly deserialized.*
*- `response`, which outputs the [http response](#http-response).*
*Defaults to `content`.* |
+| Name | Type | Required | Description |
+| :------------- | :--------------------------------------: | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| document | [`externalResource`](#external-resource) | `yes` | The OpenAPI document that defines the operation to call. |
+| operationId | `string` | `yes` | The id of the OpenAPI operation to call. |
+| arguments | `map` | `no` | A name/value mapping of the parameters, if any, of the OpenAPI operation to call. |
+| authentication | [`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the OpenAPI operation. |
+| output | `string` | `no` | The OpenAPI call's output format.
_Supported values are:_
_- `raw`, which output's the base-64 encoded [http response](#http-response) content, if any._
_- `content`, which outputs the content of [http response](#http-response), possibly deserialized._
_- `response`, which outputs the [http response](#http-response)._
_Defaults to `content`._ |
###### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: openapi-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- findPet:
call: openapi
@@ -426,24 +426,24 @@ Serves as a fundamental building block within workflows, enabling the sequential
##### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| do | [`map[string, task][]`](#task) | `no` | The tasks to perform sequentially. |
+| Name | Type | Required | Description |
+| :--- | :----------------------------: | :------: | :--------------------------------- |
+| do | [`map[string, task][]`](#task) | `no` | The tasks to perform sequentially. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: do-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- bookHotel:
call: http
with:
method: post
- endpoint:
+ endpoint:
uri: https://fake-booking-agency.com/hotels/book
authentication: fake-booking-agency-oauth2
body:
@@ -454,20 +454,20 @@ do:
call: http
with:
method: post
- endpoint:
+ endpoint:
uri: https://fake-booking-agency.com/flights/book
authentication: fake-booking-agency-oauth2
body:
departure:
- date: '01/01/26'
- time: '07:25:00'
+ date: "01/01/26"
+ time: "07:25:00"
from:
airport: BRU
city: Zaventem
country: Belgium
arrival:
- date: '01/01/26'
- time: '11:12:00'
+ date: "01/01/26"
+ time: "11:12:00"
to:
airport: LIS
city: Lisbon
@@ -480,18 +480,18 @@ Allows workflows to publish events to event brokers or messaging systems, facili
##### Properties
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| emit.event | [`event`](#event) | `yes` | Defines the event to emit. |
+| Name | Type | Required | Description |
+| :--------- | :---------------: | :------: | :------------------------- |
+| emit.event | [`event`](#event) | `yes` | Defines the event to emit. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: emit-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- emitEvent:
emit:
@@ -513,22 +513,22 @@ Allows workflows to iterate over a collection of items, executing a defined set
##### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| for.each | `string` | `no` | The name of the variable used to store the current item being enumerated.
Defaults to `item`. |
-| for.in | `string` | `yes` | A [runtime expression](#runtime-expressions) used to get the collection to enumerate. |
-| for.at | `string` | `no` | The name of the variable used to store the index of the current item being enumerated.
Defaults to `index`. |
-| while | `string` | `no` | A [runtime expression](#runtime-expressions) that represents the condition, if any, that must be met for the iteration to continue. |
-| do | [`task`](#task) | `yes` | The task to perform for each item in the collection. |
+| Name | Type | Required | Description |
+| :------- | :-------------: | :------: | :---------------------------------------------------------------------------------------------------------------------------------- |
+| for.each | `string` | `no` | The name of the variable used to store the current item being enumerated.
Defaults to `item`. |
+| for.in | `string` | `yes` | A [runtime expression](#runtime-expressions) used to get the collection to enumerate. |
+| for.at | `string` | `no` | The name of the variable used to store the index of the current item being enumerated.
Defaults to `index`. |
+| while | `string` | `no` | A [runtime expression](#runtime-expressions) that represents the condition, if any, that must be met for the iteration to continue. |
+| do | [`task`](#task) | `yes` | The task to perform for each item in the collection. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: for-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- checkup:
for:
@@ -544,7 +544,7 @@ do:
with:
type: com.fake.petclinic.pets.checkup.completed.v2
output:
- as: '.pets + [{ "id": $pet.id }]'
+ as: '.pets + [{ "id": $pet.id }]'
```
#### Fork
@@ -553,19 +553,19 @@ Allows workflows to execute multiple subtasks concurrently, enabling parallel pr
##### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| fork.branches | [`map[string, task][]`](#task) | `no` | The tasks to perform concurrently. |
-| fork.compete | `boolean` | `no` | Indicates whether or not the concurrent [`tasks`](#task) are racing against each other, with a single possible winner, which sets the composite task's output. Defaults to `false`. |
+| Name | Type | Required | Description |
+| :------------ | :----------------------------: | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| fork.branches | [`map[string, task][]`](#task) | `no` | The tasks to perform concurrently. |
+| fork.compete | `boolean` | `no` | Indicates whether or not the concurrent [`tasks`](#task) are racing against each other, with a single possible winner, which sets the composite task's output. Defaults to `false`. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: fork-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- raiseAlarm:
fork:
@@ -589,38 +589,37 @@ do:
room: ${ .room.number }
```
-
#### Listen
-Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.
+Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.
##### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| listen.to | [`eventConsumptionStrategy`](#event-consumption-strategy) | `yes` | Configures the event(s) the workflow must listen to. |
+| Name | Type | Required | Description |
+| :-------- | :-------------------------------------------------------: | :------: | :--------------------------------------------------- |
+| listen.to | [`eventConsumptionStrategy`](#event-consumption-strategy) | `yes` | Configures the event(s) the workflow must listen to. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: listen-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- callDoctor:
listen:
to:
any:
- - with:
- type: com.fake-hospital.vitals.measurements.temperature
- data:
- temperature: ${ .temperature > 38 }
- - with:
- type: com.fake-hospital.vitals.measurements.bpm
- data:
- temperature: ${ .bpm < 60 or .bpm > 100 }
+ - with:
+ type: com.fake-hospital.vitals.measurements.temperature
+ data:
+ temperature: ${ .temperature > 38 }
+ - with:
+ type: com.fake-hospital.vitals.measurements.bpm
+ data:
+ temperature: ${ .bpm < 60 or .bpm > 100 }
```
#### Raise
@@ -629,18 +628,18 @@ Intentionally triggers and propagates errors. By employing the "Raise" task, wor
##### Properties
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| raise.error | [`error`](#error) | `yes` | Defines the error to raise. |
+| Name | Type | Required | Description |
+| :---------- | :---------------: | :------: | :-------------------------- |
+| raise.error | [`error`](#error) | `yes` | Defines the error to raise. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: raise-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- processTicket:
switch:
@@ -691,21 +690,21 @@ Provides the capability to execute external [containers](#container-process), [s
##### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| run.container | [`container`](#container-process) | `no` | The definition of the container to run.
*Required if `script`, `shell` and `workflow` have not been set.* |
-| run.script | [`script`](#script-process) | `no` | The definition of the script to run.
*Required if `container`, `shell` and `workflow` have not been set.* |
-| run.shell | [`shell`](#shell-process) | `no` | The definition of the shell command to run.
*Required if `container`, `script` and `workflow` have not been set.* |
-| run.workflow | [`workflow`](#workflow-process) | `no` | The definition of the workflow to run.
*Required if `container`, `script` and `shell` have not been set.* |
+| Name | Type | Required | Description |
+| :------------ | :-------------------------------: | :------: | :------------------------------------------------------------------------------------------------------------------- |
+| run.container | [`container`](#container-process) | `no` | The definition of the container to run.
_Required if `script`, `shell` and `workflow` have not been set._ |
+| run.script | [`script`](#script-process) | `no` | The definition of the script to run.
_Required if `container`, `shell` and `workflow` have not been set._ |
+| run.shell | [`shell`](#shell-process) | `no` | The definition of the shell command to run.
_Required if `container`, `script` and `workflow` have not been set._ |
+| run.workflow | [`workflow`](#workflow-process) | `no` | The definition of the workflow to run.
_Required if `container`, `script` and `shell` have not been set._ |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: run-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- runContainer:
run:
@@ -729,7 +728,7 @@ do:
workflow:
namespace: another-one
name: do-stuff
- version: '0.1.0'
+ version: "0.1.0"
input: {}
```
@@ -739,22 +738,22 @@ Enables the execution of external processes encapsulated within a containerized
###### Properties
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| image | `string` | `yes` | The name of the container image to run |
-| command | `string` | `no` | The command, if any, to execute on the container |
-| ports | `map` | `no` | The container's port mappings, if any |
-| volumes | `map` | `no` | The container's volume mappings, if any |
-| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process |
+| Name | Type | Required | Description |
+| :---------- | :------: | :------: | :--------------------------------------------------------------------------------------------------- |
+| image | `string` | `yes` | The name of the container image to run |
+| command | `string` | `no` | The command, if any, to execute on the container |
+| ports | `map` | `no` | The container's port mappings, if any |
+| volumes | `map` | `no` | The container's volume mappings, if any |
+| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process |
###### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: run-container-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- runContainer:
run:
@@ -768,21 +767,21 @@ Enables the execution of custom scripts or code within a workflow, empowering wo
###### Properties
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| language | `string` | `yes` | The language of the script to run |
-| code | `string` | `no` | The script's code.
*Required if `source` has not been set.* |
-| source | [externalResource](#external-resource) | `no` | The script's resource.
*Required if `code` has not been set.* |
-| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process |
+| Name | Type | Required | Description |
+| :---------- | :------------------------------------: | :------: | :--------------------------------------------------------------------------------------------------- |
+| language | `string` | `yes` | The language of the script to run |
+| code | `string` | `no` | The script's code.
_Required if `source` has not been set._ |
+| source | [externalResource](#external-resource) | `no` | The script's resource.
_Required if `code` has not been set._ |
+| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process |
###### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: run-script-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- runScript:
run:
@@ -798,20 +797,20 @@ Enables the execution of shell commands within a workflow, enabling workflows to
###### Properties
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| command | `string` | `yes` | The shell command to run |
-| arguments | `map` | `no` | A list of the arguments of the shell command to run |
-| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process |
+| Name | Type | Required | Description |
+| :---------- | :------: | :------: | :--------------------------------------------------------------------------------------------------- |
+| command | `string` | `yes` | The shell command to run |
+| arguments | `map` | `no` | A list of the arguments of the shell command to run |
+| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process |
###### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: run-shell-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- runShell:
run:
@@ -825,27 +824,27 @@ Enables the invocation and execution of nested workflows within a parent workflo
###### Properties
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| name | `string` | `yes` | The name of the workflow to run |
-| version | `string` | `yes` | The version of the workflow to run. Defaults to `latest` |
-| input | `any` | `no` | The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified |
+| Name | Type | Required | Description |
+| :------ | :------: | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
+| name | `string` | `yes` | The name of the workflow to run |
+| version | `string` | `yes` | The version of the workflow to run. Defaults to `latest` |
+| input | `any` | `no` | The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified |
###### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: run-workflow-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- startWorkflow:
run:
workflow:
namespace: another-one
name: do-stuff
- version: '0.1.0'
+ version: "0.1.0"
input:
foo: bar
```
@@ -856,9 +855,9 @@ A task used to set data.
##### Properties
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| set | `object` | `yes` | A name/value mapping of the data to set. |
+| Name | Type | Required | Description |
+| :--- | :------: | :------: | :--------------------------------------- |
+| set | `object` | `yes` | A name/value mapping of the data to set. |
##### Examples
@@ -867,7 +866,7 @@ document:
dsl: 1.0.0-alpha1
namespace: default
name: set-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- setShape:
set:
@@ -882,18 +881,18 @@ Enables conditional branching within workflows, allowing them to dynamically sel
##### Properties
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| switch | [`case[]`](#switch-case) | `yes` | A name/value map of the cases to switch on |
+| Name | Type | Required | Description |
+| :----- | :----------------------: | :------: | :----------------------------------------- |
+| switch | [`case[]`](#switch-case) | `yes` | A name/value map of the cases to switch on |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: switch-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- processOrder:
switch:
@@ -954,10 +953,10 @@ do:
Defines a switch case, encompassing of a condition for matching and an associated action to execute upon a match.
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| when | `string` | `no` | A runtime expression used to determine whether or not the case matches.
*If not set, the case will be matched by default if no other case match.*
*Note that there can be only one default case, all others **MUST** set a condition.*
-| then | [`flowDirective`](#flow-directive) | `yes` | The flow directive to execute when the case matches. |
+| Name | Type | Required | Description |
+| :--- | :--------------------------------: | :------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| when | `string` | `no` | A runtime expression used to determine whether or not the case matches.
_If not set, the case will be matched by default if no other case match._
_Note that there can be only one default case, all others **MUST** set a condition._ |
+| then | [`flowDirective`](#flow-directive) | `yes` | The flow directive to execute when the case matches. |
#### Try
@@ -965,19 +964,19 @@ Serves as a mechanism within workflows to handle errors gracefully, potentially
##### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| try | [`map[string, task][]`](#task) | `yes` | The task(s) to perform. |
-| catch | [`catch`](#catch) | `yes` | Configures the errors to catch and how to handle them. |
+| Name | Type | Required | Description |
+| :---- | :----------------------------: | :------: | :----------------------------------------------------- |
+| try | [`map[string, task][]`](#task) | `yes` | The task(s) to perform. |
+| catch | [`catch`](#catch) | `yes` | Configures the errors to catch and how to handle them. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: try-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- trySomething:
try:
@@ -1008,14 +1007,14 @@ Defines the configuration of a catch clause, which a concept used to catch error
###### Properties
-| Name | Type | Required | Description |
-|:--|:---:|:---:|:---|
-| errors | [`errorFilter`](#retry) | `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 or not to catch the filtered error |
-| exceptWhen | `string` | `no` | A runtime expression used to determine whether or not to catch the filtered error |
-| retry | [`retryPolicy`](#retry) | `no` | The retry policy to use, if any, when catching errors |
-| do | [`map[string, task][]`](#task) | `no` | The definition of the task(s) to run when catching an error |
+| Name | Type | Required | Description |
+| :--------- | :----------------------------: | :------: | :------------------------------------------------------------------------------------- |
+| errors | [`errorFilter`](#retry) | `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 or not to catch the filtered error |
+| exceptWhen | `string` | `no` | A runtime expression used to determine whether or not to catch the filtered error |
+| retry | [`retryPolicy`](#retry) | `no` | The retry policy to use, if any, when catching errors |
+| do | [`map[string, task][]`](#task) | `no` | The definition of the task(s) to run when catching an error |
#### Wait
@@ -1023,18 +1022,18 @@ Allows workflows to pause or delay their execution for a specified period of tim
##### Properties
-| Name | Type | Required | Description|
-|:--|:---:|:---:|:---|
-| wait | `string`
[`duration`](#duration) | `yes` | The amount of time to wait.
If a `string`, must be a valid [ISO 8601](#) duration expression. |
+| Name | Type | Required | Description |
+| :--- | :---------------------------------: | :------: | :----------------------------------------------------------------------------------------------- |
+| wait | `string`
[`duration`](#duration) | `yes` | The amount of time to wait.
If a `string`, must be a valid [ISO 8601](#) duration expression. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: wait-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- waitAWhile:
wait:
@@ -1045,12 +1044,12 @@ do:
Flow Directives are commands within a workflow that dictate its progression.
-| Directive | Description |
-| --------- | ----------- |
+| Directive | Description |
+| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `"continue"` | Instructs the workflow to proceed with the next task in line. This action may conclude the execution of a particular workflow or branch if there are not task defined after the continue one. |
-| `"exit"` | Halts the current branch's execution, potentially terminating the entire workflow if the current task resides within the main branch. |
-| `"end"` | Provides a graceful conclusion to the workflow execution, signaling its completion explicitly. |
-| `string` | Continues the workflow at the task with the specified name |
+| `"exit"` | Halts the current branch's execution, potentially terminating the entire workflow if the current task resides within the main branch. |
+| `"end"` | Provides a graceful conclusion to the workflow execution, signaling its completion explicitly. |
+| `string` | Continues the workflow at the task with the specified name |
### External Resource
@@ -1058,11 +1057,11 @@ Defines an external resource.
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| name | `string` | `no` | The name, if any, of the defined resource. |
-| uri | `string` | `yes` | The URI at which to get the defined resource. |
-| authentication | [`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when fecthing the resource. |
+| Property | Type | Required | Description |
+| -------------- | :---------------------------------: | :------: | ------------------------------------------------------------------------------------------------------- |
+| name | `string` | `no` | The name, if any, of the defined resource. |
+| uri | `string` | `yes` | The URI at which to get the defined resource. |
+| authentication | [`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when fecthing the resource. |
##### Examples
@@ -1081,22 +1080,22 @@ Defines the mechanism used to authenticate users and workflows attempting to acc
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| basic | [`basicAuthentication`](#basic-authentication) | `no` | The `basic` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
-| bearer | [`bearerAuthentication`](#bearer-authentication) | `no` | The `bearer` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
-| certificate | [`certificateAuthentication`](#certificate-authentication) | `no` | The `certificate` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
-| digest | [`digestAuthentication`](#digest-authentication) | `no` | The `digest` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
-| oauth2 | [`oauth2`](#oauth2-authentication) | `no` | The `oauth2` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
+| Property | Type | Required | Description |
+| ----------- | :--------------------------------------------------------: | :------: | ------------------------------------------------------------------------------------------------------------------------- |
+| basic | [`basicAuthentication`](#basic-authentication) | `no` | The `basic` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
+| bearer | [`bearerAuthentication`](#bearer-authentication) | `no` | The `bearer` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
+| certificate | [`certificateAuthentication`](#certificate-authentication) | `no` | The `certificate` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
+| digest | [`digestAuthentication`](#digest-authentication) | `no` | The `digest` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
+| oauth2 | [`oauth2`](#oauth2-authentication) | `no` | The `oauth2` authentication scheme to use, if any.
Required if no other property has been set, otherwise ignored. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: authentication-example
- version: '0.1.0'
+ version: "0.1.0"
use:
secrets:
- usernamePasswordSecret
@@ -1108,7 +1107,7 @@ do:
call: http
with:
method: get
- endpoint:
+ endpoint:
uri: https://secured.fake.com/sample
authentication: sampleBasicFromSecret
```
@@ -1119,19 +1118,19 @@ Defines the fundamentals of a 'basic' authentication.
##### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| username | `string` | `yes` | The username to use. |
-| password | `string` | `yes` | The password to use. |
+| Property | Type | Required | Description |
+| -------- | :------: | :------: | -------------------- |
+| username | `string` | `yes` | The username to use. |
+| password | `string` | `yes` | The password to use. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: basic-authentication-example
- version: '0.1.0'
+ version: "0.1.0"
use:
authentication:
sampleBasic:
@@ -1143,7 +1142,7 @@ do:
call: http
with:
method: get
- endpoint:
+ endpoint:
uri: https://secured.fake.com/sample
authentication: sampleBasic
```
@@ -1154,24 +1153,24 @@ Defines the fundamentals of a 'bearer' authentication
##### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| token | `string` | `yes` | The bearer token to use. |
+| Property | Type | Required | Description |
+| -------- | :------: | :------: | ------------------------ |
+| token | `string` | `yes` | The bearer token to use. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: bearer-authentication-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- sampleTask:
call: http
with:
method: get
- endpoint:
+ endpoint:
uri: https://secured.fake.com/sample
authentication:
bearer:
@@ -1180,43 +1179,41 @@ do:
#### Certificate Authentication
-
#### Digest Authentication
-
#### OAUTH2 Authentication
Defines the fundamentals of an 'oauth2' authentication
##### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| authority | `string` | `yes` | The URI that references the OAuth2 authority to use. |
-| grant | `string` | `yes` | The grant type to use.
-| client.id | `string` | `yes` | The client id to use. |
-| client.secret | `string` | `no` | The client secret to use, if any. |
-| scopes | `string[]` | `no` | The scopes, if any, to request the token for. |
-| audiences | `string[]` | `no` | The audiences, if any, to request the token for. |
-| username | `string` | `no` | The username to use. Used only if the grant type is `Password`. |
-| password | `string` | `no` | The password to use. Used only if the grant type is `Password`. |
-| subject | [`oauth2Token`](#oauth2-token) | `no` | The security token that represents the identity of the party on behalf of whom the request is being made. |
-| actor | [`oauth2Token`](#oauth2-token) | `no` | The security token that represents the identity of the acting party. |
+| Property | Type | Required | Description |
+| ------------- | :----------------------------: | :------: | --------------------------------------------------------------------------------------------------------- |
+| authority | `string` | `yes` | The URI that references the OAuth2 authority to use. |
+| grant | `string` | `yes` | The grant type to use. |
+| client.id | `string` | `yes` | The client id to use. |
+| client.secret | `string` | `no` | The client secret to use, if any. |
+| scopes | `string[]` | `no` | The scopes, if any, to request the token for. |
+| audiences | `string[]` | `no` | The audiences, if any, to request the token for. |
+| username | `string` | `no` | The username to use. Used only if the grant type is `Password`. |
+| password | `string` | `no` | The password to use. Used only if the grant type is `Password`. |
+| subject | [`oauth2Token`](#oauth2-token) | `no` | The security token that represents the identity of the party on behalf of whom the request is being made. |
+| actor | [`oauth2Token`](#oauth2-token) | `no` | The security token that represents the identity of the acting party. |
##### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: oauth2-authentication-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- sampleTask:
call: http
with:
method: get
- endpoint:
+ endpoint:
uri: https://secured.fake.com/sample
authentication:
oauth2:
@@ -1225,8 +1222,8 @@ do:
client:
id: workflow-runtime
secret: "**********"
- scopes: [ api ]
- audiences: [ runtime ]
+ scopes: [api]
+ audiences: [runtime]
```
##### OAUTH2 Token
@@ -1235,10 +1232,10 @@ Represents the definition of an OAUTH2 token
###### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| token | `string` | `yes` | The security token to use to use. |
-| type | `string` | `yes` | The type of security token to use. |
+| Property | Type | Required | Description |
+| -------- | :------: | :------: | ---------------------------------- |
+| token | `string` | `yes` | The security token to use to use. |
+| type | `string` | `yes` | The type of security token to use. |
### Extension
@@ -1248,22 +1245,23 @@ Extensions enable the execution of tasks prior to those they extend, offering th
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| extend | `string` | `yes` | The type of task to extend
Supported values are: `call`, `composite`, `emit`, `extension`, `for`, `listen`, `raise`, `run`, `set`, `switch`, `try`, `wait` and `all` |
-| when | `string` | `no` | A runtime expression used to determine whether or not the extension should apply in the specified context |
-| before | [`map[string, task][]`](#task) | `no` | The task to execute, if any, before the extended task |
-| after | [`map[string, task][]`](#task) | `no` | The task to execute, if any, after the extended task |
+| Property | Type | Required | Description |
+| -------- | :----------------------------: | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| extend | `string` | `yes` | The type of task to extend
Supported values are: `call`, `composite`, `emit`, `extension`, `for`, `listen`, `raise`, `run`, `set`, `switch`, `try`, `wait` and `all` |
+| when | `string` | `no` | A runtime expression used to determine whether or not the extension should apply in the specified context |
+| before | [`map[string, task][]`](#task) | `no` | The task to execute, if any, before the extended task |
+| after | [`map[string, task][]`](#task) | `no` | The task to execute, if any, after the extended task |
#### Examples
-*Perform logging before and after any non-extension task is run:*
+_Perform logging before and after any non-extension task is run:_
+
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: test
name: logging-extension-example
- version: '0.1.0'
+ version: "0.1.0"
use:
extensions:
- logging:
@@ -1292,13 +1290,14 @@ do:
endpoint: https://fake.com/sample
```
-*Intercept HTTP calls to 'https://mocked.service.com' and mock its response:*
+_Intercept HTTP calls to 'https://mocked.service.com' and mock its response:_
+
```yaml
-document:
- dsl: '1.0.0-alpha1'
+document:
+ dsl: "1.0.0-alpha1"
namespace: test
name: intercept-extension-example
- version: '0.1.0'
+ version: "0.1.0"
use:
extensions:
- mockService:
@@ -1328,13 +1327,13 @@ Defines the [Problem Details RFC](https://datatracker.ietf.org/doc/html/rfc7807)
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| type | `string` | `yes` | A URI reference that identifies the [`error`](#error) type.
For cross-compatibility concerns, it is strongly recommended to use [Standard Error Types](#standard-error-types) whenever possible.
Runtimes **MUST** ensure that the property has been set when raising or escalating the [`error`](#error). |
-| status | `integer` | `yes` | The status code generated by the origin for this occurrence of the [`error`](#error).
For cross-compatibility concerns, it is strongly recommended to use [HTTP Status Codes](https://datatracker.ietf.org/doc/html/rfc7231#section-6) whenever possible.
Runtimes **MUST** ensure that the property has been set when raising or escalating the [`error`](#error). |
-| instance | `string` | `yes` | A [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) used to reference the component the [`error`](#error) originates from.
Runtimes **MUST** set the property when raising or escalating the [`error`](#error). Otherwise ignore. |
-| title | `string` | `no` | A short, human-readable summary of the [`error`](#error). |
-| detail | `string` | `no` | A human-readable explanation specific to this occurrence of the [`error`](#error). |
+| Property | Type | Required | Description |
+| -------- | :-------: | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| type | `string` | `yes` | A URI reference that identifies the [`error`](#error) type.
For cross-compatibility concerns, it is strongly recommended to use [Standard Error Types](#standard-error-types) whenever possible.
Runtimes **MUST** ensure that the property has been set when raising or escalating the [`error`](#error). |
+| status | `integer` | `yes` | The status code generated by the origin for this occurrence of the [`error`](#error).
For cross-compatibility concerns, it is strongly recommended to use [HTTP Status Codes](https://datatracker.ietf.org/doc/html/rfc7231#section-6) whenever possible.
Runtimes **MUST** ensure that the property has been set when raising or escalating the [`error`](#error). |
+| instance | `string` | `yes` | A [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) used to reference the component the [`error`](#error) originates from.
Runtimes **MUST** set the property when raising or escalating the [`error`](#error). Otherwise ignore. |
+| title | `string` | `no` | A short, human-readable summary of the [`error`](#error). |
+| detail | `string` | `no` | A human-readable explanation specific to this occurrence of the [`error`](#error). |
#### Examples
@@ -1348,18 +1347,18 @@ status: 503
Standard error types serve the purpose of categorizing errors consistently across different runtimes, facilitating seamless migration from one runtime environment to another.
-| Type | Status¹ | Description |
-|------|:-------:|-------------|
-| [https://https://serverlessworkflow.io/spec/1.0.0/errors/configuration](#) | `400` | Errors resulting from incorrect or invalid configuration settings, such as missing or misconfigured environment variables, incorrect parameter values, or configuration file errors. |
-| [https://https://serverlessworkflow.io/spec/1.0.0/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. |
-| [https://https://serverlessworkflow.io/spec/1.0.0/errors/expression](#) | `400` | Errors occurring during the evaluation of runtime expressions, such as invalid syntax or unsupported operations. |
-| [https://https://serverlessworkflow.io/spec/1.0.0/errors/authentication](#) | `401` | Errors related to authentication failures. |
-| [https://https://serverlessworkflow.io/spec/1.0.0/errors/authorization](#) | `403` | Errors related to unauthorized access attempts or insufficient permissions to perform certain actions within the workflow. |
-| [https://https://serverlessworkflow.io/spec/1.0.0/errors/timeout](#) | `408` | Errors caused by timeouts during the execution of tasks or during interactions with external services. |
-| [https://https://serverlessworkflow.io/spec/1.0.0/errors/communication](#) | `500` | Errors encountered while communicating with external services, including network errors, service unavailable, or invalid responses. |
-| [https://https://serverlessworkflow.io/spec/1.0.0/errors/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. |
+| Type | Status¹ | Description |
+| --------------------------------------------------------------------------- | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [https://https://serverlessworkflow.io/spec/1.0.0/errors/configuration](#) | `400` | Errors resulting from incorrect or invalid configuration settings, such as missing or misconfigured environment variables, incorrect parameter values, or configuration file errors. |
+| [https://https://serverlessworkflow.io/spec/1.0.0/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. |
+| [https://https://serverlessworkflow.io/spec/1.0.0/errors/expression](#) | `400` | Errors occurring during the evaluation of runtime expressions, such as invalid syntax or unsupported operations. |
+| [https://https://serverlessworkflow.io/spec/1.0.0/errors/authentication](#) | `401` | Errors related to authentication failures. |
+| [https://https://serverlessworkflow.io/spec/1.0.0/errors/authorization](#) | `403` | Errors related to unauthorized access attempts or insufficient permissions to perform certain actions within the workflow. |
+| [https://https://serverlessworkflow.io/spec/1.0.0/errors/timeout](#) | `408` | Errors caused by timeouts during the execution of tasks or during interactions with external services. |
+| [https://https://serverlessworkflow.io/spec/1.0.0/errors/communication](#) | `500` | Errors encountered while communicating with external services, including network errors, service unavailable, or invalid responses. |
+| [https://https://serverlessworkflow.io/spec/1.0.0/errors/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.*
+¹ _Default value. The `status code` that best describe the error should always be used._
### Event Consumption Strategy
@@ -1367,11 +1366,11 @@ Represents the configuration of an event consumption strategy.
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| all | [`eventFilter[]`](#event-filter) | `no` | Configures the workflow to wait for all defined events before resuming execution.
*Required if `any` and `one` have not been set.* |
-| any | [`eventFilter[]`](#event-filter) | `no` | Configures the workflow to wait for any of the defined events before resuming execution.
*Required if `all` and `one` have not been set.* |
-| one | [`eventFilter`](#event-filter) | `no` | Configures the workflow to wait for the defined event before resuming execution.
*Required if `all` and `any` have not been set.* |
+| Property | Type | Required | Description |
+| -------- | :------------------------------: | :------: | -------------------------------------------------------------------------------------------------------------------------------------------- |
+| all | [`eventFilter[]`](#event-filter) | `no` | Configures the workflow to wait for all defined events before resuming execution.
_Required if `any` and `one` have not been set._ |
+| any | [`eventFilter[]`](#event-filter) | `no` | Configures the workflow to wait for any of the defined events before resuming execution.
_Required if `all` and `one` have not been set._ |
+| one | [`eventFilter`](#event-filter) | `no` | Configures the workflow to wait for the defined event before resuming execution.
_Required if `all` and `any` have not been set._ |
### Event Filter
@@ -1379,10 +1378,10 @@ An event filter is a mechanism used to selectively process or handle events base
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| with | `object` | `yes` | A name/value mapping of the attributes filtered events must define. Supports both regular expressions and runtime expressions. |
-| correlate | [`map[string, correlation]`](#correlation) | `no` | A name/definition mapping of the correlations to attempt when filtering events. |
+| Property | Type | Required | Description |
+| --------- | :----------------------------------------: | :------: | ------------------------------------------------------------------------------------------------------------------------------ |
+| with | `object` | `yes` | A name/value mapping of the attributes filtered events must define. Supports both regular expressions and runtime expressions. |
+| correlate | [`map[string, correlation]`](#correlation) | `no` | A name/definition mapping of the correlations to attempt when filtering events. |
### Correlation
@@ -1390,10 +1389,10 @@ A correlation is a link between events and data, established by mapping event at
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| from | `string` | `yes` | A runtime expression used to extract the correlation value from the filtered event. |
-| expect | `string` | `no` | A constant or a runtime expression, if any, used to determine whether or not the extracted correlation value matches expectations.
If not set, the first extracted value will be used as the correlation's expectation. |
+| Property | Type | Required | Description |
+| -------- | :------: | :------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| from | `string` | `yes` | A runtime expression used to extract the correlation value from the filtered event. |
+| expect | `string` | `no` | A constant or a runtime expression, if any, used to determine whether or not the extracted correlation value matches expectations.
If not set, the first extracted value will be used as the correlation's expectation. |
### Retry
@@ -1401,42 +1400,42 @@ The Retry is a fundamental concept in the Serverless Workflow DSL, used to defin
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| when | `string` | `no` | A a runtime expression used to determine whether or not to retry running the task, in a given context. |
-| exceptWhen | `string` | `no` | A runtime expression used to determine whether or not to retry running the task, in a given context. |
-| limit | [`retry`](#retry-limit) | `no` | The limits, if any, to impose to the retry policy. |
-| backoff | [`backoff`](#backoff) | `no` | The backoff strategy to use, if any. |
-| jitter | [`jitter`](#jitter) | `no` | The parameters, if any, that control the randomness or variability of the delay between retry attempts. |
+| Property | Type | Required | Description |
+| ---------- | :---------------------: | :------: | ------------------------------------------------------------------------------------------------------- |
+| when | `string` | `no` | A a runtime expression used to determine whether or not to retry running the task, in a given context. |
+| exceptWhen | `string` | `no` | A runtime expression used to determine whether or not to retry running the task, in a given context. |
+| limit | [`retry`](#retry-limit) | `no` | The limits, if any, to impose to the retry policy. |
+| backoff | [`backoff`](#backoff) | `no` | The backoff strategy to use, if any. |
+| jitter | [`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 | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| attempt.count | `integer` | `no` | The maximum attempts count. |
-| attempt.duration | [`duration`](#duration) | `no` | The duration limit, if any, for all retry attempts. |
-| duration | [`duration`](#duration) | `no` | The maximum duration, if any, during which to retry a given task. |
+| Property | Type | Required | Description |
+| ---------------- | :---------------------: | :------: | ----------------------------------------------------------------- |
+| attempt.count | `integer` | `no` | The maximum attempts count. |
+| attempt.duration | [`duration`](#duration) | `no` | The duration limit, if any, for all retry attempts. |
+| duration | [`duration`](#duration) | `no` | The maximum duration, if any, during which to retry a given task. |
#### Backoff
The definition of a retry backoff strategy.
-| Property | 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.* |
+| Property | 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 | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| from | [`duration`](#duration) | `yes` | The minimum duration of the jitter range. |
-| to | [`duration`](#duration) | `yes` | The maximum duration of the jitter range. |
+| Property | Type | Required | Description |
+| -------- | :---------------------: | :------: | ----------------------------------------- |
+| from | [`duration`](#duration) | `yes` | The minimum duration of the jitter range. |
+| to | [`duration`](#duration) | `yes` | The maximum duration of the jitter range. |
#### Examples
@@ -1454,10 +1453,10 @@ When set, runtimes must validate input data against the defined schema, unless d
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate 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](#runtime-expressions), if any, used to filter and/or mutate the workflow/task input. |
+| Property | Type | Required | Description |
+| -------- | :------------------: | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate 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](#runtime-expressions), if any, used to filter and/or mutate the workflow/task input. |
#### Examples
@@ -1469,7 +1468,7 @@ schema:
properties:
petId:
type: string
- required: [ petId ]
+ required: [petId]
from: .order.pet
```
@@ -1483,11 +1482,11 @@ When set, runtimes must validate output data against the defined schema, unless
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate output data.
*Even though the schema is not required, it is strongly encouraged to document it, whenever feasible.* |
-| from | `string`
`object` | `no` | A [runtime expression](#runtime-expressions), if any, used to filter and/or mutate the workflow/task output. |
-| to | `string`
`object` | `no` | A [runtime expression](#runtime-expressions), if any, used to update the context, using both output and context data. |
+| Property | Type | Required | Description |
+| -------- | :------------------: | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate output data.
_Even though the schema is not required, it is strongly encouraged to document it, whenever feasible._ |
+| from | `string`
`object` | `no` | A [runtime expression](#runtime-expressions), if any, used to filter and/or mutate the workflow/task output. |
+| to | `string`
`object` | `no` | A [runtime expression](#runtime-expressions), if any, used to update the context, using both output and context data. |
#### Examples
@@ -1499,34 +1498,34 @@ schema:
properties:
petId:
type: string
- required: [ petId ]
+ required: [petId]
from:
- petId: '${ .pet.id }'
-to: '.petList += [ . ]'
+ petId: "${ .pet.id }"
+to: ".petList += [ . ]"
```
### 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 existing context.
+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.
-Optionally, the context might have an associated schema.
+Optionally, the context might have an associated schema.
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate context.
*Included to handle the non frequent 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. |
+| Property | Type | Required | Description |
+| -------- | :------------------: | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
+| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate context.
_Included to handle the non frequent 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.
+Merge the task output into the current context.
```yaml
-as: '.+$output'
+as: ".+$output"
```
-Replace the context with the task output.
+Replace the context with the task output.
```yaml
as: $output
@@ -1538,15 +1537,16 @@ Describes a data schema.
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| format | `string` | `yes` | The schema format.
*Supported values are:*
*- `json`, which indicates the [JsonSchema](https://json-schema.org/) format.* |
-| document | `object` | `no` | The inline schema document.
*Required if `resource` has not been set, otherwise ignored.* |
-| resource | [`externalResource`](#external-resource) | `no` | The schema external resource.
*Required if `document` has not been set, otherwise ignored.* |
+| Property | Type | Required | Description |
+| -------- | :--------------------------------------: | :------: | ------------------------------------------------------------------------------------------------------------------------------- |
+| format | `string` | `yes` | The schema format.
_Supported values are:_
_- `json`, which indicates the [JsonSchema](https://json-schema.org/) format._ |
+| document | `object` | `no` | The inline schema document.
_Required if `resource` has not been set, otherwise ignored._ |
+| resource | [`externalResource`](#external-resource) | `no` | The schema external resource.
_Required if `document` has not been set, otherwise ignored._ |
#### Examples
-*Example of an inline JsonSchema:*
+_Example of an inline JsonSchema:_
+
```yaml
format: json
document:
@@ -1558,10 +1558,11 @@ document:
type: string
lastName:
type: string
- required: [ id, firstName, lastName ]
+ required: [id, firstName, lastName]
```
-*Example of a JsonSchema based on an external resource:*
+_Example of a JsonSchema based on an external resource:_
+
```yaml
format: json
resource:
@@ -1574,18 +1575,18 @@ Defines a workflow or task timeout.
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| after | [`duration`](#duration) | `yes` | The duration after which the workflow or task times out. |
+| Property | Type | Required | Description |
+| -------- | :---------------------: | :------: | -------------------------------------------------------- |
+| after | [`duration`](#duration) | `yes` | The duration after which the workflow or task times out. |
#### Examples
```yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: default
name: timeout-example
- version: '0.1.0'
+ version: "0.1.0"
do:
- waitAMinute:
wait:
@@ -1601,17 +1602,18 @@ Defines a duration.
#### Properties
-| Property | 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. |
+| Property | 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:*
+_Example of a duration of 2 hours, 15 minutes and 30 seconds:_
+
```yaml
hours: 2
minutes: 15
@@ -1624,12 +1626,12 @@ Describes an HTTP response.
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| request | [`request`](#http-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.
*If the request's content type is one of the following, should contain the deserialized response content. Otherwise, should contain the base-64 encoded response content, if any.*|
+| Property | Type | Required | Description |
+| ---------- | :------------------------: | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| request | [`request`](#http-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.
_If the request's content type is one of the following, should contain the deserialized response content. Otherwise, should contain the base-64 encoded response content, if any._ |
#### Examples
@@ -1654,11 +1656,11 @@ Describes an HTTP request.
#### Properties
-| Property | Type | Required | Description |
-|----------|:----:|:--------:|-------------|
-| method | `string` | `yes` | The request's method. |
-| uri | `uri` | `yes` | The request's URI. |
-| headers | `map[string, string]` | `no` | The HTTP request headers, if any. |
+| Property | Type | Required | Description |
+| -------- | :-------------------: | :------: | --------------------------------- |
+| method | `string` | `yes` | The request's method. |
+| uri | `uri` | `yes` | The request's URI. |
+| headers | `map[string, string]` | `no` | The HTTP request headers, if any. |
#### Examples
@@ -1667,4 +1669,4 @@ method: get
uri: https://petstore.swagger.io/v2/pet/1
headers:
Content-Type: application/json
-```
\ No newline at end of file
+```
diff --git a/dsl.md b/dsl.md
index 44abfaca..6c38af0e 100644
--- a/dsl.md
+++ b/dsl.md
@@ -6,31 +6,31 @@
- [Motivation](#motivation)
- [Design](#design)
- [Concepts](#concepts)
- + [Workflow](#workflow)
+ - [Workflow](#workflow)
- [Status Phases](#status-phases)
- [Components](#components)
- + [Task](#task)
+ - [Task](#task)
- [Scheduling](#scheduling)
- + [Task Flow](#task-flow)
- + [Data Flow](#data-flow)
- + [Runtime Expressions](#runtime-expressions)
+ - [Task Flow](#task-flow)
+ - [Data Flow](#data-flow)
+ - [Runtime Expressions](#runtime-expressions)
- [Arguments](#runtime-expression-arguments)
- + [Fault Tolerance](#fault-tolerance)
- + [Timeouts](#timeouts)
- + [Interoperability](#interoperability)
+ - [Fault Tolerance](#fault-tolerance)
+ - [Timeouts](#timeouts)
+ - [Interoperability](#interoperability)
- [Supported Protocols](#supported-protocols)
- [Custom and Non-Standard Interactions](#custom-and-non-standard-interactions)
- [Creating a Custom Function](#creating-a-custom-function)
- [Using a Custom Function](#using-a-custom-function)
- [Publishing a Custom Function](#publishing-a-custom-function)
- + [Events](#events)
- + [Extensions](#extensions)
- + [External Resources](#external-resources)
- + [Authentication](#authentication)
+ - [Events](#events)
+ - [Extensions](#extensions)
+ - [External Resources](#external-resources)
+ - [Authentication](#authentication)
## Abstract
-This document proposes the creation of a Domain Specific Language (DSL) called Serverless Workflow, tailored for building platform agnostic workflows.
+This document proposes the creation of a Domain Specific Language (DSL) called Serverless Workflow, tailored for building platform agnostic workflows.
Serverless Workflow aims to simplify the orchestration of complex processes across diverse environments, providing developers with a unified syntax and set of tools for defining and executing serverless workflows.
@@ -60,9 +60,9 @@ Moreover, the DSL eschews strong-typed enumerations wherever feasible, fostering
### Workflow
-A Serverless Workflow is a sequence of specific [tasks](dsl-reference.md#tasks) that are executed in a defined order. By default, this order follows the declaration sequence within the workflow definition. Workflows are designed to automate processes and orchestrate various serverless functions and services.
+A Serverless Workflow is a sequence of specific [tasks](dsl-reference.md#tasks) that are executed in a defined order. By default, this order follows the declaration sequence within the workflow definition. Workflows are designed to automate processes and orchestrate various serverless functions and services.
-Workflows can be triggered in different ways: upon request, scheduled using CRON expressions, or initiated upon correlation with specific events.
+Workflows can be triggered in different ways: upon request, scheduled using CRON expressions, or initiated upon correlation with specific events.
Additionally, workflows may optionally accept inputs and produce outputs, allowing for data processing and transformation within the workflow execution.
@@ -70,18 +70,18 @@ Additionally, workflows may optionally accept inputs and produce outputs, allowi
Workflows in the Serverless Workflow DSL can exist in several phases, each indicating the current state of the workflow execution. These phases include:
-| Phase | Description |
-| --- | --- |
-| `pending` | The workflow has been initiated and is pending execution. |
-| `running` | The workflow is currently in progress. |
-| `waiting` | The workflow execution has been paused or halted temporarily and is waiting for something to happen. |
-| `cancelled` | The workflow execution has been terminated before completion. |
-| `faulted` | The workflow execution has encountered an error. |
-| `completed` | The workflow execution has successfully finished all tasks. |
+| Phase | Description |
+| ----------- | ---------------------------------------------------------------------------------------------------- |
+| `pending` | The workflow has been initiated and is pending execution. |
+| `running` | The workflow is currently in progress. |
+| `waiting` | The workflow execution has been paused or halted temporarily and is waiting for something to happen. |
+| `cancelled` | The workflow execution has been terminated before completion. |
+| `faulted` | The workflow execution has encountered an error. |
+| `completed` | The workflow execution has successfully finished all tasks. |
-Additionally, the flow of execution within a workflow can be controlled using [directives*](dsl-reference.md#flow-directive), which provide instructions to the workflow engine on how to manage and handle specific aspects of workflow execution.
+Additionally, the flow of execution within a workflow can be controlled using [directives\*](dsl-reference.md#flow-directive), which provide instructions to the workflow engine on how to manage and handle specific aspects of workflow execution.
-**To learn more about flow directives and how they can be utilized to control the execution and behavior of workflows, please refer to [Flow Directives](dsl-reference.md#flow-directive).*
+\*_To learn more about flow directives and how they can be utilized to control the execution and behavior of workflows, please refer to [Flow Directives](dsl-reference.md#flow-directive)._
#### Components
@@ -107,9 +107,9 @@ The Serverless Workflow DSL defines several default [task](dsl-reference.md#task
- [For](dsl-reference.md#for), used to iterate over a collection of items, and conditionally perform a task for each of them.
- [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), a [script](dsl-reference.md#script) or event a [shell](dsl-reference.md#shell) command.
+- [Run](dsl-reference.md#run), used to run a [container](dsl-reference.md#container), a [script](dsl-reference.md#script) or event a [shell](dsl-reference.md#shell) command.
- [Switch](dsl-reference.md#switch), used to dynamically select and execute one of multiple alternative paths based on specified conditions
-- [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 or update the [workflow](dsl-reference.md#workflow)'s data during the its execution.
- [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.
@@ -123,9 +123,9 @@ Runtime **must** implement a mechanism capable of providing the workflow with th
#### Scheduling
-Workflow scheduling in ServerlessWorkflow allows developers to specify when and how their workflows should be executed, ensuring timely response to events and efficient resource utilization. It offers four key properties: `every`, `cron`, `after`, and `on`.
+Workflow scheduling in ServerlessWorkflow allows developers to specify when and how their workflows should be executed, ensuring timely response to events and efficient resource utilization. It offers four key properties: `every`, `cron`, `after`, and `on`.
-- The `every` property defines the interval for workflow execution, ensuring periodic runs regardless of the previous run's status.
+- The `every` property defines the interval for workflow execution, ensuring periodic runs regardless of the previous run's status.
- With `cron`, developers can use CRON expressions to schedule workflow execution at specific times or intervals.
- `after` specifies a delay duration before restarting the workflow after completion.
- `on` enables event-driven scheduling, triggering workflow execution based on specified events.
@@ -140,43 +140,43 @@ Once the task has been executed, different things can happen:
- `continue`: the task ran to completion, and the next task, if any, should be executed. The task to run next is implictly the next in declaration order, or explicitly defined by the `then` property of the executed task. If the executed task is the last task, then the workflow's execution gracefully ends.
- `fault`: the task raised an uncaught error, which abruptly halts the workflow's execution and makes it transition to `faulted` [status phase](#status-phases).
-- `end`: the task explicitly and gracefully ends the workflow's execution.
+- `end`: the task explicitly and gracefully ends the workflow's execution.
### Data Flow
-In Serverless Workflow DSL, data flow management is crucial to ensure that the right data is passed between tasks and to the workflow itself.
+In Serverless Workflow DSL, data flow management is crucial to ensure that the right data is passed between tasks and to the workflow itself.
Here's how data flows through a workflow based on various filtering stages:
1. **Filter Workflow Input**
-Before the workflow starts, the input data provided to the workflow can be filtered to ensure only relevant data is passed into the workflow context. This step allows the workflow to start with a clean and focused dataset, reducing potential overhead and complexity in subsequent tasks.
+ Before the workflow starts, the input data provided to the workflow can be filtered to ensure only relevant data is passed into the workflow context. This step allows the workflow to start with a clean and focused dataset, reducing potential overhead and complexity in subsequent tasks.
-*Example: If the workflow receives a JSON object as input, a filter can be applied to remove unnecessary fields and retain only those that are required for the workflow's execution.*
+_Example: If the workflow receives a JSON object as input, a filter can be applied to remove unnecessary fields and retain only those that are required for the workflow's execution._
2. **Filter First Task Input**
-The input data for the first task can be filtered to match the specific requirements of that task. This ensures that the first task receives only the necessary data it needs to perform its operations.
+ The input data for the first task can be filtered to match the specific requirements of that task. This ensures that the first task receives only the necessary data it needs to perform its operations.
-*Example: If the first task is a function call that only needs a subset of the workflow input, a filter can be applied to provide only those fields needed for the function to execute.*
+_Example: If the first task is a function call that only needs a subset of the workflow input, a filter can be applied to provide only those fields needed for the function to execute._
3. **Filter First Task Output**
-After the first task completes, its output can be filtered before passing it to the next task or storing it in the workflow context. This helps in managing the data flow and keeping the context clean by removing any unnecessary data produced by the task.
+ After the first task completes, its output can be filtered before passing it to the next task or storing it in the workflow context. This helps in managing the data flow and keeping the context clean by removing any unnecessary data produced by the task.
-*Example: If the first task returns a large dataset, a filter can be applied to retain only the relevant results needed for subsequent tasks.*
+_Example: If the first task returns a large dataset, a filter can be applied to retain only the relevant results needed for subsequent tasks._
4. **Filter Last Task Input**
-Before the last task in the workflow executes, its input data can be filtered to ensure it receives only the necessary information. This step is crucial for ensuring that the final task has all the required data to complete the workflow successfully.
+ Before the last task in the workflow executes, its input data can be filtered to ensure it receives only the necessary information. This step is crucial for ensuring that the final task has all the required data to complete the workflow successfully.
-*Example: If the last task involves generating a report, the input filter can ensure that only the data required for the report generation is passed to the task.*
+_Example: If the last task involves generating a report, the input filter can ensure that only the data required for the report generation is passed to the task._
5. **Filter Last Task Output**
-After the last task completes, its output can be filtered before it is considered as the workflow output. This ensures that the workflow produces a clean and relevant output, free from any extraneous data that might have been generated during the task execution.
+ After the last task completes, its output can be filtered before it is considered as the workflow output. This ensures that the workflow produces a clean and relevant output, free from any extraneous data that might have been generated during the task execution.
-*Example: If the last task outputs various statistics, a filter can be applied to retain only the key metrics that are relevant to the stakeholders.*
+_Example: If the last task outputs various statistics, a filter can be applied to retain only the key metrics that are relevant to the stakeholders._
6. **Filter Workflow Output**
-Finally, the overall workflow output can be filtered before it is returned to the caller or stored. This step ensures that the final output of the workflow is concise and relevant, containing only the necessary information that needs to be communicated or recorded.
+ Finally, the overall workflow output can be filtered before it is returned to the caller or stored. This step ensures that the final output of the workflow is concise and relevant, containing only the necessary information that needs to be communicated or recorded.
-*Example: If the workflow's final output is a summary report, a filter can ensure that the report contains only the most important summaries and conclusions, excluding any intermediate data.*
+_Example: If the workflow's final output is a summary report, a filter can ensure that the report contains only the most important summaries and conclusions, excluding any intermediate data._
By applying filters at these strategic points, Serverless Workflow DSL ensures that data flows through the workflow in a controlled and efficient manner, maintaining clarity and relevance at each stage of execution. This approach helps in managing complex workflows and ensures that each task operates with the precise data it requires, leading to more predictable and reliable workflow outcomes.
@@ -200,11 +200,11 @@ When the evaluation of an expression fails, runtimes **must** raise an error wit
#### Runtime expression arguments
-| Name | Type | Description |
-|:-----|:----:|:------------|
-| context | `map` | The task's context data. |
-| input | `any` | The task's filtered input. |
-| task | [`taskDescriptor`](#task-descriptor) | Describes the current task. |
+| Name | Type | Description |
+| :------- | :-----------------------------------------: | :------------------------------ |
+| context | `map` | The task's context data. |
+| input | `any` | The task's filtered input. |
+| task | [`taskDescriptor`](#task-descriptor) | Describes the current task. |
| workflow | [`workflowDescritor`](#workflow-descriptor) | Describes the current workflow. |
### Fault Tolerance
@@ -217,7 +217,8 @@ Overall, the fault tolerance features in Serverless Workflow enhance its robustn
Errors in Serverless Workflow are described using the [Problem Details RFC](https://datatracker.ietf.org/doc/html/rfc7807). This specification helps to standardize the way errors are communicated, using the `instance` property as a [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) to identify the specific component of the workflow that has raised the error. By adhering to this standard, authors and runtimes can consistently describe and handle errors.
-*Example error:*
+_Example error:_
+
```yaml
type: https://https://serverlessworkflow.io/spec/1.0.0/errors/communication
title: Service Unavailable
@@ -234,7 +235,8 @@ See the [DSL reference](dsl-reference.md#error) for more details about errors.
Errors are critical for both authors and runtimes as they provide a means to communicate and describe the occurrence of problems. This, in turn, enables the definition of mechanisms to catch and act upon these errors. For instance, some errors caught using a [`try`](dsl-reference.md#try) block may be transient and temporary, such as a `503 Service Unavailable`. In such cases, the DSL provides a mechanism to retry a faulted task, allowing for recovery from temporary issues.
-*Retrying 5 times when an error with 503 is caught:*
+_Retrying 5 times when an error with 503 is caught:_
+
```yaml
try:
call: http
@@ -269,7 +271,8 @@ A timeout error **must** have its `type` set to `https://https://serverlessworkf
Serverless Workflow DSL is designed to seamlessly interact with a variety of services, ensuring robust service interoperability.
#### Supported Protocols
- - [**HTTP**](dsl-reference.md#http-call): Allows the workflow to make standard HTTP requests to web services. This is useful for RESTful services and web APIs that communicate over the HTTP protocol.
+
+- [**HTTP**](dsl-reference.md#http-call): Allows the workflow to make standard HTTP requests to web services. This is useful for RESTful services and web APIs that communicate over the HTTP protocol.
- [**gRPC**](dsl-reference.md#grpc-call): Supports Remote Procedure Call (RPC) using gRPC, a high-performance, open-source universal RPC framework. This is suitable for connecting to services that require low-latency and high-throughput communication.
- [**AsyncAPI**](dsl-reference.md#asyncapi-call): Facilitates interaction with asynchronous messaging protocols. AsyncAPI is designed for event-driven architectures, allowing workflows to publish and subscribe to events.
- [**OpenAPI**](dsl-reference.md#openapi-call): Enables communication with services that provide OpenAPI specifications, which is useful for defining and consuming RESTful APIs.
@@ -278,13 +281,13 @@ Runtimes **must** raise an error with type `https://https://serverlessworkflow.i
#### Custom and Non-Standard Interactions
- In addition to the default supported protocols, the DSL also provides mechanisms to interact with services in non-standard or unsupported ways using custom processes. This flexibility allows workflows to extend their capabilities beyond the built-in protocols and integrate with any service, regardless of the communication method.
+In addition to the default supported protocols, the DSL also provides mechanisms to interact with services in non-standard or unsupported ways using custom processes. This flexibility allows workflows to extend their capabilities beyond the built-in protocols and integrate with any service, regardless of the communication method.
For custom interactions, the workflow can define [tasks](dsl-reference.md#run) that [execute shell commands](dsl-reference.md#shell-process), [execute scripts](dsl-reference.md#script-process) or [run containers](dsl-reference.md#container-process) to handle unique service communication requirements. This ensures that the workflow can still maintain interoperability even with services that do not adhere to the standard supported protocols.
##### Creating a Custom Function
-Serverless Workflow DSL supports the creation and publication of custom functions to extend the DSL capabilities.
+Serverless Workflow DSL supports the creation and publication of custom functions to extend the DSL capabilities.
Custom functions allow you to define specific tasks and interactions that are not covered by the default supported protocols. Here’s how you can define and use custom functions within your workflows.
@@ -319,10 +322,9 @@ validateEmailAddress:
}
const emailAddress = '${ .emailAddress }';
return { isValid: validateEmail(emailAddress) };
-
```
-3. Optionally, add all the local files your function might need into its directory.
+3. Optionally, add all the local files your function might need into its directory.
4. Commit and push your function to your repository.
@@ -330,17 +332,17 @@ validateEmailAddress:
##### Using a Custom Function
-Once a custom function is defined, it can be used within a workflow to perform specific tasks.
+Once a custom function is defined, it can be used within a workflow to perform specific tasks.
The following example demonstrates how to use the `validateEmailAddress` custom function in a workflow.
```yaml
# workflow.yaml
document:
- dsl: '1.0.0-alpha1'
+ dsl: "1.0.0-alpha1"
namespace: default
name: customFunctionWorkflow
- version: '0.1.0'
+ version: "0.1.0"
do:
- validateEmail:
@@ -351,7 +353,7 @@ do:
##### Publishing a Custom Function
-Consider submitting your function to the Serverless Workflow Function Registry.
+Consider submitting your function to the Serverless Workflow Function Registry.
This optional step allows users to discover and utilize your function, enhancing its visibility and usability within the Serverless Workflow community. By registering your function, you contribute to a shared repository of resources that can streamline workflow development for others.
@@ -363,7 +365,7 @@ Events in Serverless Workflow adhere to the [Cloud Events specification](https:/
#### Emitting Events
-The Emit task allows workflows to publish events to event brokers or messaging systems. This capability enables workflows to broadcast notifications about various events, such as order placements, data updates, or system events.
+The Emit task allows workflows to publish events to event brokers or messaging systems. This capability enables workflows to broadcast notifications about various events, such as order placements, data updates, or system events.
By emitting events, workflows can seamlessly integrate with event-driven architectures, facilitating event-driven decision-making and enabling reactive behavior based on incoming events. For example, a workflow handling order processing might emit an event signaling the successful placement of an order, triggering downstream processes like inventory management or shipping.
@@ -401,7 +403,8 @@ Overall, extensions empower developers to build complex workflows with enhanced
See the [DSL reference](dsl-reference.md#extension) for more details about extensions.
-*Sample logging extension:*
+_Sample logging extension:_
+
```yaml
document:
dsl: '1.0.0-alpha1'
@@ -438,9 +441,9 @@ do:
### External Resources
-External resources in Serverless Workflow allow you to define and access external assets or services required for workflow execution.
+External resources in Serverless Workflow allow you to define and access external assets or services required for workflow execution.
-These resources can include APIs, databases, files, or any other external entities needed by the workflow. Each external resource can be identified by a unique name and is associated with a URI that specifies its location.
+These resources can include APIs, databases, files, or any other external entities needed by the workflow. Each external resource can be identified by a unique name and is associated with a URI that specifies its location.
Optionally, you can specify an authentication policy to ensure secure access to the resource. For instance, you can use basic authentication with a username and password, or you can reference a pre-configured authentication policy by name.
@@ -455,6 +458,7 @@ Amonst others, [external resources](dsl-reference.md#external-resource) and [cal
The Serverless Workflow DSL supports a suite of standard authentication mechanisms, amongst which are:
- **Basic Authentication**: Utilizes a username-password pair for authentication.
+
```yaml
sampleBasic:
basic:
@@ -463,12 +467,14 @@ sampleBasic:
```
- **Bearer Authentication**: Uses a bearer token for authentication.
+
```yaml
sampleBearer:
bearer: ${ .user.token }
```
- **OAuth2 Authentication**: Implements OAuth2 authorization framework for secure access.
+
```yaml
sampleOAuth2:
oauth2:
@@ -477,10 +483,10 @@ sampleOAuth2:
client:
id: workflow-runtime
secret: workflow-runtime-client-secret
- scopes: [ api ]
- audiences: [ runtime ]
+ scopes: [api]
+ audiences: [runtime]
```
These authentication schemes can be defined globally in the authentication section or associated with specific endpoints. They provide secure access to resources while ensuring proper authorization and identity verification.
-See the [DSL reference](dsl-reference.md#authentication) for more details about authentication.
\ No newline at end of file
+See the [DSL reference](dsl-reference.md#authentication) for more details about authentication.
diff --git a/owners.md b/owners.md
index 1fa70c4d..ffa3368c 100644
--- a/owners.md
+++ b/owners.md
@@ -1,7 +1,9 @@
# See the GOVERNANCE.md document for the definition of the roles and responsibilities
+
maintainers:
- - cdavernas
- - ricardozanini
-reviewers:
- - JBBianchi
- - manick02
\ No newline at end of file
+
+- cdavernas
+- ricardozanini
+ reviewers:
+- JBBianchi
+- manick02
diff --git a/schema/workflow.yaml b/schema/workflow.yaml
index d3a20f2f..4b4b36b7 100644
--- a/schema/workflow.yaml
+++ b/schema/workflow.yaml
@@ -32,10 +32,10 @@ properties:
type: object
description: A key/value mapping of the workflow's tags, if any.
additionalProperties: true
- required: [ dsl, namespace, name, version ]
+ required: [dsl, namespace, name, version]
description: Documents the workflow
input:
- $ref: '#/$defs/input'
+ $ref: "#/$defs/input"
description: Configures the workflow's input.
use:
type: object
@@ -43,12 +43,12 @@ properties:
authentications:
type: object
additionalProperties:
- $ref: '#/$defs/authenticationPolicy'
+ $ref: "#/$defs/authenticationPolicy"
description: The workflow's reusable authentication policies.
errors:
type: object
additionalProperties:
- $ref: '#/$defs/error'
+ $ref: "#/$defs/error"
description: The workflow's reusable errors.
extensions:
type: array
@@ -58,17 +58,17 @@ properties:
minProperties: 1
maxProperties: 1
additionalProperties:
- $ref: '#/$defs/extension'
+ $ref: "#/$defs/extension"
description: The workflow's extensions.
functions:
type: object
additionalProperties:
- $ref: '#/$defs/task'
+ $ref: "#/$defs/task"
description: The workflow's reusable functions.
retries:
type: object
additionalProperties:
- $ref: '#/$defs/retryPolicy'
+ $ref: "#/$defs/retryPolicy"
description: The workflow's reusable retry policies.
secrets:
type: array
@@ -78,27 +78,27 @@ properties:
description: Defines the workflow's reusable components.
do:
description: Defines the task(s) the workflow must perform
- $ref: '#/$defs/taskList'
+ $ref: "#/$defs/taskList"
timeout:
- $ref: '#/$defs/timeout'
+ $ref: "#/$defs/timeout"
description: The workflow's timeout configuration, if any.
output:
- $ref: '#/$defs/output'
+ $ref: "#/$defs/output"
description: Configures the workflow's output.
schedule:
type: object
properties:
every:
- $ref: '#/$defs/duration'
+ $ref: "#/$defs/duration"
description: Specifies the duration of the interval at which the workflow should be executed.
cron:
type: string
description: Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight."
after:
- $ref: '#/$defs/duration'
+ $ref: "#/$defs/duration"
description: Specifies a delay duration that the workflow must wait before starting again after it completes.
on:
- $ref: '#/$defs/eventConsumptionStrategy'
+ $ref: "#/$defs/eventConsumptionStrategy"
description: Specifies the events that trigger the workflow execution.
description: Schedules the workflow
$defs:
@@ -110,7 +110,7 @@ $defs:
minProperties: 1
maxProperties: 1
additionalProperties:
- $ref: '#/$defs/task'
+ $ref: "#/$defs/task"
taskBase:
type: object
properties:
@@ -118,41 +118,41 @@ $defs:
type: string
description: A runtime expression, if any, used to determine whether or not the task should be run.
input:
- $ref: '#/$defs/input'
+ $ref: "#/$defs/input"
description: Configure the task's input.
output:
- $ref: '#/$defs/output'
+ $ref: "#/$defs/output"
description: Configure the task's output.
export:
- $ref: '#/$defs/export'
+ $ref: "#/$defs/export"
description: Export task output to context.
timeout:
- $ref: '#/$defs/timeout'
+ $ref: "#/$defs/timeout"
description: The task's timeout configuration, if any.
then:
- $ref: '#/$defs/flowDirective'
+ $ref: "#/$defs/flowDirective"
description: The flow directive to be performed upon completion of the task.
task:
unevaluatedProperties: false
oneOf:
- - $ref: '#/$defs/callTask'
- - $ref: '#/$defs/doTask'
- - $ref: '#/$defs/forkTask'
- - $ref: '#/$defs/emitTask'
- - $ref: '#/$defs/forTask'
- - $ref: '#/$defs/listenTask'
- - $ref: '#/$defs/raiseTask'
- - $ref: '#/$defs/runTask'
- - $ref: '#/$defs/setTask'
- - $ref: '#/$defs/switchTask'
- - $ref: '#/$defs/tryTask'
- - $ref: '#/$defs/waitTask'
+ - $ref: "#/$defs/callTask"
+ - $ref: "#/$defs/doTask"
+ - $ref: "#/$defs/forkTask"
+ - $ref: "#/$defs/emitTask"
+ - $ref: "#/$defs/forTask"
+ - $ref: "#/$defs/listenTask"
+ - $ref: "#/$defs/raiseTask"
+ - $ref: "#/$defs/runTask"
+ - $ref: "#/$defs/setTask"
+ - $ref: "#/$defs/switchTask"
+ - $ref: "#/$defs/tryTask"
+ - $ref: "#/$defs/waitTask"
callTask:
oneOf:
- title: CallAsyncAPI
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ call, with ]
+ required: [call, with]
unevaluatedProperties: false
properties:
call:
@@ -163,7 +163,7 @@ $defs:
type: object
properties:
document:
- $ref: '#/$defs/externalResource'
+ $ref: "#/$defs/externalResource"
description: The document that defines the AsyncAPI operation to call.
operationRef:
type: string
@@ -183,16 +183,16 @@ $defs:
authentication:
description: The authentication policy, if any, to use when calling the AsyncAPI operation.
oneOf:
- - $ref: '#/$defs/authenticationPolicy'
+ - $ref: "#/$defs/authenticationPolicy"
- type: string
- required: [ document, operationRef ]
+ required: [document, operationRef]
additionalProperties: false
description: Defines the AsyncAPI call to perform.
- title: CallGRPC
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
unevaluatedProperties: false
- required: [ call, with ]
+ required: [call, with]
properties:
call:
type: string
@@ -202,7 +202,7 @@ $defs:
type: object
properties:
proto:
- $ref: '#/$defs/externalResource'
+ $ref: "#/$defs/externalResource"
description: The proto resource that describes the GRPC service to call.
service:
type: object
@@ -222,9 +222,9 @@ $defs:
authentication:
description: The endpoint's authentication policy, if any.
oneOf:
- - $ref: '#/$defs/authenticationPolicy'
+ - $ref: "#/$defs/authenticationPolicy"
- type: string
- required: [ name, host ]
+ required: [name, host]
method:
type: string
description: The name of the method to call on the defined GRPC service.
@@ -232,14 +232,14 @@ $defs:
type: object
additionalProperties: true
description: The arguments, if any, to call the method with.
- required: [ proto, service, method ]
+ required: [proto, service, method]
additionalProperties: false
description: Defines the GRPC call to perform.
- title: CallHTTP
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
unevaluatedProperties: false
- required: [ call, with ]
+ required: [call, with]
properties:
call:
type: string
@@ -254,7 +254,7 @@ $defs:
endpoint:
description: The HTTP endpoint to send the request to.
oneOf:
- - $ref: '#/$defs/endpoint'
+ - $ref: "#/$defs/endpoint"
- type: string
format: uri-template
headers:
@@ -264,16 +264,16 @@ $defs:
description: The body, if any, of the HTTP request to perform.
output:
type: string
- enum: [ raw, content, response ]
+ enum: [raw, content, response]
description: The http call output format. Defaults to 'content'.
- required: [ method, endpoint ]
+ required: [method, endpoint]
additionalProperties: false
description: Defines the HTTP call to perform.
- title: CallOpenAPI
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
unevaluatedProperties: false
- required: [ call, with ]
+ required: [call, with]
properties:
call:
type: string
@@ -283,7 +283,7 @@ $defs:
type: object
properties:
document:
- $ref: '#/$defs/externalResource'
+ $ref: "#/$defs/externalResource"
description: The document that defines the OpenAPI operation to call.
operationId:
type: string
@@ -295,20 +295,20 @@ $defs:
authentication:
description: The authentication policy, if any, to use when calling the OpenAPI operation.
oneOf:
- - $ref: '#/$defs/authenticationPolicy'
+ - $ref: "#/$defs/authenticationPolicy"
- type: string
output:
type: string
- enum: [ raw, content, response ]
+ enum: [raw, content, response]
description: The http call output format. Defaults to 'content'.
- required: [ document, operationId ]
+ required: [document, operationId]
additionalProperties: false
description: Defines the OpenAPI call to perform.
- title: CallFunction
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
unevaluatedProperties: false
- required: [ call ]
+ required: [call]
properties:
call:
type: string
@@ -321,35 +321,35 @@ $defs:
description: A name/value mapping of the parameters, if any, to call the function with.
forkTask:
description: Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
unevaluatedProperties: false
- required: [ fork ]
+ required: [fork]
properties:
fork:
type: object
- required: [ branches ]
+ required: [branches]
properties:
branches:
- $ref: '#/$defs/taskList'
+ $ref: "#/$defs/taskList"
compete:
description: Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.
type: boolean
- default: false
+ default: false
doTask:
description: Allows to execute a list of tasks in sequence
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
unevaluatedProperties: false
- required: [ do ]
+ required: [do]
properties:
do:
- $ref: '#/$defs/taskList'
+ $ref: "#/$defs/taskList"
emitTask:
description: Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ emit ]
+ required: [emit]
unevaluatedProperties: false
properties:
emit:
@@ -379,14 +379,14 @@ $defs:
dataschema:
type: string
format: uri
- required: [ source, type ]
+ required: [source, type]
additionalProperties: true
- required: [ event ]
+ required: [event]
forTask:
description: Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ for, do ]
+ required: [for, do]
unevaluatedProperties: false
properties:
for:
@@ -403,45 +403,45 @@ $defs:
type: string
description: The name of the variable used to store the index of the current item being enumerated.
default: index
- required: [ in ]
+ required: [in]
while:
type: string
description: A runtime expression that represents the condition, if any, that must be met for the iteration to continue.
do:
- $ref: '#/$defs/taskList'
+ $ref: "#/$defs/taskList"
listenTask:
description: Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ listen ]
+ required: [listen]
unevaluatedProperties: false
properties:
listen:
type: object
properties:
to:
- $ref: '#/$defs/eventConsumptionStrategy'
+ $ref: "#/$defs/eventConsumptionStrategy"
description: Defines the event(s) to listen to.
- required: [ to ]
+ required: [to]
raiseTask:
description: Intentionally triggers and propagates errors.
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ raise ]
+ required: [raise]
unevaluatedProperties: false
properties:
raise:
type: object
properties:
error:
- $ref: '#/$defs/error'
+ $ref: "#/$defs/error"
description: Defines the error to raise.
- required: [ error ]
+ required: [error]
runTask:
description: Provides the capability to execute external containers, shell commands, scripts, or workflows.
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ run ]
+ required: [run]
unevaluatedProperties: false
properties:
run:
@@ -468,8 +468,8 @@ $defs:
title: ContainerEnvironment
type: object
description: A key/value mapping of the environment variables, if any, to use when running the configured process.
- required: [ image ]
- required: [ container ]
+ required: [image]
+ required: [container]
description: Enables the execution of external processes encapsulated within a containerized environment.
- title: RunScript
properties:
@@ -489,16 +489,16 @@ $defs:
properties:
code:
type: string
- required: [ code ]
+ required: [code]
description: The script's code.
- title: ScriptExternal
properties:
source:
- $ref: '#/$defs/externalResource'
+ $ref: "#/$defs/externalResource"
description: The script's resource.
- required: [ source ]
- required: [ language ]
- required: [ script ]
+ required: [source]
+ required: [language]
+ required: [script]
description: Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages.
- title: RunShell
properties:
@@ -518,8 +518,8 @@ $defs:
type: object
additionalProperties: true
description: A key/value mapping of the environment variables, if any, to use when running the configured process.
- required: [ command ]
- required: [ shell ]
+ required: [command]
+ required: [shell]
description: Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks.
- title: RunWokflow
properties:
@@ -542,14 +542,14 @@ $defs:
type: object
additionalProperties: true
description: The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified.
- required: [ namespace, name, version ]
- required: [ workflow ]
+ required: [namespace, name, version]
+ required: [workflow]
description: Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units.
setTask:
description: A task used to set data
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ set ]
+ required: [set]
unevaluatedProperties: false
properties:
set:
@@ -559,9 +559,9 @@ $defs:
description: The data to set
switchTask:
description: Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ switch ]
+ required: [switch]
unevaluatedProperties: false
properties:
switch:
@@ -581,18 +581,18 @@ $defs:
type: string
description: A runtime expression used to determine whether or not the case matches.
then:
- $ref: '#/$defs/flowDirective'
+ $ref: "#/$defs/flowDirective"
description: The flow directive to execute when the case matches.
tryTask:
description: Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ try, catch ]
+ required: [try, catch]
unevaluatedProperties: false
properties:
try:
description: The task(s) to perform.
- $ref: '#/$defs/taskList'
+ $ref: "#/$defs/taskList"
catch:
type: object
properties:
@@ -609,103 +609,103 @@ $defs:
type: string
description: A runtime expression used to determine whether or not to catch the filtered error
retry:
- $ref: '#/$defs/retryPolicy'
+ $ref: "#/$defs/retryPolicy"
description: The retry policy to use, if any, when catching errors.
do:
description: The definition of the task(s) to run when catching an error.
- $ref: '#/$defs/taskList'
+ $ref: "#/$defs/taskList"
waitTask:
description: Allows workflows to pause or delay their execution for a specified period of time.
- $ref: '#/$defs/taskBase'
+ $ref: "#/$defs/taskBase"
type: object
- required: [ wait ]
+ required: [wait]
unevaluatedProperties: false
properties:
wait:
description: The amount of time to wait.
- $ref: '#/$defs/duration'
+ $ref: "#/$defs/duration"
flowDirective:
additionalProperties: false
anyOf:
- type: string
- enum: [ continue, exit, end ]
+ enum: [continue, exit, end]
default: continue
- type: string
authenticationPolicy:
type: object
oneOf:
- - title: BasicAuthenticationPolicy
- properties:
- basic:
- type: object
- properties:
- username:
- type: string
- description: The username to use.
- password:
- type: string
- description: The password to use.
- required: [ username, password ]
- required: [ basic ]
- description: Use basic authentication.
- - title: BearerAuthenticationPolicy
- properties:
- bearer:
- type: object
- properties:
- token:
- type: string
- description: The bearer token to use.
- required: [ token ]
- required: [ bearer ]
- description: Use bearer authentication.
- - title: OAuth2AuthenticationPolicy
- properties:
- oauth2:
- type: object
- properties:
- authority:
- type: string
- format: uri
- description: The URI that references the OAuth2 authority to use.
- grant:
- type: string
- description: The grant type to use.
- client:
- type: object
- properties:
- id:
+ - title: BasicAuthenticationPolicy
+ properties:
+ basic:
+ type: object
+ properties:
+ username:
+ type: string
+ description: The username to use.
+ password:
+ type: string
+ description: The password to use.
+ required: [username, password]
+ required: [basic]
+ description: Use basic authentication.
+ - title: BearerAuthenticationPolicy
+ properties:
+ bearer:
+ type: object
+ properties:
+ token:
+ type: string
+ description: The bearer token to use.
+ required: [token]
+ required: [bearer]
+ description: Use bearer authentication.
+ - title: OAuth2AuthenticationPolicy
+ properties:
+ oauth2:
+ type: object
+ properties:
+ authority:
+ type: string
+ format: uri
+ description: The URI that references the OAuth2 authority to use.
+ grant:
+ type: string
+ description: The grant type to use.
+ client:
+ type: object
+ properties:
+ id:
+ type: string
+ description: The client id to use.
+ secret:
+ type: string
+ description: The client secret to use, if any.
+ required: [id]
+ scopes:
+ type: array
+ items:
type: string
- description: The client id to use.
- secret:
+ description: The scopes, if any, to request the token for.
+ audiences:
+ type: array
+ items:
type: string
- description: The client secret to use, if any.
- required: [ id ]
- scopes:
- type: array
- items:
+ description: The audiences, if any, to request the token for.
+ username:
type: string
- description: The scopes, if any, to request the token for.
- audiences:
- type: array
- items:
+ description: The username to use. Used only if the grant type is Password.
+ password:
type: string
- description: The audiences, if any, to request the token for.
- username:
- type: string
- description: The username to use. Used only if the grant type is Password.
- password:
- type: string
- description: The password to use. Used only if the grant type is Password.
- subject:
- $ref: '#/$defs/oauth2Token'
- description: The security token that represents the identity of the party on behalf of whom the request is being made.
- actor:
- $ref: '#/$defs/oauth2Token'
- description: The security token that represents the identity of the acting party.
- required: [ authority, grant, client ]
- required: [ oauth2 ]
- description: Use OAUTH2 authentication.
+ description: The password to use. Used only if the grant type is Password.
+ subject:
+ $ref: "#/$defs/oauth2Token"
+ description: The security token that represents the identity of the party on behalf of whom the request is being made.
+ actor:
+ $ref: "#/$defs/oauth2Token"
+ description: The security token that represents the identity of the acting party.
+ required: [authority, grant, client]
+ required: [oauth2]
+ description: Use OAUTH2 authentication.
description: Defines an authentication policy.
oauth2Token:
type: object
@@ -716,7 +716,7 @@ $defs:
type:
type: string
description: The type of the security token to use to use.
- required: [ token, type ]
+ required: [token, type]
duration:
type: object
minProperties: 1
@@ -757,7 +757,7 @@ $defs:
detail:
type: string
description: A human-readable explanation specific to this occurrence of the error.
- required: [ type, status, instance ]
+ required: [type, status, instance]
endpoint:
type: object
properties:
@@ -768,9 +768,9 @@ $defs:
authentication:
description: The authentication policy to use.
oneOf:
- - $ref: '#/$defs/authenticationPolicy'
+ - $ref: "#/$defs/authenticationPolicy"
- type: string
- required: [ uri ]
+ required: [uri]
eventConsumptionStrategy:
type: object
oneOf:
@@ -779,23 +779,23 @@ $defs:
all:
type: array
items:
- $ref: '#/$defs/eventFilter'
+ $ref: "#/$defs/eventFilter"
description: A list containing all the events that must be consumed.
- required: [ all ]
+ required: [all]
- title: AnyEventConsumptionStrategy
properties:
any:
type: array
items:
- $ref: '#/$defs/eventFilter'
+ $ref: "#/$defs/eventFilter"
description: A list containing any of the events to consume.
- required: [ any ]
+ required: [any]
- title: OneEventConsumptionStrategy
properties:
one:
- $ref: '#/$defs/eventFilter'
+ $ref: "#/$defs/eventFilter"
description: The single event to consume.
- required: [ one ]
+ required: [one]
eventFilter:
type: object
properties:
@@ -835,27 +835,41 @@ $defs:
expect:
type: string
description: A constant or a runtime expression, if any, used to determine whether or not the extracted correlation value matches expectations. If not set, the first extracted value will be used as the correlation's expectation.
- required: [ from ]
+ required: [from]
description: A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics.
- required: [ with ]
+ required: [with]
description: An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes.
extension:
type: object
properties:
extend:
type: string
- enum: [ call, composite, emit, for, listen, raise, run, set, switch, try, wait, all ]
+ enum:
+ [
+ call,
+ composite,
+ emit,
+ for,
+ listen,
+ raise,
+ run,
+ set,
+ switch,
+ try,
+ wait,
+ all,
+ ]
description: The type of task to extend.
when:
type: string
description: A runtime expression, if any, used to determine whether or not the extension should apply in the specified context.
before:
description: The task(s) to execute before the extended task, if any.
- $ref: '#/$defs/taskList'
+ $ref: "#/$defs/taskList"
after:
description: The task(s) to execute after the extended task, if any.
- $ref: '#/$defs/taskList'
- required: [ extend ]
+ $ref: "#/$defs/taskList"
+ required: [extend]
description: The definition of a an extension.
externalResource:
oneOf:
@@ -871,17 +885,17 @@ $defs:
authentication:
description: The authentication policy to use.
oneOf:
- - $ref: '#/$defs/authenticationPolicy'
+ - $ref: "#/$defs/authenticationPolicy"
- type: string
name:
type: string
description: The external resource's name, if any.
- required: [ uri ]
+ required: [uri]
input:
type: object
properties:
schema:
- $ref: '#/$defs/schema'
+ $ref: "#/$defs/schema"
description: The schema used to describe and validate the input of the workflow or task.
from:
type: string
@@ -891,7 +905,7 @@ $defs:
type: object
properties:
schema:
- $ref: '#/$defs/schema'
+ $ref: "#/$defs/schema"
description: The schema used to describe and validate the output of the workflow or task.
as:
type: string
@@ -901,12 +915,12 @@ $defs:
type: object
properties:
schema:
- $ref: '#/$defs/schema'
+ $ref: "#/$defs/schema"
description: The schema used to describe and validate the workflow context.
as:
type: string
description: A runtime expression, if any, used to export the output data to the context.
- description: Set the content of the context.
+ description: Set the content of the context.
retryPolicy:
type: object
properties:
@@ -917,29 +931,29 @@ $defs:
type: string
description: A runtime expression used to determine whether or not to retry running the task, in a given context.
delay:
- $ref: '#/$defs/duration'
+ $ref: "#/$defs/duration"
description: The duration to wait between retry attempts.
backoff:
type: object
oneOf:
- - title: ConstantBackoff
- properties:
- constant:
- type: object
- description: The definition of the constant backoff to use, if any.
- required: [ constant ]
- - title: ExponentialBackOff
- properties:
- exponential:
- type: object
- description: The definition of the exponential backoff to use, if any.
- required: [ exponential ]
- - title: LinearBackoff
- properties:
- linear:
- type: object
- description: The definition of the linear backoff to use, if any.
- required: [ linear ]
+ - title: ConstantBackoff
+ properties:
+ constant:
+ type: object
+ description: The definition of the constant backoff to use, if any.
+ required: [constant]
+ - title: ExponentialBackOff
+ properties:
+ exponential:
+ type: object
+ description: The definition of the exponential backoff to use, if any.
+ required: [exponential]
+ - title: LinearBackoff
+ properties:
+ linear:
+ type: object
+ description: The definition of the linear backoff to use, if any.
+ required: [linear]
description: The retry duration backoff.
limit:
type: object
@@ -951,22 +965,22 @@ $defs:
type: integer
description: The maximum amount of retry attempts, if any.
duration:
- $ref: '#/$defs/duration'
+ $ref: "#/$defs/duration"
description: The maximum duration for each retry attempt.
duration:
- $ref: '#/$defs/duration'
+ $ref: "#/$defs/duration"
description: The duration limit, if any, for all retry attempts.
description: The retry limit, if any
jitter:
type: object
properties:
from:
- $ref: '#/$defs/duration'
+ $ref: "#/$defs/duration"
description: The minimum duration of the jitter range
to:
- $ref: '#/$defs/duration'
+ $ref: "#/$defs/duration"
description: The maximum duration of the jitter range
- required: [ from, to ]
+ required: [from, to]
description: The parameters, if any, that control the randomness or variability of the delay between retry attempts.
description: Defines a retry policy.
schema:
@@ -977,24 +991,24 @@ $defs:
default: json
description: The schema's format. Defaults to 'json'. The (optional) version of the format can be set using `{format}:{version}`.
oneOf:
- - title: SchemaInline
+ - title: SchemaInline
properties:
document:
description: The schema's inline definition.
- required: [ document ]
+ required: [document]
- title: SchemaExternal
properties:
resource:
- $ref: '#/$defs/externalResource'
+ $ref: "#/$defs/externalResource"
description: The schema's external resource.
- required: [ resource ]
+ required: [resource]
description: Represents the definition of a schema.
timeout:
type: object
properties:
after:
- $ref: '#/$defs/duration'
+ $ref: "#/$defs/duration"
description: The duration after which to timeout.
- required: [ after ]
+ required: [after]
description: The definition of a timeout.
-required: [ document, do ]
\ No newline at end of file
+required: [document, do]