-
Notifications
You must be signed in to change notification settings - Fork 159
[Fix_#873] Rename output.from and output.to #892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ | |
+ [Retry](#retry) | ||
+ [Input](#input) | ||
+ [Output](#output) | ||
+ [Export] (#export) | ||
+ [Timeout](#timeout) | ||
+ [Duration](#duration) | ||
+ [HTTP Response](#http-response) | ||
|
@@ -176,7 +177,7 @@ do: | |
- getAvailablePets: | ||
call: getAvailablePets | ||
output: | ||
from: "$input + { availablePets: [.[] | select(.category.name == "dog" and (.tags[] | .breed == $input.order.breed))] }" | ||
as: "$input + { availablePets: [.[] | select(.category.name == "dog" and (.tags[] | .breed == $input.order.breed))] }" | ||
- submitMatchesByMail: | ||
call: http | ||
with: | ||
|
@@ -234,6 +235,7 @@ The Serverless Workflow DSL defines a list of [tasks](#task) that **must be** su | |
|:--|:---:|:---:|:---| | ||
| 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. | | ||
cdavernas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| timeout | [`timeout`](#timeout) | `no` | The configuration of the task's timeout, if any. | | ||
| then | [`flowDirective`](#flow-directive) | `no` | The flow directive to execute next.<br>*If not set, defaults to `continue`.* | | ||
|
||
|
@@ -558,7 +560,7 @@ do: | |
with: | ||
type: com.fake.petclinic.pets.checkup.completed.v2 | ||
output: | ||
to: '.pets + [{ "id": $pet.id }]' | ||
as: '.pets + [{ "id": $pet.id }]' | ||
``` | ||
|
||
#### Listen | ||
|
@@ -1416,6 +1418,33 @@ from: | |
to: '.petList += [ . ]' | ||
``` | ||
|
||
### Export | ||
|
||
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. | ||
|
||
Optionally, the context might have an associated schema. | ||
|
||
#### Properties | ||
|
||
| Property | Type | Required | Description | | ||
|----------|:----:|:--------:|-------------| | ||
| 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.* | | ||
| as | `string`<br>`object` | `no` | A runtime expression, if any, used to export the output data to the context. | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Link is missing on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that particular link is missed everywhere, maybe should be fixed with a different PR? |
||
|
||
#### Examples | ||
|
||
Merge the task output into the current context. | ||
|
||
```yaml | ||
as: '.+$output' | ||
``` | ||
|
||
Replace the context with the task output. | ||
|
||
```yaml | ||
as: $output | ||
``` | ||
|
||
### Schema | ||
|
||
Describes a data schema. | ||
|
Uh oh!
There was an error while loading. Please reload this page.