Skip to content

Commit f46bfa3

Browse files
committed
[Fix_#873] Charles comments
Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
1 parent 6f5d0a8 commit f46bfa3

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

dsl-reference.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,34 +1419,31 @@ to: '.petList += [ . ]'
14191419

14201420
### Export
14211421

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.
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. For convenience, the previous context value is accessible within the expression scope. For example, `.` if using jq.
14251423

1424+
Optionally, the context might have an associated schema.
14261425

14271426
#### Properties
14281427

14291428
| Property | Type | Required | Description |
14301429
|----------|:----:|:--------:|-------------|
14311430
| 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. |
1431+
| as | `string`<br>`object` | `no` | A runtime expression, if any, used to export the output data to the context. |
14331432

14341433
#### Examples
14351434

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

14391437
```yaml
1440-
as: '$context+=.'
1438+
as: '.+$output'
14411439
```
14421440

14431441
Replace the context with the output of the task.
14441442

14451443
```yaml
1446-
as: .
1444+
as: $output
14471445
```
14481446

1449-
14501447
### Schema
14511448

14521449
Describes a data schema.

0 commit comments

Comments
 (0)