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
@@ -230,9 +230,9 @@ The Serverless Workflow DSL defines a list of [tasks](#task) that **must be** su
230
230
- [Call](#call), used to call services and/or functions.
231
231
- [Do](#do), used to define one or more subtasks to perform in sequence.
232
232
- [Fork](#fork), used to define one or more subtasks to perform concurrently.
233
-
- [Emit](#emit), used to emit [events](#event).
233
+
- [Emit](#emit), used to emit [events](#event-properties).
234
234
- [For](#for), used to iterate over a collection of items, and conditionally perform a task for each of them.
235
-
- [Listen](#listen), used to listen for an [event](#event) or more.
235
+
- [Listen](#listen), used to listen for an [event](#event-properties) or more.
236
236
- [Raise](#raise), used to raise an [error](#error) and potentially fault the [workflow](#workflow).
237
237
- [Run](#run), used to run a [container](#container), a [script](#script) or event a [shell](#shell) command.
238
238
- [Switch](#switch), used to dynamically select and execute one of multiple alternative paths based on specified conditions
@@ -495,7 +495,7 @@ Allows workflows to publish events to event brokers or messaging systems, facili
495
495
496
496
| Name | Type | Required | Description |
497
497
|:--|:---:|:---:|:---|
498
-
| emit.event | [`event`](#event) | `yes` | Defines the event to emit. |
498
+
| emit.event | [`eventProperties`](#event-properties) | `yes` | Defines the event to emit. |
499
499
500
500
##### Examples
501
501
@@ -1391,7 +1391,7 @@ Represents the configuration of an event consumption strategy.
1391
1391
| any | [`eventFilter[]`](#event-filter) | `no` | Configures the workflow to wait for any of the defined events before resuming execution.<br>*Required if `all` and `one` have not been set.* |
1392
1392
| one | [`eventFilter`](#event-filter) | `no` | Configures the workflow to wait for the defined event before resuming execution.<br>*Required if `all` and `any` have not been set.* |
1393
1393
1394
-
### Event
1394
+
### Event Properties
1395
1395
1396
1396
An event object typically includes details such as the event type, source, timestamp, and unique identifier, along with any relevant data payload. The [Cloud Events specification](https://cloudevents.io/), favored by Serveless Workflow, standardizes this structure to ensure interoperability across different systems and services.
1397
1397
@@ -1404,11 +1404,14 @@ An event object typically includes details such as the event type, source, times
1404
1404
| type | `string` | `no` | Describes the type of event related to the originating occurrence. `source` + `id` is unique for each distinct event.<br>*Required when emitting an event using `emit.event.with`.* |
1405
1405
| time | `string` | `no` | The timestamp of when the occurrence happened. |
1406
1406
| subject | `string` | `no` | Describes the subject of the event in the context of the event producer. |
1407
-
| datacontenttype | `string` | `no` | Content type of `data` value. If omitted, it implies the `data` is a JSON value confiorming to the "application/json" media type. |
1407
+
| datacontenttype | `string` | `no` | Content type of `data` value. If omitted, it implies the `data` is a JSON value conforming to the "application/json" media type. |
1408
1408
| dataschema | `string` | `no` | An URI that identifies the schema that `data` adheres to. |
1409
1409
| data | `object` | `no` | The event payload. |
1410
1410
1411
-
Additional properties can be supplied.
1411
+
*Additional properties can be supplied.*
1412
+
1413
+
*When used in an [`eventFilter`](#event-filter), at least one property must be supplied.*
1414
+
1412
1415
1413
1416
### Event Filter
1414
1417
@@ -1418,7 +1421,7 @@ An event filter is a mechanism used to selectively process or handle events base
1418
1421
1419
1422
| Property | Type | Required | Description |
1420
1423
|----------|:----:|:--------:|-------------|
1421
-
| with | [`event`](#event) | `yes` | A name/value mapping of the attributes filtered events must define. Supports both regular expressions and runtime expressions. |
1424
+
| with | [`eventProperties`](#event-properties) | `yes` | A name/value mapping of the attributes filtered events must define. Supports both regular expressions and runtime expressions. |
1422
1425
| correlate | [`map[string, correlation]`](#correlation) | `no` | A name/definition mapping of the correlations to attempt when filtering events. |
Copy file name to clipboardExpand all lines: schema/workflow.yaml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -357,7 +357,7 @@ $defs:
357
357
type: object
358
358
properties:
359
359
with:
360
-
$ref: '#/$defs/event'
360
+
$ref: '#/$defs/eventProperties'
361
361
required: [ source, type ]
362
362
additionalProperties: true
363
363
required: [ event ]
@@ -781,7 +781,7 @@ $defs:
781
781
$ref: '#/$defs/referenceableAuthenticationPolicy'
782
782
description: The authentication policy to use.
783
783
required: [ uri ]
784
-
event:
784
+
eventProperties:
785
785
type: object
786
786
properties:
787
787
id:
@@ -837,7 +837,7 @@ $defs:
837
837
properties:
838
838
with:
839
839
title: WithEvent
840
-
$ref: '#/$defs/event'
840
+
$ref: '#/$defs/eventProperties'
841
841
minProperties: 1
842
842
description: An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes.
0 commit comments