Skip to content

Commit 049b4e8

Browse files
Update specification.md
Co-authored-by: Ricardo Zanini <[email protected]> Update specification.md Co-authored-by: Ricardo Zanini <[email protected]> Update specification.md Co-authored-by: Ricardo Zanini <[email protected]> Update specification.md Co-authored-by: Ricardo Zanini <[email protected]> Update specification.md Co-authored-by: Ricardo Zanini <[email protected]> Update specification.md Co-authored-by: Ricardo Zanini <[email protected]> Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
1 parent 45079dc commit 049b4e8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

specification.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ The second way would be to directly filter only the "veggie like" vegetables wit
439439
| fromStateData | Workflow expression that filters state data that can be used by the action | string | no |
440440
| useResults | If set to `false`, action data results are not added/merged to state data. In this case 'results' and 'toStateData' should be ignored. Default is `true`. | boolean | no |
441441
| results | Workflow expression that filters the actions data results | string | no |
442-
| toStateData | Workflow expression that selects a state data element to which the action results should be added/merged into. If not specified denotes the top-level state data element. In case it is not specified and the result of the action is not an object, that result should be merged as value of an automatically generated key. That key name will be the result of concatenating the action name with `_output` suffix. | string | no |
442+
| toStateData | Workflow expression that selects a state data element to which the action results should be added/merged. If not specified denotes the top-level state data element. In case it is not specified and the result of the action is not an object, that result should be merged as the value of an automatically generated key. That key name will be the result of concatenating the action name with `-output` suffix. | string | no |
443443

444444
<details><summary><strong>Click to view example definition</strong></summary>
445445
<p>
@@ -565,25 +565,24 @@ into. With this, after our action executes the state data would be:
565565
}
566566
```
567567

568-
To illustrate merge of not json both object, let`s assume that, in previous example, the action definition is at follows
568+
To illustrate the merge of non-JSON for both objects, let's assume that, in the previous example, the action definition is the follows
569569

570570
```json
571571
"actions":[
572572
{
573-
"name": "fetch_only_pasta",
573+
"name": "fetch-only-pasta",
574574
"functionRef": "breadAndPastaTypesFunction",
575575
"actionDataFilter": {
576576
"results": "${ .pasta[1] ]",
577577
}
578578
}
579579
]
580-
}
581580
```
582-
Since there is not `toStateData` and the result is not a json object but an string, the model would be
581+
Since there is no `toStateData` attribute and the result is not a JSON object but a string, the model would be:
583582

584583
```json
585584
{
586-
"fetch_only_pasta_output": "spaghetti"
585+
"fetch-only-pasta-output": "spaghetti"
587586
}
588587
```
589588
In the case action results should not be added/merged to state data, we can set the `useResults` property to `false`.

0 commit comments

Comments
 (0)