Click to view example definition
@@ -4151,10 +4148,9 @@ Allows defining invocation of a function via event.
```json
{
- "eventRef": {
- "produceEventRef": "make-vet-appointment",
+ "produceEventRef": {
+ "name": "make-vet-appointment",
"data": "${ .patientInfo }",
- "consumeEventRef": "vet-appointment-info"
}
}
```
@@ -4163,10 +4159,9 @@ Allows defining invocation of a function via event.
```yaml
-eventRef:
- produceEventRef: make-vet-appointment
+produceEventRef:
+ name: make-vet-appointment
data: "${ .patientInfo }"
- consumeEventRef: vet-appointment-info
```
|
@@ -4175,7 +4170,7 @@ eventRef:
-References a `produced` and `consumed` [event definitions](#Event-Definition) via the `produceEventRef` and `consumeEventRef` properties, respectively.
+References a `produced` [event definitions](#Event-Definition) via the `name` property.
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
to be used as payload of the event referenced by `produceEventRef`. If it is of object type, you can define a custom object to be the event payload.
@@ -4183,19 +4178,54 @@ to be used as payload of the event referenced by `produceEventRef`. If it is of
The `contextAttributes` property allows you to add one or more [extension context attributes](https://github.com/cloudevents/spec/blob/main/cloudevents/spec.md#extension-context-attributes)
to the trigger/produced event.
+##### ConsumeEventRef Definition
+
+Wait for an event to arrive.
+
+| Parameter | Description | Type | Required |
+| --- | --- | --- | --- |
+| [name](#Event-Definition) | Reference to the unique name of a `consumed` event definition. Must follow the [Serverless Workflow Naming Convention](#naming-convention) | string | yes |
+| consumeEventTimeout | Maximum amount of time (ISO 8601 format literal or expression) to wait for the consume event. If not defined it be set to the [actionExecutionTimeout](#Workflow-Timeout-Definition) | string | no |
+
+