From 6de7a2b088f8c989e585b10e887fb3fd35fd492b Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Wed, 29 Jul 2026 15:18:59 -0400 Subject: [PATCH 1/3] [Fix #1177] Add read property to schedule.on Add a read property to the schedule definition as a sibling of the on property, allowing users to choose how consumed events are read when a workflow is triggered by events. Supports data, envelope, and raw values, defaulting to data. This is consistent with the listen task's read property and is non-breaking since existing workflows without read continue to work with the default behavior. Signed-off-by: Ricardo Zanini --- dsl-reference.md | 1 + schema/workflow.yaml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/dsl-reference.md b/dsl-reference.md index 42869e41..c8936843 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`.* | #### Evaluate diff --git a/schema/workflow.yaml b/schema/workflow.yaml index b8dc7ff2..267d3603 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -152,6 +152,12 @@ 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'. evaluate: type: object title: Evaluate From 50c5d696cab8526bef72b79fdcb8eac869adb7ab Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Wed, 29 Jul 2026 15:30:32 -0400 Subject: [PATCH 2/3] Require schedule.on when read is specified Use dependentRequired to ensure that the read property can only be specified when the on property is also present, since read is only meaningful for event-triggered schedules. Signed-off-by: Ricardo Zanini --- schema/workflow.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 267d3603..88c92bd1 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -158,6 +158,8 @@ properties: 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 From 7cdd531947d366e440eff72b3b9d97097bd57065 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Wed, 29 Jul 2026 15:47:04 -0400 Subject: [PATCH 3/3] Document that schedule.read requires on to be set Clarify in the DSL reference that setting read without on MUST be considered invalid by the runtime. Signed-off-by: Ricardo Zanini --- dsl-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsl-reference.md b/dsl-reference.md index c8936843..b79d734b 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -148,7 +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`.* | +| 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