Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new to property to the emit task #1047

Merged
merged 6 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dsl-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ Allows workflows to publish events to event brokers or messaging systems, facili
| Name | Type | Required | Description |
|:--|:---:|:---:|:---|
| emit.event | [`eventProperties`](#event-properties) | `yes` | Defines the event to emit. |
| emit.to | [`endpoint`](#endpoint) | `no` | Specifies an additional endpoint for emitting the event. While the runtime's default cloud event endpoint remains the primary destination, setting this property ensures that the event is also published to the specified endpoint. Ideally, this property is left unset so that event delivery relies solely on the runtime's configured endpoint, but when provided, the event will be sent to both endpoints concurrently. |
cdavernas marked this conversation as resolved.
Show resolved Hide resolved

##### Examples

Expand Down
20 changes: 20 additions & 0 deletions examples/emit-additional-sink.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
document:
dsl: '1.0.0-alpha5'
namespace: test
name: emit
version: '0.1.0'
do:
- emitEvent:
emit:
event:
with:
source: https://petstore.com
type: com.petstore.order.placed.v1
data:
client:
firstName: Cruella
lastName: de Vil
items:
- breed: dalmatian
quantity: 101
to: https://additional-cloud-event-sink.com/pub
4 changes: 4 additions & 0 deletions schema/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ $defs:
description: Defines the properties of event to emit.
required: [ source, type ]
additionalProperties: true
to:
$ref: '#/$defs/endpoint'
title: EmitEndpointDefinition
description: Defines the additional endpoint, if any, to emit the event to.
required: [ event ]
forTask:
type: object
Expand Down
Loading