diff --git a/.ci/validation/src/index.ts b/.ci/validation/src/index.ts index 1b972e58..2f443503 100644 --- a/.ci/validation/src/index.ts +++ b/.ci/validation/src/index.ts @@ -24,7 +24,7 @@ export module SWSchemaValidator { const ajv = new Ajv({ strict: false, allowUnionTypes: true }); addFormats(ajv); - const workflowSchemaId = "https://open-workflow-specification.org/schemas/1.0.3/workflow.yaml"; + const workflowSchemaId = "https://open-workflow-specification.org/schemas/1.0.4/workflow.yaml"; const schemaPath = "../../../schema"; export const defaultEncoding = "utf-8"; diff --git a/dsl-reference.md b/dsl-reference.md index dbebf670..7c3eddd8 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -163,7 +163,7 @@ Configures a workflow's runtime expression evaluation. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: order-pet version: '0.1.0' @@ -304,7 +304,7 @@ Enables the execution of a specified function within a workflow, allowing seamle ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: call-example version: '0.1.0' @@ -348,7 +348,7 @@ The [AsyncAPI Call](#asyncapi-call) enables workflows to interact with external ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: asyncapi-example version: '0.1.0' @@ -404,7 +404,7 @@ The [gRPC Call](#grpc-call) enables communication with external systems via the ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: grpc-example version: '0.1.0' @@ -443,7 +443,7 @@ The [HTTP Call](#http-call) enables workflows to interact with external services ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: http-example version: '0.1.0' @@ -474,7 +474,7 @@ The [OpenAPI Call](#openapi-call) enables workflows to interact with external se ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: openapi-example version: '0.1.0' @@ -513,7 +513,7 @@ The [A2A Call](#a2a-call) enables workflows to interact with AI agents described ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: a2a-example version: '0.1.0' @@ -557,7 +557,7 @@ The [MCP Call](#mcp-call) enables workflows to interact with [Model Context Prot ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: mcp-example version: '0.1.0' @@ -595,7 +595,7 @@ Serves as a fundamental building block within workflows, enabling the sequential ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: do-example version: '0.1.0' @@ -660,7 +660,7 @@ Allows workflows to publish events to event brokers or messaging systems, facili ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: emit-example version: '0.1.0' @@ -698,7 +698,7 @@ Allows workflows to iterate over a collection of items, executing a defined set ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: for-example version: '0.1.0' @@ -735,7 +735,7 @@ Allows workflows to execute multiple subtasks concurrently, enabling parallel pr ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: fork-example version: '0.1.0' @@ -788,7 +788,7 @@ Provides a mechanism for workflows to await and react to external events, enabli ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: listen-example version: '0.1.0' @@ -819,7 +819,7 @@ Intentionally triggers and propagates errors. By employing the "Raise" task, wor ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: raise-example version: '0.1.0' @@ -886,7 +886,7 @@ Provides the capability to execute external [containers](#container-process), [s ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-example version: '0.1.0' @@ -941,7 +941,7 @@ Enables the execution of external processes encapsulated within a containerized ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container-example version: '0.1.0' @@ -982,7 +982,8 @@ Enables the execution of custom scripts or code within a workflow, empowering wo | language | `string` | `yes` | The language of the script to run.
*Supported values are: [`js`](https://tc39.es/ecma262/2024/) and [`python`](https://www.python.org/downloads/release/python-3131/).* | | 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.* | -| arguments | `map` | `no` | A key/value mapping of the arguments, if any, to use when running the configured script | +| stdin | `string` | `no` | A runtime expression, if any, to pipe to the script as standard input (stdin) | +| arguments | `string[]` | `no` | A list of the arguments, if any, to pass to the script as argv | | environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured script process | @@ -999,22 +1000,21 @@ Enables the execution of custom scripts or code within a workflow, empowering wo ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: run-script-with-arguments version: 1.0.0 do: - - setInput: - set: - message: Hello World - - log: + - runScript: run: script: language: js arguments: - message: ${ .message } - code: > - console.log(message) + - Hello + - World + code: | + const [_, __, arg1, arg2] = process.argv; + console.log(`${arg1} ${arg2}`); ``` ##### Shell Process @@ -1033,7 +1033,7 @@ Enables the execution of shell commands within a workflow, enabling workflows to |:--|:---:|:---:|:---| | command | `string` | `yes` | The shell command to run | | stdin | `string` | `no` | A runtime expression, if any, to the shell command as standard input (stdin).| -| arguments | `string[]` | `no` | A list of the arguments, if any, of the shell command to run | +| arguments | `string[]` | `no` | A list of the arguments, if any, to pass to the shell command as argv | | directory | `string` | `no` | The working directory, if any, in which to run the shell command. | | environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process | @@ -1041,7 +1041,7 @@ Enables the execution of shell commands within a workflow, enabling workflows to ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-shell-example version: '0.1.0' @@ -1082,7 +1082,7 @@ Enables the invocation and execution of nested workflows within a parent workflo ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-workflow-example version: '0.1.0' @@ -1111,7 +1111,7 @@ A task used to set data. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: default name: set-example version: '0.1.0' @@ -1139,7 +1139,7 @@ Enables conditional branching within workflows, allowing them to dynamically sel ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: switch-example version: '0.1.0' @@ -1223,7 +1223,7 @@ Serves as a mechanism within workflows to handle errors gracefully, potentially ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: try-example version: '0.1.0' @@ -1281,7 +1281,7 @@ Allows workflows to pause or delay their execution for a specified period of tim ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: wait-example version: '0.1.0' @@ -1724,7 +1724,7 @@ Defines the mechanism used to authenticate users and workflows attempting to acc ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: authentication-example version: '0.1.0' @@ -1761,7 +1761,7 @@ Defines the fundamentals of a 'basic' authentication. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: basic-authentication-example version: '0.1.0' @@ -1796,7 +1796,7 @@ Defines the fundamentals of a 'bearer' authentication ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: bearer-authentication-example version: '0.1.0' @@ -1827,7 +1827,7 @@ Defines the fundamentals of a 'digest' authentication. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: digest-authentication-example version: '0.1.0' @@ -1878,7 +1878,7 @@ Defines the fundamentals of an 'oauth2' authentication. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: oauth2-authentication-example version: '0.1.0' @@ -1940,7 +1940,7 @@ Defines the fundamentals of an 'oidc' authentication. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: oidc-authentication-example version: '0.1.0' @@ -1980,7 +1980,7 @@ For more information about catalogs, refer to the [Open Workflow DSL document](h ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: catalog-example version: '0.1.0' @@ -2020,7 +2020,7 @@ Extensions enable the execution of tasks prior to those they extend, offering th *Perform logging before and after any non-extension task is run:* ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: logging-extension-example version: '0.1.0' @@ -2055,7 +2055,7 @@ do: *Intercept HTTP calls to 'https://mocked.service.com' and mock its response:* ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: intercept-extension-example version: '0.1.0' @@ -2372,7 +2372,7 @@ Defines a workflow or task timeout. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: default name: timeout-example version: '0.1.0' @@ -2516,7 +2516,7 @@ Describes the result of a process. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container-example version: '0.1.0' @@ -2570,7 +2570,7 @@ Configures the target server of an AsyncAPI operation. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: asyncapi-example version: '0.1.0' @@ -2608,7 +2608,7 @@ Configures an AsyncAPI message to publish. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: asyncapi-example version: '0.1.0' @@ -2673,7 +2673,7 @@ Configures a subscription to an AsyncAPI operation. ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: asyncapi-example version: '0.1.0' @@ -2710,7 +2710,7 @@ Configures the lifetime of an AsyncAPI subscription ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: asyncapi-example version: '0.1.0' @@ -2748,7 +2748,7 @@ Configures the iteration over each item (event or message) consumed by a subscri ```yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: asyncapi-example version: '0.1.0' diff --git a/examples/accumulate-room-readings.yaml b/examples/accumulate-room-readings.yaml index 01329246..9e1ac8fe 100644 --- a/examples/accumulate-room-readings.yaml +++ b/examples/accumulate-room-readings.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: accumulate-room-readings version: '0.1.0' diff --git a/examples/authentication-bearer-uri-format.yaml b/examples/authentication-bearer-uri-format.yaml index 4317ffeb..3bcdf7ef 100644 --- a/examples/authentication-bearer-uri-format.yaml +++ b/examples/authentication-bearer-uri-format.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: bearer-auth version: '0.1.0' diff --git a/examples/authentication-bearer.yaml b/examples/authentication-bearer.yaml index 285e7684..5117cd73 100644 --- a/examples/authentication-bearer.yaml +++ b/examples/authentication-bearer.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: bearer-auth-uri-format version: '0.1.0' diff --git a/examples/authentication-oauth2-secret.yaml b/examples/authentication-oauth2-secret.yaml index a2d2b495..ed738deb 100644 --- a/examples/authentication-oauth2-secret.yaml +++ b/examples/authentication-oauth2-secret.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: oauth2-authentication version: '1.0.0' diff --git a/examples/authentication-oauth2.yaml b/examples/authentication-oauth2.yaml index 1d9c2694..e96e5480 100644 --- a/examples/authentication-oauth2.yaml +++ b/examples/authentication-oauth2.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: oauth2-authentication version: '0.1.0' diff --git a/examples/authentication-oidc-secret.yaml b/examples/authentication-oidc-secret.yaml index b219fa96..1b2b693e 100644 --- a/examples/authentication-oidc-secret.yaml +++ b/examples/authentication-oidc-secret.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: oidc-authentication version: '1.0.0' diff --git a/examples/authentication-oidc.yaml b/examples/authentication-oidc.yaml index 327d109e..1305930d 100644 --- a/examples/authentication-oidc.yaml +++ b/examples/authentication-oidc.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: oidc-authentication version: '0.1.0' diff --git a/examples/authentication-reusable.yaml b/examples/authentication-reusable.yaml index 4ab6af50..7077a933 100644 --- a/examples/authentication-reusable.yaml +++ b/examples/authentication-reusable.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: bearer-auth version: '0.1.0' diff --git a/examples/call-asyncapi-publish.yaml b/examples/call-asyncapi-publish.yaml index f6e54839..e509849e 100644 --- a/examples/call-asyncapi-publish.yaml +++ b/examples/call-asyncapi-publish.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: bearer-auth version: '0.1.0' diff --git a/examples/call-asyncapi-subscribe-consume-amount.yaml b/examples/call-asyncapi-subscribe-consume-amount.yaml index 342c88e5..6205c3ca 100644 --- a/examples/call-asyncapi-subscribe-consume-amount.yaml +++ b/examples/call-asyncapi-subscribe-consume-amount.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: bearer-auth version: '0.1.0' diff --git a/examples/call-asyncapi-subscribe-consume-forever-foreach.yaml b/examples/call-asyncapi-subscribe-consume-forever-foreach.yaml index 9f119ecf..e2291846 100644 --- a/examples/call-asyncapi-subscribe-consume-forever-foreach.yaml +++ b/examples/call-asyncapi-subscribe-consume-forever-foreach.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: bearer-auth version: '0.1.0' diff --git a/examples/call-asyncapi-subscribe-consume-until.yaml b/examples/call-asyncapi-subscribe-consume-until.yaml index 50572f47..8ad71589 100644 --- a/examples/call-asyncapi-subscribe-consume-until.yaml +++ b/examples/call-asyncapi-subscribe-consume-until.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: bearer-auth version: '0.1.0' diff --git a/examples/call-asyncapi-subscribe-consume-while.yaml b/examples/call-asyncapi-subscribe-consume-while.yaml index 3a5de324..fc709ae2 100644 --- a/examples/call-asyncapi-subscribe-consume-while.yaml +++ b/examples/call-asyncapi-subscribe-consume-while.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: bearer-auth version: '0.1.0' diff --git a/examples/call-custom-function-cataloged.yaml b/examples/call-custom-function-cataloged.yaml index 8704ec0c..6dd38a5f 100644 --- a/examples/call-custom-function-cataloged.yaml +++ b/examples/call-custom-function-cataloged.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: samples name: call-custom-function-cataloged version: '0.1.0' diff --git a/examples/call-custom-function-inline.yaml b/examples/call-custom-function-inline.yaml index a9a817be..4fc18897 100644 --- a/examples/call-custom-function-inline.yaml +++ b/examples/call-custom-function-inline.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: samples name: call-custom-function-inline version: '0.1.0' diff --git a/examples/call-grpc.yaml b/examples/call-grpc.yaml index 6051175a..f22cc000 100644 --- a/examples/call-grpc.yaml +++ b/examples/call-grpc.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: grpc-example version: '0.1.0' diff --git a/examples/call-http-endpoint-interpolation-shorthand.yaml b/examples/call-http-endpoint-interpolation-shorthand.yaml index 10828890..116aa0e8 100644 --- a/examples/call-http-endpoint-interpolation-shorthand.yaml +++ b/examples/call-http-endpoint-interpolation-shorthand.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: call-http-shorthand-endpoint version: '0.1.0' diff --git a/examples/call-http-endpoint-interpolation.yaml b/examples/call-http-endpoint-interpolation.yaml index 9de9aa1a..36cf3ce2 100644 --- a/examples/call-http-endpoint-interpolation.yaml +++ b/examples/call-http-endpoint-interpolation.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: call-http-shorthand-endpoint version: '0.1.0' diff --git a/examples/call-http-query-headers-expressions.yaml b/examples/call-http-query-headers-expressions.yaml index 4cf69794..2acba791 100644 --- a/examples/call-http-query-headers-expressions.yaml +++ b/examples/call-http-query-headers-expressions.yaml @@ -1,6 +1,6 @@ # yaml-language-server: $schema=../schema/workflow.yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: http-query-headers-expressions version: '1.0.0' diff --git a/examples/call-http-query-parameters.yaml b/examples/call-http-query-parameters.yaml index 20aa9149..71061ab0 100644 --- a/examples/call-http-query-parameters.yaml +++ b/examples/call-http-query-parameters.yaml @@ -1,6 +1,6 @@ # yaml-language-server: $schema=../schema/workflow.yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: http-query-params version: '1.0.0' diff --git a/examples/call-http-redirect.yaml b/examples/call-http-redirect.yaml index 22649d1e..15cf2d92 100644 --- a/examples/call-http-redirect.yaml +++ b/examples/call-http-redirect.yaml @@ -1,6 +1,6 @@ # yaml-language-server: $schema=../schema/workflow.yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: http-query-params version: '1.0.0' diff --git a/examples/call-mcp.yaml b/examples/call-mcp.yaml index 2ed5a44f..61650801 100644 --- a/examples/call-mcp.yaml +++ b/examples/call-mcp.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: mcp-example version: '0.1.0' diff --git a/examples/call-openapi-redirect.yaml b/examples/call-openapi-redirect.yaml index 59c497c3..7550e74d 100644 --- a/examples/call-openapi-redirect.yaml +++ b/examples/call-openapi-redirect.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: openapi-example version: '0.1.0' diff --git a/examples/call-openapi.yaml b/examples/call-openapi.yaml index b4eafe11..940ce057 100644 --- a/examples/call-openapi.yaml +++ b/examples/call-openapi.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: openapi-example version: '0.1.0' diff --git a/examples/conditional-task.yaml b/examples/conditional-task.yaml index 1e2753ff..8c976f7a 100644 --- a/examples/conditional-task.yaml +++ b/examples/conditional-task.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: default name: conditional-task version: '0.1.0' diff --git a/examples/do-multiple.yaml b/examples/do-multiple.yaml index 1ea8bbb5..305c21ea 100644 --- a/examples/do-multiple.yaml +++ b/examples/do-multiple.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: call-http-shorthand-endpoint version: '0.1.0' diff --git a/examples/do-single.yaml b/examples/do-single.yaml index 10828890..116aa0e8 100644 --- a/examples/do-single.yaml +++ b/examples/do-single.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: call-http-shorthand-endpoint version: '0.1.0' diff --git a/examples/emit.yaml b/examples/emit.yaml index a22dea99..a875e860 100644 --- a/examples/emit.yaml +++ b/examples/emit.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: emit version: '0.1.0' diff --git a/examples/for-inline-array.yaml b/examples/for-inline-array.yaml index 5efda5b4..a160e157 100644 --- a/examples/for-inline-array.yaml +++ b/examples/for-inline-array.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: for-inline-array-example version: '0.1.0' diff --git a/examples/for-inline-primitive-array.yaml b/examples/for-inline-primitive-array.yaml index eb2f8792..7d3191ab 100644 --- a/examples/for-inline-primitive-array.yaml +++ b/examples/for-inline-primitive-array.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: for-inline-primitive-array-example version: '0.1.0' diff --git a/examples/for.yaml b/examples/for.yaml index a27bde35..0c463fb0 100644 --- a/examples/for.yaml +++ b/examples/for.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: for-example version: '0.1.0' diff --git a/examples/fork.yaml b/examples/fork.yaml index 22c4d070..9e200470 100644 --- a/examples/fork.yaml +++ b/examples/fork.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: fork-example version: '0.1.0' diff --git a/examples/listen-to-all read-envelope.yaml b/examples/listen-to-all read-envelope.yaml index 171b2be0..573c902f 100644 --- a/examples/listen-to-all read-envelope.yaml +++ b/examples/listen-to-all read-envelope.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: listen-to-all-read-envelope version: '0.1.0' diff --git a/examples/listen-to-all.yaml b/examples/listen-to-all.yaml index 8fb290e0..e3036eea 100644 --- a/examples/listen-to-all.yaml +++ b/examples/listen-to-all.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: listen-to-all version: '0.1.0' diff --git a/examples/listen-to-any-filter.yaml b/examples/listen-to-any-filter.yaml index 8963e609..981f6737 100644 --- a/examples/listen-to-any-filter.yaml +++ b/examples/listen-to-any-filter.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: listen-to-any-filter version: '0.1.0' diff --git a/examples/listen-to-any-forever-foreach.yaml b/examples/listen-to-any-forever-foreach.yaml index d47a2afc..dab1410f 100644 --- a/examples/listen-to-any-forever-foreach.yaml +++ b/examples/listen-to-any-forever-foreach.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: listen-to-any-while-foreach version: '0.1.0' diff --git a/examples/listen-to-any-until-condition.yaml b/examples/listen-to-any-until-condition.yaml index f44c12c7..72ee82c9 100644 --- a/examples/listen-to-any-until-condition.yaml +++ b/examples/listen-to-any-until-condition.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: listen-to-any version: '0.1.0' diff --git a/examples/listen-to-any-until-consumed.yaml b/examples/listen-to-any-until-consumed.yaml index c42ffcbe..f406fb88 100644 --- a/examples/listen-to-any-until-consumed.yaml +++ b/examples/listen-to-any-until-consumed.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: listen-to-any version: '0.1.0' diff --git a/examples/listen-to-any.yaml b/examples/listen-to-any.yaml index a54e05a9..d3162242 100644 --- a/examples/listen-to-any.yaml +++ b/examples/listen-to-any.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: listen-to-any version: '0.1.0' diff --git a/examples/listen-to-one.yaml b/examples/listen-to-one.yaml index 901e148b..bec2db1c 100644 --- a/examples/listen-to-one.yaml +++ b/examples/listen-to-one.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: listen-to-one version: '0.1.0' diff --git a/examples/mock-service-extension.yaml b/examples/mock-service-extension.yaml index 84624d90..72cc1949 100644 --- a/examples/mock-service-extension.yaml +++ b/examples/mock-service-extension.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: sample-workflow version: 0.1.0 diff --git a/examples/raise-inline.yaml b/examples/raise-inline.yaml index 1fe10c69..e3255f7f 100644 --- a/examples/raise-inline.yaml +++ b/examples/raise-inline.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: raise-not-implemented version: '0.1.0' diff --git a/examples/raise-reusable.yaml b/examples/raise-reusable.yaml index fec7cd3a..391cca21 100644 --- a/examples/raise-reusable.yaml +++ b/examples/raise-reusable.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: raise-not-implemented version: '0.1.0' diff --git a/examples/run-container-cleanup-always.yaml b/examples/run-container-cleanup-always.yaml index 149b6211..6b1d3b6d 100644 --- a/examples/run-container-cleanup-always.yaml +++ b/examples/run-container-cleanup-always.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container version: '0.1.0' diff --git a/examples/run-container-cleanup-eventually.yaml b/examples/run-container-cleanup-eventually.yaml index 1f80536b..1ad7abe0 100644 --- a/examples/run-container-cleanup-eventually.yaml +++ b/examples/run-container-cleanup-eventually.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container version: '0.1.0' diff --git a/examples/run-container-stdin-and-arguments.yaml b/examples/run-container-stdin-and-arguments.yaml index c1c48bf0..5f33afd1 100644 --- a/examples/run-container-stdin-and-arguments.yaml +++ b/examples/run-container-stdin-and-arguments.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container-stdin-and-arguments version: '0.1.0' diff --git a/examples/run-container-with-name.yaml b/examples/run-container-with-name.yaml index 8976b9d5..7982bd1c 100644 --- a/examples/run-container-with-name.yaml +++ b/examples/run-container-with-name.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container-with-name version: '0.1.0' diff --git a/examples/run-container-with-pull-policy.yaml b/examples/run-container-with-pull-policy.yaml index 45da5f6e..5ff30288 100644 --- a/examples/run-container-with-pull-policy.yaml +++ b/examples/run-container-with-pull-policy.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container-with-pull-policy version: '0.1.0' diff --git a/examples/run-container.yaml b/examples/run-container.yaml index 1780b4bb..39a14159 100644 --- a/examples/run-container.yaml +++ b/examples/run-container.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container version: '0.1.0' diff --git a/examples/run-return-all.yaml b/examples/run-return-all.yaml index 67050ea9..0608667e 100644 --- a/examples/run-return-all.yaml +++ b/examples/run-return-all.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container version: '0.1.0' diff --git a/examples/run-return-code.yaml b/examples/run-return-code.yaml index 6aa5910d..d829bb4f 100644 --- a/examples/run-return-code.yaml +++ b/examples/run-return-code.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container version: '0.1.0' diff --git a/examples/run-return-none.yaml b/examples/run-return-none.yaml index 6ad86cde..e7491460 100644 --- a/examples/run-return-none.yaml +++ b/examples/run-return-none.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container version: '0.1.0' diff --git a/examples/run-return-stderr.yaml b/examples/run-return-stderr.yaml index 8ee1bf74..fd3c2a9d 100644 --- a/examples/run-return-stderr.yaml +++ b/examples/run-return-stderr.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-container version: '0.1.0' diff --git a/examples/run-script-with-arguments.yaml b/examples/run-script-with-arguments.yaml index e9230ac8..01b75e11 100644 --- a/examples/run-script-with-arguments.yaml +++ b/examples/run-script-with-arguments.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: run-script-with-arguments version: 1.0.0 @@ -12,6 +12,8 @@ do: script: language: js arguments: - message: ${ .message } - code: > - console.log(message) + - message + - ${ .message } + code: | + const [_, __, argName, argValue] = process.argv; + console.log(argValue) diff --git a/examples/run-script-with-stdin-and-arguments.yaml b/examples/run-script-with-stdin-and-arguments.yaml new file mode 100644 index 00000000..4185648b --- /dev/null +++ b/examples/run-script-with-stdin-and-arguments.yaml @@ -0,0 +1,25 @@ +document: + dsl: '1.0.4' + namespace: examples + name: run-script-with-stdin-and-arguments + version: '1.0.0' +do: + - runScript: + run: + script: + language: js + stdin: "Hello Workflow" + environment: + foo: bar + arguments: + - hello + code: | + import { readFileSync } from 'node:fs'; + const stdin = readFileSync(process.stdin.fd, 'utf8'); + console.log('stdin > ', stdin) // Output: stdin > Hello Workflow + + const [_, __, arg] = process.argv; + console.log('arg > ', arg) // Output: arg > hello + + const foo = process.env.foo; + console.log('env > ', foo) // Output: env > bar diff --git a/examples/run-shell-external-script.yaml b/examples/run-shell-external-script.yaml index bfb61ec7..62ac2885 100644 --- a/examples/run-shell-external-script.yaml +++ b/examples/run-shell-external-script.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: run-shell-external-script version: 1.0.0 diff --git a/examples/run-subflow.yaml b/examples/run-subflow.yaml index 040cffb7..5e72806d 100644 --- a/examples/run-subflow.yaml +++ b/examples/run-subflow.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: run-subflow version: '0.1.0' diff --git a/examples/schedule-cron.yaml b/examples/schedule-cron.yaml index 0632dc7c..59275f63 100644 --- a/examples/schedule-cron.yaml +++ b/examples/schedule-cron.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: cron-schedule version: '0.1.0' diff --git a/examples/schedule-event-driven.yaml b/examples/schedule-event-driven.yaml index 572ef64a..b71ce0d9 100644 --- a/examples/schedule-event-driven.yaml +++ b/examples/schedule-event-driven.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: event-driven-schedule version: '0.1.0' diff --git a/examples/set-expression.yaml b/examples/set-expression.yaml index 927c2d12..f0a3b9b0 100644 --- a/examples/set-expression.yaml +++ b/examples/set-expression.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: set version: '0.1.0' diff --git a/examples/set.yaml b/examples/set.yaml index 35b79742..b8ef35db 100644 --- a/examples/set.yaml +++ b/examples/set.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: set version: '0.1.0' diff --git a/examples/star-wars-homeworld.yaml b/examples/star-wars-homeworld.yaml index 01b48b08..ffde9437 100644 --- a/examples/star-wars-homeworld.yaml +++ b/examples/star-wars-homeworld.yaml @@ -1,6 +1,6 @@ # yaml-language-server: $schema=../schema/workflow.yaml document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: examples name: star-wars-homeplanet version: '1.0.0' diff --git a/examples/switch-then-string.yaml b/examples/switch-then-string.yaml index cc8ecfb1..975a8782 100644 --- a/examples/switch-then-string.yaml +++ b/examples/switch-then-string.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: sample-workflow version: 0.1.0 diff --git a/examples/try-catch-retry-inline.yaml b/examples/try-catch-retry-inline.yaml index 4731f4be..f6cb8e68 100644 --- a/examples/try-catch-retry-inline.yaml +++ b/examples/try-catch-retry-inline.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: default name: try-catch-retry version: '0.1.0' diff --git a/examples/try-catch-retry-reusable.yaml b/examples/try-catch-retry-reusable.yaml index 1e59287a..9cebc374 100644 --- a/examples/try-catch-retry-reusable.yaml +++ b/examples/try-catch-retry-reusable.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: default name: try-catch-retry version: '0.1.0' diff --git a/examples/try-catch-then-directive.yaml b/examples/try-catch-then-directive.yaml index e7972bc7..096ee4a3 100644 --- a/examples/try-catch-then-directive.yaml +++ b/examples/try-catch-then-directive.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: try-catch-then-directive version: '0.1.0' diff --git a/examples/try-catch-then.yaml b/examples/try-catch-then.yaml index ecb766a9..0b38510f 100644 --- a/examples/try-catch-then.yaml +++ b/examples/try-catch-then.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: default name: try-catch version: '0.1.0' diff --git a/examples/try-catch.yaml b/examples/try-catch.yaml index f8607cb8..b8213dbb 100644 --- a/examples/try-catch.yaml +++ b/examples/try-catch.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: default name: try-catch version: '0.1.0' diff --git a/examples/wait-duration-inline.yaml b/examples/wait-duration-inline.yaml index a47a367d..4529cbc0 100644 --- a/examples/wait-duration-inline.yaml +++ b/examples/wait-duration-inline.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: wait-duration-inline version: '0.1.0' diff --git a/examples/wait-duration-iso8601.yaml b/examples/wait-duration-iso8601.yaml index 94c751cb..c4b379fb 100644 --- a/examples/wait-duration-iso8601.yaml +++ b/examples/wait-duration-iso8601.yaml @@ -1,5 +1,5 @@ document: - dsl: '1.0.3' + dsl: '1.0.4' namespace: test name: wait-duration-8601 version: '0.1.0' diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 6d82d59b..d6ec2eff 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -1,4 +1,4 @@ -$id: https://open-workflow-specification.org/schemas/1.0.3/workflow.yaml +$id: https://open-workflow-specification.org/schemas/1.0.4/workflow.yaml $schema: https://json-schema.org/draft/2020-12/schema description: Open Workflow DSL - Workflow Schema. type: object @@ -876,11 +876,16 @@ $defs: type: string title: ScriptLanguage description: The language of the script to run. + stdin: + type: string + title: ScriptStdin + description: A runtime expression, if any, to pipe to the script as standard input (stdin). arguments: - type: object + type: array title: ScriptArguments - description: A key/value mapping of the arguments, if any, to use when running the configured script. - additionalProperties: true + description: A list of the arguments, if any, to pass to the script as argv. + items: + type: string environment: type: object title: ScriptEnvironment