From 099955c3bf43c259e39cd271f970f07baf6b2a33 Mon Sep 17 00:00:00 2001 From: Charles d'Avernas Date: Wed, 8 Jan 2025 22:12:18 +0100 Subject: [PATCH 1/6] Refactor the `AsyncAPI` call Closes #1045 Signed-off-by: Charles d'Avernas --- dsl-reference.md | 201 ++++++++++++++++-- ...yncapi.yaml => call-asyncapi-publish.yaml} | 9 +- ...all-asyncapi-subscribe-consume-amount.yaml | 17 ++ ...call-asyncapi-subscribe-consume-until.yaml | 19 ++ ...call-asyncapi-subscribe-consume-while.yaml | 16 ++ schema/workflow.yaml | 144 ++++++++++--- 6 files changed, 361 insertions(+), 45 deletions(-) rename examples/{call-asyncapi.yaml => call-asyncapi-publish.yaml} (68%) create mode 100644 examples/call-asyncapi-subscribe-consume-amount.yaml create mode 100644 examples/call-asyncapi-subscribe-consume-until.yaml create mode 100644 examples/call-asyncapi-subscribe-consume-while.yaml diff --git a/dsl-reference.md b/dsl-reference.md index faaa776d..e4e2081a 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -56,6 +56,10 @@ + [HTTP Request](#http-request) + [URI Template](#uri-template) + [Process Result](#process-result) + + [AsyncAPI Server](#asyncapi-server) + + [AsyncAPI Message](#asyncapi-message) + + [AsyncAPI Subscription](#asyncapi-subscription) + ## Abstract @@ -300,15 +304,16 @@ The [AsyncAPI Call](#asyncapi-call) enables workflows to interact with external ###### Properties -| Name | Type | Required | Description| -|:--|:---:|:---:|:---| -| document | [`externalResource`](#external-resource) | `yes` | The AsyncAPI document that defines the operation to call. | -| operationRef | `string` | `yes` | A reference to the AsyncAPI operation to call. | -| server | `string` | `no` | A reference to the server to call the specified AsyncAPI operation on.
If not set, default to the first server matching the operation's channel. | -| message | `string` | `no` | The name of the message to use.
If not set, defaults to the first message defined by the operation. | -| binding | `string` | `no` | The name of the binding to use.
If not set, defaults to the first binding defined by the operation | -| payload | `any` | `no` | The operation's payload, as defined by the configured message | -| authentication | `string`
[`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the AsyncAPI operation. | +| Name | Type | Required | Description | +|:-------|:------:|:----------:|:--------------| +| document | [`externalResource`](#external-resource) | `yes` | The AsyncAPI document that defines the [operation](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationObject) to call. | +| channel | `string` | `yes` | The name of the channel on which to perform the operation. The operation to perform is defined by declaring either `message`, in which case the [channel](https://v2.asyncapi.com/docs/reference/specification/v2.6.0#channelItemObject)'s `publish` operation will be executed, or `subscription`, in which case the [channel](https://v2.asyncapi.com/docs/reference/specification/v2.6.0#channelItemObject)'s `subscribe` operation will be executed.
*Used only in case the referenced document uses AsyncAPI `v2.6.0`.* | +| operation | `string` | `yes` | A reference to the AsyncAPI [operation](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationObject) to call.
*Used only in case the referenced document uses AsyncAPI `v3.0.0`.* | +| server | [`asyncApiServer`](#asyncapi-server) | `no` | An object used to configure to the [server](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverObject) to call the specified AsyncAPI [operation](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationObject) on.
If not set, default to the first [server](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverObject) matching the operation's channel. | +| protocol | `string` | `no` | The [protocol](https://www.asyncapi.com/docs/reference/specification/v3.0.0#definitionsProtocol) to use to select the target [server](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverObject).
Ignored if `server` has been set.
*Supported values are: `amqp`, `amqp1`, `anypointmq`, `googlepubsub`, `http`, `ibmmq`, `jms`, `kafka`, `mercure`, `mqtt`, `mqtt5`, `nats`, `pulsar`, `redis`, `sns`, `solace`, `sqs`, `stomp` and `ws`* | +| message | [`asyncApiMessage`](#asyncapi-message) | `no` | An object used to configure the message to publish using the target operation.
*Required if `subscription` has not been set.* | +| subscription | [`asyncApiSubscription`](#asyncapi-subscription) | `no` | An object used to configure the subscription to messages consumed using the target operation.
*Required if `message` has not been set.* | +| authentication | `string`
[`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the AsyncAPI operation. | ###### Examples @@ -319,17 +324,35 @@ document: name: asyncapi-example version: '0.1.0' do: - - findPet: + - publishGreetings: call: asyncapi with: document: endpoint: https://fake.com/docs/asyncapi.json - operationRef: findPetsByStatus - server: staging - message: getPetByStatusQuery - binding: http - payload: - petId: ${ .pet.id } + operation: greet + server: + name: greetingsServer + variables: + environment: dev + message: + payload: + greetings: Hello, World! + headers: + foo: bar + bar: baz + - subscribeToChatInbox: + call: asyncapi + with: + document: + endpoint: https://fake.com/docs/asyncapi.json + operation: chat-inbox + protocol: http + subscription: + correlation: ${ . == $workflow.input.chat.roomId } + consume: + amount: 5 + for: + seconds: 10 ``` ##### gRPC Call @@ -1940,4 +1963,150 @@ do: version: '0.1.0' input: {} return: none +``` + +### AsyncAPI Server + +Configures the target server of an AsyncAPI operation. + +#### Properties + +| Name | Type | Required | Description | +|:-------|:------:|:----------:|:--------------| +| name | `string` | `yes` | The name of the [server](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverObject) to call the specified AsyncAPI operation on. | +| variables | `object` | `no` | The target [server's variables](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverVariableObject), if any. | + +#### Examples + +```yaml +document: + dsl: '1.0.0-alpha5' + namespace: test + name: asyncapi-example + version: '0.1.0' +do: + - publishGreetings: + call: asyncapi + with: + document: + endpoint: https://fake.com/docs/asyncapi.json + operation: greet + server: + name: greetingsServer + variables: + environment: dev + message: + payload: + greetings: Hello, World! + headers: + foo: bar + bar: baz +``` + +### AsyncAPI Message + +Configures an AsyncAPI message to publish. + +#### Properties + +| Name | Type | Required | Description | +|:-------|:------:|:----------:|:--------------| +| payload | `object` | `no` | The message's payload, if any. | +| headers | `object` | `no` | The message's headers, if any. | + +#### Examples + +```yaml +document: + dsl: '1.0.0-alpha5' + namespace: test + name: asyncapi-example + version: '0.1.0' +do: + - publishGreetings: + call: asyncapi + with: + document: + endpoint: https://fake.com/docs/asyncapi.json + operation: greet + protocol: http + message: + payload: + greetings: Hello, World! + headers: + foo: bar + bar: baz +``` + +### AsyncAPI Subscription + +Configures a subscription to an AsyncAPI operation. + +#### Properties + +| Name | Type | Required | Description | +|:-------|:------:|:----------:|:--------------| +| correlation | `string` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to filter consumed messages based on their [correlation id.](https://www.asyncapi.com/docs/reference/specification/v3.0.0#correlationIdObject). | +| consume | [`subscriptionLifetime`](#asyncapi-subscription-lifetime) | `yes` | An object used to configure the subscription's lifetime. | + + +#### Examples + +```yaml +document: + dsl: '1.0.0-alpha5' + namespace: test + name: asyncapi-example + version: '0.1.0' +do: + - subscribeToChatInbox: + call: asyncapi + with: + document: + endpoint: https://fake.com/docs/asyncapi.json + operation: chat-inbox + protocol: http + subscription: + correlation: ${ . == $workflow.input.chat.roomId } + consume: + amount: 5 + for: + seconds: 10 +``` + +### AsyncAPI Subscription Lifetime + +Configures the lifetime of an AsyncAPI subscription + +#### Properties + +| Name | Type | Required | Description | +|:-------|:------:|:----------:|:--------------| +| amount | `integer` | `no` | The amount of messages to consume.
*Required if `while` and `until` have not been set.* | +| for | [`duration`](#duration) | `no` | The [`duration`](#duration) that defines for how long to consume messages. | +| while | `string` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to determine whether or not to keep consuming messages.
*Required if `amount` and `until` have not been set.* | +| until | `string` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to determine until when to consume messages.
*Required if `amount` and `while` have not been set.* | + +#### Examples + +```yaml +document: + dsl: '1.0.0-alpha5' + namespace: test + name: asyncapi-example + version: '0.1.0' +do: + - subscribeToChatInbox: + call: asyncapi + with: + document: + endpoint: https://fake.com/docs/asyncapi.json + operation: chat-inbox + protocol: http + subscription: + correlation: ${ . == $workflow.input.chat.roomId } + consume: + until: ($context.messages | length) == 5 + for: + seconds: 10 ``` \ No newline at end of file diff --git a/examples/call-asyncapi.yaml b/examples/call-asyncapi-publish.yaml similarity index 68% rename from examples/call-asyncapi.yaml rename to examples/call-asyncapi-publish.yaml index d90b088d..9f3dc70c 100644 --- a/examples/call-asyncapi.yaml +++ b/examples/call-asyncapi-publish.yaml @@ -9,12 +9,11 @@ do: with: document: endpoint: https://fake.com/docs/asyncapi.json - operationRef: findPetsByStatus + operation: findPetsByStatus server: staging - message: getPetByStatusQuery - binding: http - payload: - petId: ${ .pet.id } + message: + payload: + petId: ${ .pet.id } authentication: bearer: token: ${ .token } diff --git a/examples/call-asyncapi-subscribe-consume-amount.yaml b/examples/call-asyncapi-subscribe-consume-amount.yaml new file mode 100644 index 00000000..bad9e5e8 --- /dev/null +++ b/examples/call-asyncapi-subscribe-consume-amount.yaml @@ -0,0 +1,17 @@ +document: + dsl: '1.0.0-alpha5' + namespace: examples + name: bearer-auth + version: '0.1.0' +do: + - getNotifications: + call: asyncapi + with: + document: + endpoint: https://fake.com/docs/asyncapi.json + operation: getNotifications + protoçol: ws + subscription: + filter: '${ .correlationId == $context.userId and .payload.from.firstName == $context.contact.firstName and .payload.from.lastName == $context.contact.lastName }' + consume: + amount: 5 diff --git a/examples/call-asyncapi-subscribe-consume-until.yaml b/examples/call-asyncapi-subscribe-consume-until.yaml new file mode 100644 index 00000000..bb12dedf --- /dev/null +++ b/examples/call-asyncapi-subscribe-consume-until.yaml @@ -0,0 +1,19 @@ +document: + dsl: '1.0.0-alpha5' + namespace: examples + name: bearer-auth + version: '0.1.0' +do: + - getNotifications: + call: asyncapi + with: + document: + endpoint: https://fake.com/docs/asyncapi.json + operation: getNotifications + channel: /notifications + subscription: + filter: '${ .correlationId == $context.userId and .payload.from.firstName == $context.contact.firstName and .payload.from.lastName == $context.contact.lastName }' + consume: + for: + minutes: 30 + until: '${ ($context.consumedMessages | length) == 5 }' diff --git a/examples/call-asyncapi-subscribe-consume-while.yaml b/examples/call-asyncapi-subscribe-consume-while.yaml new file mode 100644 index 00000000..58c2e1ed --- /dev/null +++ b/examples/call-asyncapi-subscribe-consume-while.yaml @@ -0,0 +1,16 @@ +document: + dsl: '1.0.0-alpha5' + namespace: examples + name: bearer-auth + version: '0.1.0' +do: + - getNotifications: + call: asyncapi + with: + document: + endpoint: https://fake.com/docs/asyncapi.json + operation: getNotifications + subscription: + filter: '${ .correlationId == $context.userId and .payload.from.firstName == $context.contact.firstName and .payload.from.lastName == $context.contact.lastName }' + consume: + while: '${ ($context.consumedMessages | length) < 5 }' diff --git a/schema/workflow.yaml b/schema/workflow.yaml index d35ab774..4c83a175 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -241,33 +241,42 @@ $defs: properties: document: $ref: '#/$defs/externalResource' - title: WithAsyncAPIDocument + title: AsyncAPIDocument description: The document that defines the AsyncAPI operation to call. - operationRef: + channel: type: string - title: WithAsyncAPIOperation + title: With + description: The name of the channel on which to perform the operation. Used only in case the referenced document uses AsyncAPI v2.6.0. + operation: + type: string + title: AsyncAPIOperation description: A reference to the AsyncAPI operation to call. server: + $ref: '#/$defs/asyncApiServer' + title: AsyncAPIServer + description: An object used to configure to the server to call the specified AsyncAPI operation on. + protocol: type: string - title: WithAsyncAPIServer - description: A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel. + title: AsyncApiProtocol + description: The protocol to use to select the target server. + enum: [ amqp, amqp1, anypointmq, googlepubsub, http, ibmmq, jms, kafka, mercure, mqtt, mqtt5, nats, pulsar, redis, sns, solace, sqs, stomp, ws ] message: - type: string - title: WithAsyncAPIMessage - description: The name of the message to use. If not set, defaults to the first message defined by the operation. - binding: - type: string - title: WithAsyncAPIBinding - description: The name of the binding to use. If not set, defaults to the first binding defined by the operation. - payload: - type: object - title: WithAsyncAPIPayload - description: The payload to call the AsyncAPI operation with, if any. + $ref: '#/$defs/asyncApiOutboundMessage' + title: AsyncApiMessage + description: An object used to configure the message to publish using the target operation. + subscription: + $ref: '#/$defs/asyncApiSubscription' + title: AsyncApiSubscription + description: An object used to configure the subscription to messages consumed using the target operation. authentication: $ref: '#/$defs/referenceableAuthenticationPolicy' - title: WithAsyncAPIAuthentication + title: AsyncAPIAuthentication description: The authentication policy, if any, to use when calling the AsyncAPI operation. - required: [ document, operationRef ] + oneOf: + - required: [ document, operation, message ] + - required: [ document, operation, subscription ] + - required: [ document, channel, message ] + - required: [ document, channel, subscription ] unevaluatedProperties: false - title: CallGRPC description: Defines the GRPC call to perform. @@ -1528,13 +1537,13 @@ $defs: catalog: type: object title: Catalog - description: The definition of a resource catalog + description: The definition of a resource catalog. unevaluatedProperties: false properties: endpoint: $ref: '#/$defs/endpoint' title: CatalogEndpoint - description: The root URL where the catalog is hosted + description: The root URL where the catalog is hosted. required: [ endpoint ] runtimeExpression: type: string @@ -1544,7 +1553,8 @@ $defs: processResult: type: object title: ProcessResult - description: The object returned by a run task when its return type has been set 'all' + description: The object returned by a run task when its return type has been set 'all'. + unevaluatedProperties: false properties: code: type: integer @@ -1553,9 +1563,95 @@ $defs: stdout: type: string title: ProcessStandardOutput - description: The content of the process's STDOUT + description: The content of the process's STDOUT. stderr: type: string title: ProcessStandardError - description: The content of the process's STDERR - required: [ code, stdout, stderr ] \ No newline at end of file + description: The content of the process's STDERR. + required: [ code, stdout, stderr ] + asyncApiServer: + type: object + title: AsyncApiServer + description: Configures the target server of an AsyncAPI operation. + unevaluatedProperties: false + properties: + name: + type: string + title: AsyncApiServerName + description: The target server's name. + variables: + type: object + title: AsyncApiServerVariables + description: The target server's variables, if any. + required: [ name ] + asyncApiOutboundMessage: + type: object + title: AsyncApiOutboundMessage + description: An object used to configure the message to publish using the target operation. + unevaluatedProperties: false + properties: + payload: + type: object + title: AsyncApiMessagePayload + description: The message's payload, if any. + additionalProperties: true + headers: + type: object + title: AsyncApiMessageHeaders + description: The message's headers, if any. + additionalProperties: true + asyncApiInboundMessage: + type: object + title: AsyncApiInboundMessage + description: Represents a message counsumed by an AsyncAPI subscription. + allOf: + - $ref: '#/$defs/asyncApiOutboundMessage' + properties: + correlationId: + type: string + title: AsyncApiMessageCorrelationId + description: The message's correlation id, if any. + asyncApiSubscription: + type: object + title: AsyncApiSubscription + description: An object used to configure the subscription to messages consumed using the target operation. + unevaluatedProperties: false + properties: + filter: + $ref: '#/$defs/runtimeExpression' + title: AsyncApiSubscriptionCorrelation + description: A runtime expression, if any, used to filter consumed messages. + consume: + $ref: '#/$defs/asyncApiMessageConsumptionPolicy' + title: AsyncApiMessageConsumptionPolicy + description: An object used to configure the subscription's message consumption policy. + required: [ consume ] + asyncApiMessageConsumptionPolicy: + type: object + title: AsyncApiMessageConsumptionPolicy + description: An object used to configure a subscription's message consumption policy. + unevaluatedProperties: false + properties: + for: + $ref: '#/$defs/duration' + title: AsyncApiMessageConsumptionPolicyFor + description: Specifies the time period over which messages will be consumed. + oneOf: + - properties: + amount: + type: integer + title: AsyncApiMessageConsumptionPolicyAmount + description: The amount of (filtered) messages to consume before disposing of the subscription. + required: [ amount ] + - properties: + while: + $ref: '#/$defs/runtimeExpression' + title: AsyncApiMessageConsumptionPolicyWhile + description: A runtime expression evaluated after each consumed (filtered) message to decide if message consumption should continue. + required: [ while ] + - properties: + until: + $ref: '#/$defs/runtimeExpression' + title: AsyncApiMessageConsumptionPolicyUntil + description: A runtime expression evaluated before each consumed (filtered) message to decide if message consumption should continue. + required: [ until ] \ No newline at end of file From b3615963fb93709ffdaa370317d178a4b83b2367 Mon Sep 17 00:00:00 2001 From: Charles d'Avernas Date: Wed, 8 Jan 2025 22:18:40 +0100 Subject: [PATCH 2/6] Fix examples Signed-off-by: Charles d'Avernas --- dsl-reference.md | 9 ++++----- examples/call-asyncapi-publish.yaml | 3 ++- examples/call-asyncapi-subscribe-consume-until.yaml | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dsl-reference.md b/dsl-reference.md index e4e2081a..4a787cda 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -348,7 +348,7 @@ do: operation: chat-inbox protocol: http subscription: - correlation: ${ . == $workflow.input.chat.roomId } + filter: ${ . == $workflow.input.chat.roomId } consume: amount: 5 for: @@ -2046,10 +2046,9 @@ Configures a subscription to an AsyncAPI operation. | Name | Type | Required | Description | |:-------|:------:|:----------:|:--------------| -| correlation | `string` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to filter consumed messages based on their [correlation id.](https://www.asyncapi.com/docs/reference/specification/v3.0.0#correlationIdObject). | +| filter | `string` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to filter consumed messages. | | consume | [`subscriptionLifetime`](#asyncapi-subscription-lifetime) | `yes` | An object used to configure the subscription's lifetime. | - #### Examples ```yaml @@ -2067,7 +2066,7 @@ do: operation: chat-inbox protocol: http subscription: - correlation: ${ . == $workflow.input.chat.roomId } + filter: ${ . == $workflow.input.chat.roomId } consume: amount: 5 for: @@ -2103,7 +2102,7 @@ do: endpoint: https://fake.com/docs/asyncapi.json operation: chat-inbox protocol: http - subscription: + filter: correlation: ${ . == $workflow.input.chat.roomId } consume: until: ($context.messages | length) == 5 diff --git a/examples/call-asyncapi-publish.yaml b/examples/call-asyncapi-publish.yaml index 9f3dc70c..93438242 100644 --- a/examples/call-asyncapi-publish.yaml +++ b/examples/call-asyncapi-publish.yaml @@ -10,7 +10,8 @@ do: document: endpoint: https://fake.com/docs/asyncapi.json operation: findPetsByStatus - server: staging + server: + name: staging message: payload: petId: ${ .pet.id } diff --git a/examples/call-asyncapi-subscribe-consume-until.yaml b/examples/call-asyncapi-subscribe-consume-until.yaml index bb12dedf..bec5a4f0 100644 --- a/examples/call-asyncapi-subscribe-consume-until.yaml +++ b/examples/call-asyncapi-subscribe-consume-until.yaml @@ -9,7 +9,6 @@ do: with: document: endpoint: https://fake.com/docs/asyncapi.json - operation: getNotifications channel: /notifications subscription: filter: '${ .correlationId == $context.userId and .payload.from.firstName == $context.contact.firstName and .payload.from.lastName == $context.contact.lastName }' From e78608b4b2668ddb6af2e36fc00fa17ff9c615c4 Mon Sep 17 00:00:00 2001 From: Charles d'Avernas Date: Wed, 8 Jan 2025 22:21:53 +0100 Subject: [PATCH 3/6] Fix examples Signed-off-by: Charles d'Avernas --- dsl-reference.md | 2 +- examples/call-asyncapi-subscribe-consume-amount.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dsl-reference.md b/dsl-reference.md index 4a787cda..c182464d 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -2102,7 +2102,7 @@ do: endpoint: https://fake.com/docs/asyncapi.json operation: chat-inbox protocol: http - filter: + subscription: correlation: ${ . == $workflow.input.chat.roomId } consume: until: ($context.messages | length) == 5 diff --git a/examples/call-asyncapi-subscribe-consume-amount.yaml b/examples/call-asyncapi-subscribe-consume-amount.yaml index bad9e5e8..29eb1cc3 100644 --- a/examples/call-asyncapi-subscribe-consume-amount.yaml +++ b/examples/call-asyncapi-subscribe-consume-amount.yaml @@ -10,7 +10,7 @@ do: document: endpoint: https://fake.com/docs/asyncapi.json operation: getNotifications - protoçol: ws + protocol: ws subscription: filter: '${ .correlationId == $context.userId and .payload.from.firstName == $context.contact.firstName and .payload.from.lastName == $context.contact.lastName }' consume: From 1819842519b865e971244803f712e286ff3a30ed Mon Sep 17 00:00:00 2001 From: Charles d'Avernas Date: Wed, 8 Jan 2025 22:24:33 +0100 Subject: [PATCH 4/6] Fix examples Signed-off-by: Charles d'Avernas --- dsl-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsl-reference.md b/dsl-reference.md index c182464d..dae9f850 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -2105,7 +2105,7 @@ do: subscription: correlation: ${ . == $workflow.input.chat.roomId } consume: - until: ($context.messages | length) == 5 + until: '${ ($context.messages | length) == 5 }' for: seconds: 10 ``` \ No newline at end of file From 2d0c892de1dbd7987d79d56702d9d7d8a12fe496 Mon Sep 17 00:00:00 2001 From: Charles d'Avernas Date: Wed, 8 Jan 2025 22:25:51 +0100 Subject: [PATCH 5/6] Fix examples Signed-off-by: Charles d'Avernas --- dsl-reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsl-reference.md b/dsl-reference.md index dae9f850..88da86ba 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -2058,7 +2058,7 @@ document: name: asyncapi-example version: '0.1.0' do: - - subscribeToChatInbox: + - subscribeToChatInboxForAmount: call: asyncapi with: document: @@ -2095,7 +2095,7 @@ document: name: asyncapi-example version: '0.1.0' do: - - subscribeToChatInbox: + - subscribeToChatInboxUntil: call: asyncapi with: document: From d1bd6ced2ea8cdfda586e4e9ad44c4e97756b9c2 Mon Sep 17 00:00:00 2001 From: Charles d'Avernas Date: Wed, 8 Jan 2025 22:26:18 +0100 Subject: [PATCH 6/6] Fix examples Signed-off-by: Charles d'Avernas --- dsl-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsl-reference.md b/dsl-reference.md index 88da86ba..78e9f8c2 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -2103,7 +2103,7 @@ do: operation: chat-inbox protocol: http subscription: - correlation: ${ . == $workflow.input.chat.roomId } + filter: ${ . == $workflow.input.chat.roomId } consume: until: '${ ($context.messages | length) == 5 }' for: