Skip to content

Commit 8390acc

Browse files
committed
[Fix #712] Ricardo's comment
1 parent 3e090b7 commit 8390acc

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

specification.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,27 @@ 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
569+
570+
```json
571+
"actions":[
572+
{
573+
"name": "fetch_only_pasta",
574+
"functionRef": "breadAndPastaTypesFunction",
575+
"actionDataFilter": {
576+
"results": "${ .pasta[1] ]",
577+
}
578+
}
579+
]
580+
}
581+
```
582+
Since there is not `toStateData` and the result is not a json object but an string, the state would be
583+
584+
```json
585+
{
586+
"response": "spaghetti"
587+
}
588+
```
568589
In the case action results should not be added/merged to state data, we can set the `useResults` property to `false`.
569590
In this case, the `results` and `toStateData` properties should be ignored, and nothing is added/merged to state data.
570591
If `useResults` is not specified (or it's value set to `true`), action results, if available, should be added/merged to state data.

0 commit comments

Comments
 (0)