Skip to content

Commit 0420577

Browse files
committed
[Fix_#873] Review comments
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]> Update dsl-reference.md Co-authored-by: Ricardo Zanini <[email protected]> Update dsl-reference.md Co-authored-by: Ricardo Zanini <[email protected]> [Fix_#873] JpBianchi comments [Fix_#873] Ricardos comments Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
1 parent 6f5d0a8 commit 0420577

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

dsl-reference.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
+ [Retry](#retry)
4545
+ [Input](#input)
4646
+ [Output](#output)
47+
+ [Export] (#export)
4748
+ [Timeout](#timeout)
4849
+ [Duration](#duration)
4950
+ [HTTP Response](#http-response)
@@ -1419,34 +1420,31 @@ to: '.petList += [ . ]'
14191420

14201421
### Export
14211422

1422-
Certain task needs to set the context of the workflow using the task output for later usage. User set the content of the context through a runtime expression. The result of the expression is the new value of the context. If user want to merge the new data into the current context, he might do that using `$context` variable.
1423-
1424-
Optionally, the context can have a predefined schema.
1423+
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.
14251424

1425+
Optionally, the context might have an associated schema.
14261426

14271427
#### Properties
14281428

14291429
| Property | Type | Required | Description |
14301430
|----------|:----:|:--------:|-------------|
14311431
| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate context.<br>*Included to handle the non frequent case in which the context has a known format.* |
1432-
| as | `string`<br>`object` | `no` | A [runtime expression](#runtime-expressions), if any, used to set the context value. |
1432+
| as | `string`<br>`object` | `no` | A runtime expression, if any, used to export the output data to the context. |
14331433

14341434
#### Examples
14351435

1436-
Assuming the output of the task is a json object (not primitive, not array)
1437-
Merge into the current context the output of the task.
1436+
Merge the task output into the current context.
14381437

14391438
```yaml
1440-
as: '$context+=.'
1439+
as: '.+$output'
14411440
```
14421441

1443-
Replace the context with the output of the task.
1442+
Replace the context with the task output.
14441443

14451444
```yaml
1446-
as: .
1445+
as: $output
14471446
```
14481447

1449-
14501448
### Schema
14511449

14521450
Describes a data schema.

schema/workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ $defs:
828828
description: The schema used to describe and validate the workflow context.
829829
as:
830830
type: string
831-
description: A runtime expression, if any, used to set the context with output data.
831+
description: A runtime expression, if any, used to export the output data to the context.
832832
description: Set the content of the context.
833833
retryPolicy:
834834
type: object

0 commit comments

Comments
 (0)