Skip to content

Commit baaeac9

Browse files
docs: document context of task.if
1 parent a73a32b commit baaeac9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dsl-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ The Serverless Workflow DSL defines a list of [tasks](#task) that **must be** su
249249
250250
| Name | Type | Required | Description|
251251
|:--|:---:|:---:|:---|
252-
| if | `string` | `no` | A [`runtime expression`](dsl.md#runtime-expressions), if any, used to determine whether or not the task should be run.<br>The task is considered skipped if not run. |
252+
| if | `string` | `no` | A [`runtime expression`](dsl.md#runtime-expressions), if any, used to determine whether or not the task should be run.<br>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. |
253253
| input | [`input`](#input) | `no` | An object used to customize the task's input and to document its schema, if any. |
254254
| output | [`output`](#output) | `no` | An object used to customize the task's output and to document its schema, if any. |
255255
| export | [`export`](#export) | `no` | An object used to customize the content of the workflow context. |

dsl.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ flowchart TD
256256
workflow_transformed_input{{Transformed Workflow Input}}
257257
258258
task_raw_input{{Raw Task Input}}
259+
task_if[Task: <code>if</code>]
259260
task_input_schema[\Task: <code>input.schema</code>/]
260261
task_input_from[Task: <code>input.from</code>]
261262
task_transformed_input{{Transformed Task Input}}
@@ -282,7 +283,8 @@ flowchart TD
282283
283284
subgraph Task
284285
285-
task_raw_input -- Validated by --> task_input_schema
286+
task_raw_input -- Passed to --> task_if
287+
task_if -- Validated by --> task_input_schema
286288
task_input_schema -- Passed to --> task_input_from
287289
task_input_from -- Produces --> task_transformed_input
288290
task_transformed_input -- Set as --> input_arg

0 commit comments

Comments
 (0)