Skip to content

Commit 5610f1d

Browse files
author
Tihomir Surdilovic
committed
update data filters
Signed-off-by: Tihomir Surdilovic <[email protected]>
1 parent da21545 commit 5610f1d

39 files changed

+72
-64
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ states:
126126
actionDataFilter:
127127
dataResultsPath: ".payload.greeting"
128128
stateDataFilter:
129-
dataOutputPath: ".greeting"
129+
output: ".greeting"
130130
end: true
131131
```
132132

api/src/main/resources/schema/default/defaultdef.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"end": {
1111
"$ref": "../end/end.json",
12-
"description": "Explicit transition to end"
12+
"description": "Workflow end definition"
1313
}
1414
},
1515
"oneOf": [

api/src/main/resources/schema/filters/actiondatafilter.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
"type": "object",
33
"javaType": "io.serverlessworkflow.api.filters.ActionDataFilter",
44
"properties": {
5-
"dataInputPath": {
5+
"fromStateData": {
66
"type": "string",
7-
"description": "JSONPath definition that selects parts of the states data input to be the action data"
7+
"description": "Workflow expression that selects state data that the state action can use"
88
},
9-
"dataResultsPath": {
9+
"results": {
1010
"type": "string",
11-
"description": "JSONPath definition that selects parts of the actions data result, to be merged with the states data"
11+
"description": "Workflow expression that filters the actions data results"
12+
},
13+
"toStateData": {
14+
"type": "string",
15+
"description": "Workflow expression that selects a state data element to which the action results should be added/merged into. If not specified, denote, the top-level state data element"
1216
}
1317
},
1418
"required": []

api/src/main/resources/schema/filters/eventdatafilter.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"type": "object",
33
"javaType": "io.serverlessworkflow.api.filters.EventDataFilter",
44
"properties": {
5-
"dataOutputPath": {
5+
"data": {
66
"type": "string",
7-
"description": "JSONPath definition that selects parts of the event data, to be merged with the states data"
7+
"description": "Workflow expression that filters of the event data (payload)"
8+
},
9+
"toStateData": {
10+
"type": "string",
11+
"description": " Workflow expression that selects a state data element to which the event payload should be added/merged into. If not specified, denotes, the top-level state data element."
812
}
913
},
1014
"required": []

api/src/main/resources/schema/filters/statedatafilter.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"type": "object",
33
"javaType": "io.serverlessworkflow.api.filters.StateDataFilter",
44
"properties": {
5-
"dataInputPath": {
5+
"input": {
66
"type": "string",
7-
"description": "JSONPath definition that selects parts of the states data input"
7+
"description": "Workflow expression to filter the state data input"
88
},
9-
"dataOutputPath": {
9+
"output": {
1010
"type": "string",
11-
"description": "JSONPath definition that selects parts of the states data output"
11+
"description": "Workflow expression that filters the state data output"
1212
}
1313
},
1414
"required": []

api/src/main/resources/schema/produce/produceevent.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"data": {
1111
"type": "string",
12-
"description": "JSONPath expression which selects parts of the states data output to become the data of the produced event"
12+
"description": "Workflow expression which selects parts of the states data output to become the data of the produced event"
1313
}
1414
},
1515
"required": [

api/src/main/resources/schema/states/foreachstate.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
"properties": {
1212
"inputCollection": {
1313
"type": "string",
14-
"description": "JsonPath expression selecting an array element of the states data"
14+
"description": "Workflow expression selecting an array element of the states data"
1515
},
1616
"outputCollection": {
1717
"type": "string",
18-
"description": "JsonPath expression specifying an array element of the states data to add the results of each iteration"
18+
"description": "Workflow expression specifying an array element of the states data to add the results of each iteration"
1919
},
2020
"iterationParam": {
2121
"type": "string",

api/src/main/resources/schema/switchconditions/datacondition.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
},
1313
"condition": {
1414
"type": "string",
15-
"description": "JsonPath expression evaluated against state data. True if results are not empty"
15+
"description": "Workflow expression evaluated against state data. True if results are not empty"
1616
},
1717
"transition": {
1818
"$ref": "../transitions/transition.json",
1919
"description": "Next transition of the workflow if there is valid matches"
2020
},
2121
"end": {
2222
"$ref": "../end/end.json",
23-
"description": "Explicit transition to end"
23+
"description": "Workflow end definition"
2424
}
2525
},
2626
"required": [

api/src/main/resources/schema/switchconditions/eventcondition.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"end": {
2424
"$ref": "../end/end.json",
25-
"description": "Explicit transition to end"
25+
"description": "Workflow end definition"
2626
}
2727
},
2828
"required": [

api/src/test/resources/examples/eventbasedgreeting.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"onEvents": [{
2525
"eventRefs": ["GreetingEvent"],
2626
"eventDataFilter": {
27-
"dataOutputPath": "${ .data.greet }"
27+
"data": "${ .data.greet }"
2828
},
2929
"actions":[
3030
{
@@ -38,7 +38,7 @@
3838
]
3939
}],
4040
"stateDataFilter": {
41-
"dataOutputPath": "${ .payload.greeting }"
41+
"output": "${ .payload.greeting }"
4242
},
4343
"end": true
4444
}

0 commit comments

Comments
 (0)