Skip to content

Commit 908bd23

Browse files
authored
Clarify EventRef's data parameter is triggerEventRef's payload (#163)
* Clarify EventRef's data parameter is triggerEventRef's payload Signed-off-by: Lucas Caparelli <[email protected]> * Make suggested changes Signed-off-by: Lucas Caparelli <[email protected]>
1 parent 87417a5 commit 908bd23

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

schema/workflow.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@
376376
},
377377
"data": {
378378
"type": ["string", "object"],
379-
"description": "If String, expression which selects parts of the states data output to become the data of the produced event. If object a custom object to become the data of produced event."
379+
"description": "If string type, an expression which selects parts of the states data output to become the data (payload) of the event referenced by 'triggerEventRef'. If object type, a custom object to become the data (payload) of the event referenced by 'triggerEventRef'."
380380
},
381381
"contextAttributes": {
382382
"type": "object",
@@ -1874,4 +1874,4 @@
18741874
"required": []
18751875
}
18761876
}
1877-
}
1877+
}

specification.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ function. They can include either static values or reference the states data inp
12251225
| --- | --- | --- | --- |
12261226
| [triggerEventRef](#Event-Definition) | Reference to the unique name of a `produced` event definition | string | yes |
12271227
| [resultEventRef](#Event-Definitions) | Reference to the unique name of a `consumed` event definition | string | yes |
1228-
| data | If string type, an expression which selects parts of the states data output to become the data (payload) of the produced event. If object type, a custom object to become the data (payload) of trigger/produced event. | string or object | no |
1228+
| data | If string type, an expression which selects parts of the states data output to become the data (payload) of the event referenced by `triggerEventRef`. If object type, a custom object to become the data (payload) of the event referenced by `triggerEventRef`. | string or object | no |
12291229
| contextAttributes | Add additional event extension context attributes to the trigger/produced event | object | no |
12301230

12311231
<details><summary><strong>Click to view example definition</strong></summary>
@@ -1268,7 +1268,7 @@ eventRef:
12681268
References a `produced` and `consumed` [event definitions](#Event-Definition) via the "triggerEventRef" and `resultEventRef` properties, respectively.
12691269

12701270
The `data` property can have two types: string or object. If it is of string type, it is an expression that can select parts of state data
1271-
to be used as the trigger/produced event payload. If it is of object type, you can define a custom object to be the event payload.
1271+
to be used as payload of the event referenced by `triggerEventRef`. If it is of object type, you can define a custom object to be the event payload.
12721272

12731273
The `contextAttributes` property allows you to add one or more [extension context attributes](https://github.com/cloudevents/spec/blob/master/spec.md#extension-context-attributes)
12741274
to the trigger/produced event.
@@ -3915,4 +3915,4 @@ You can find a list of other languages, technologies and specifications related
39153915
## License
39163916

39173917
Serverless Workflow specification operates under the
3918-
[Apache License version 2.0](LICENSE).
3918+
[Apache License version 2.0](LICENSE).

0 commit comments

Comments
 (0)