You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: roadmap/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,9 @@ _Status description:_
24
24
| --- | --- | --- |
25
25
| ✔️| Support custom function `type` definition |[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
26
26
| ✔️| Workflow "name" no longer a required property |[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
27
-
| ✔️| Workflow "start" no longer a required property|[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
28
-
| ✔️| ForEach state "iterationParam" no longer a required property|[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
27
+
| ✔️| Workflow "start" no longer a required property |[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
28
+
| ✔️| ForEach state "iterationParam" no longer a required property |[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
29
+
| ✔️| Added "useData" for eventDataFilter, and "useResults" for actionDataFilter |[spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md)|
Copy file name to clipboardExpand all lines: schema/workflow.json
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1911,9 +1911,14 @@
1911
1911
"eventdatafilter": {
1912
1912
"type": "object",
1913
1913
"properties": {
1914
+
"useData": {
1915
+
"type": "boolean",
1916
+
"description": "If set to false, event payload is not added/merged to state data. In this case 'data' and 'toStateData' should be ignored. Default is true.",
1917
+
"default": true
1918
+
},
1914
1919
"data": {
1915
1920
"type": "string",
1916
-
"description": "Workflow expression that filters the received event/payload (default: '${ . }')"
1921
+
"description": "Workflow expression that filters the received eventpayload (default: '${ . }')"
1917
1922
},
1918
1923
"toStateData": {
1919
1924
"type": "string",
@@ -1930,6 +1935,11 @@
1930
1935
"type": "string",
1931
1936
"description": "Workflow expression that selects state data that the state action can use"
1932
1937
},
1938
+
"useResults": {
1939
+
"type": "boolean",
1940
+
"description": "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.",
1941
+
"default": true
1942
+
},
1933
1943
"results": {
1934
1944
"type": "string",
1935
1945
"description": "Workflow expression that filters the actions data results"
Copy file name to clipboardExpand all lines: specification.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -429,6 +429,7 @@ The second way would be to directly filter only the "veggie like" vegetables wit
429
429
| Parameter | Description | Type | Required |
430
430
| --- | --- | --- | --- |
431
431
| fromStateData | Workflow expression that filters state data that can be used by the action | string | no |
432
+
| 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 |
432
433
| results | Workflow expression that filters the actions data results | string | no |
433
434
| 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 | string | no |
434
435
@@ -555,10 +556,15 @@ into. With this, after our action executes the state data would be:
555
556
}
556
557
```
557
558
559
+
In the case action results should not be added/merged to state data, we can set the `useResults` property to `false`.
560
+
In this case, the `results` and `toStateData` properties should be ignored, and nothing is added/merged to state data.
561
+
If `useResults` is not specified (or it's value set to `true`), action results, if available, should be added/merged to state data.
562
+
558
563
#### Event data filters
559
564
560
565
| Parameter | Description | Type | Required |
561
566
| --- | --- | --- | --- |
567
+
| useData | If set to false, event payload is not added/merged to state data. In this case 'data' and 'toStateData' should be ignored. Default is true. | boolean | no |
562
568
| data | Workflow expression that filters the event data (payload) | string | no |
563
569
| 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 | string | no |
564
570
@@ -616,6 +622,11 @@ Note that the data input to the Event data filters depends on the `dataOnly` pro
616
622
If this property is not defined (has default value of `true`), Event data filter expressions are evaluated against the event payload (the CloudEvents `data` attribute only). If it is set to
617
623
`false`, the expressions should be evaluated against the entire CloudEvent (including its context attributes).
618
624
625
+
In the case event data/payload should not be added/merged to state data, we can set the `useData` property to `false`.
626
+
In this case, the `data` and `toStateData` properties should be ignored, and nothing is added/merged to state data.
627
+
If `useData` is not specified (or it's value set to `true`), event payload, if available, should be added/merged to state data.
628
+
629
+
619
630
#### Using multiple data filters
620
631
621
632
As [Event states](#Event-State) can take advantage of all defined data filters. In the example below, we define
0 commit comments