From f9eac23adf3efd5989ed402e9c27bb9172181572 Mon Sep 17 00:00:00 2001 From: Matthias Pichler Date: Fri, 30 Aug 2024 16:07:50 +0000 Subject: [PATCH 1/2] docs: document context of task.if Signed-off-by: Matthias Pichler --- dsl-reference.md | 2 +- dsl.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dsl-reference.md b/dsl-reference.md index da23ee67..4532197f 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -249,7 +249,7 @@ The Serverless Workflow DSL defines a list of [tasks](#task) that **must be** su | 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. | +| 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 and the *raw* task input becomes the task's output. The expression is evaluated against the *raw* task input, before any other expression of the task. | | 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. | diff --git a/dsl.md b/dsl.md index 18ca7240..a0b658f9 100644 --- a/dsl.md +++ b/dsl.md @@ -256,6 +256,7 @@ flowchart TD workflow_transformed_input{{Transformed Workflow Input}} task_raw_input{{Raw Task Input}} + task_if[Task: if] task_input_schema[\Task: input.schema/] task_input_from[Task: input.from] task_transformed_input{{Transformed Task Input}} @@ -282,7 +283,8 @@ flowchart TD subgraph Task - task_raw_input -- Validated by --> task_input_schema + task_raw_input -- Passed to --> task_if + task_if -- Validated by --> task_input_schema task_input_schema -- Passed to --> task_input_from task_input_from -- Produces --> task_transformed_input task_transformed_input -- Set as --> input_arg From 45673493fe5a32517704ffda240e43fe3f6f561a Mon Sep 17 00:00:00 2001 From: Matthias Pichler Date: Fri, 30 Aug 2024 16:45:35 +0000 Subject: [PATCH 2/2] docs: apply suggestion Signed-off-by: Matthias Pichler --- dsl-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsl-reference.md b/dsl-reference.md index 4532197f..5650e2e3 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -249,7 +249,7 @@ The Serverless Workflow DSL defines a list of [tasks](#task) that **must be** su | 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 and the *raw* task input becomes the task's output. The expression is evaluated against the *raw* task input, before any other expression of the task. | +| 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, and the *raw* task input becomes the task's output. The expression is evaluated against the *raw* task input before any other expression of the task. | | 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. |