diff --git a/dsl-reference.md b/dsl-reference.md index 42869e41..b79d734b 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -148,6 +148,7 @@ Configures the schedule of a workflow. | cron | `string` | `no` | Specifies the schedule using a CRON expression, e.g., '0 0 * * *' for daily at midnight.
*Required when no other property has been set.* | | after | [`duration`](#duration) | `no` | Specifies a delay duration that the workflow must wait before starting again after it completes. In other words, when this workflow completes, it should run again after the specified amount of time.
*Required when no other property has been set.* | | on | [`eventConsumptionStrategy`](#event-consumption-strategy) | `no` | Specifies the events that trigger the workflow execution.
*Required when no other property has been set.* | +| read | `string` | `no` | Specifies how [events](https://cloudevents.io/) are read when the workflow is triggered by events.
*Supported values are:*
*- `data`: Reads the [event's](https://cloudevents.io/) data.*
*- `envelope`: Reads the [event's](https://cloudevents.io/) envelope, including its [context attributes](https://github.com/cloudevents/spec/blob/main/cloudevents/spec.md#context-attributes).*
*- `raw`: Reads the [event's](https://cloudevents.io/) raw data.*
*Defaults to `data`.*
*Can only be set when `on` is defined. If set without `on`, the workflow MUST be considered invalid by the runtime.* | #### Evaluate diff --git a/schema/workflow.yaml b/schema/workflow.yaml index b8dc7ff2..88c92bd1 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -152,6 +152,14 @@ properties: $ref: '#/$defs/eventConsumptionStrategy' title: ScheduleOn description: Specifies the events that trigger the workflow execution. + read: + type: string + enum: [ data, envelope, raw ] + default: data + title: ScheduleOnReadAs + description: Specifies how consumed events are read when the workflow is triggered by events. Supported values are 'data' (reads the event's data), 'envelope' (reads the event's envelope, including context attributes), and 'raw' (reads the event's raw data). Defaults to 'data'. + dependentRequired: + read: [ on ] evaluate: type: object title: Evaluate