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
@@ -300,15 +304,16 @@ The [AsyncAPI Call](#asyncapi-call) enables workflows to interact with external
300
304
301
305
###### Properties
302
306
303
-
| Name | Type | Required | Description|
304
-
|:--|:---:|:---:|:---|
305
-
| document | [`externalResource`](#external-resource) | `yes` | The AsyncAPI document that defines the operation to call. |
306
-
| operationRef | `string` | `yes` | A reference to the AsyncAPI operation to call. |
307
-
| server | `string` | `no` | A reference to the server to call the specified AsyncAPI operation on.<br>If not set, default to the first server matching the operation's channel. |
308
-
| message | `string` | `no` | The name of the message to use. <br>If not set, defaults to the first message defined by the operation. |
309
-
| binding | `string` | `no` | The name of the binding to use. <br>If not set, defaults to the first binding defined by the operation |
310
-
| payload | `any` | `no` | The operation's payload, as defined by the configured message |
311
-
| authentication | `string`<br>[`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the AsyncAPI operation. |
307
+
| Name | Type | Required | Description |
308
+
|:-------|:------:|:----------:|:--------------|
309
+
| 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. |
310
+
| 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.<br>*Used only in case the referenced document uses AsyncAPI `v2.6.0`.* |
311
+
| operation | `string` | `yes` | A reference to the AsyncAPI [operation](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationObject) to call.<br>*Used only in case the referenced document uses AsyncAPI `v3.0.0`.* |
312
+
| 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.<br>If not set, default to the first [server](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverObject) matching the operation's channel. |
313
+
| 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). <br>Ignored if `server` has been set.<br>*Supported values are: `amqp`, `amqp1`, `anypointmq`, `googlepubsub`, `http`, `ibmmq`, `jms`, `kafka`, `mercure`, `mqtt`, `mqtt5`, `nats`, `pulsar`, `redis`, `sns`, `solace`, `sqs`, `stomp` and `ws`* |
314
+
| message | [`asyncApiMessage`](#asyncapi-message) | `no` | An object used to configure the message to publish using the target operation.<br>*Required if `subscription` has not been set.* |
315
+
| subscription | [`asyncApiSubscription`](#asyncapi-subscription) | `no` | An object used to configure the subscription to messages consumed using the target operation.<br>*Required if `message` has not been set.* |
316
+
| authentication | `string`<br>[`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the AsyncAPI operation. |
312
317
313
318
###### Examples
314
319
@@ -319,17 +324,35 @@ document:
319
324
name: asyncapi-example
320
325
version: '0.1.0'
321
326
do:
322
-
- findPet:
327
+
- publishGreetings:
328
+
call: asyncapi
329
+
with:
330
+
document:
331
+
endpoint: https://fake.com/docs/asyncapi.json
332
+
operation: greet
333
+
server:
334
+
name: greetingsServer
335
+
variables:
336
+
environment: dev
337
+
message:
338
+
payload:
339
+
greetings: Hello, World!
340
+
headers:
341
+
foo: bar
342
+
bar: baz
343
+
- subscribeToChatInbox:
323
344
call: asyncapi
324
345
with:
325
346
document:
326
347
endpoint: https://fake.com/docs/asyncapi.json
327
-
operationRef: findPetsByStatus
328
-
server: staging
329
-
message: getPetByStatusQuery
330
-
binding: http
331
-
payload:
332
-
petId: ${ .pet.id }
348
+
operation: chat-inbox
349
+
protocol: http
350
+
subscription:
351
+
filter: ${ . == $workflow.input.chat.roomId }
352
+
consume:
353
+
amount: 5
354
+
for:
355
+
seconds: 10
333
356
```
334
357
335
358
##### gRPC Call
@@ -1941,4 +1964,149 @@ do:
1941
1964
version: '0.1.0'
1942
1965
input: {}
1943
1966
return: none
1967
+
```
1968
+
1969
+
### AsyncAPI Server
1970
+
1971
+
Configures the target server of an AsyncAPI operation.
1972
+
1973
+
#### Properties
1974
+
1975
+
| Name | Type | Required | Description |
1976
+
|:-------|:------:|:----------:|:--------------|
1977
+
| 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. |
1978
+
| variables | `object` | `no` | The target [server's variables](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverVariableObject), if any. |
1979
+
1980
+
#### Examples
1981
+
1982
+
```yaml
1983
+
document:
1984
+
dsl: '1.0.0-alpha5'
1985
+
namespace: test
1986
+
name: asyncapi-example
1987
+
version: '0.1.0'
1988
+
do:
1989
+
- publishGreetings:
1990
+
call: asyncapi
1991
+
with:
1992
+
document:
1993
+
endpoint: https://fake.com/docs/asyncapi.json
1994
+
operation: greet
1995
+
server:
1996
+
name: greetingsServer
1997
+
variables:
1998
+
environment: dev
1999
+
message:
2000
+
payload:
2001
+
greetings: Hello, World!
2002
+
headers:
2003
+
foo: bar
2004
+
bar: baz
2005
+
```
2006
+
2007
+
### AsyncAPI Message
2008
+
2009
+
Configures an AsyncAPI message to publish.
2010
+
2011
+
#### Properties
2012
+
2013
+
| Name | Type | Required | Description |
2014
+
|:-------|:------:|:----------:|:--------------|
2015
+
| payload | `object` | `no` | The message's payload, if any. |
2016
+
| headers | `object` | `no` | The message's headers, if any. |
2017
+
2018
+
#### Examples
2019
+
2020
+
```yaml
2021
+
document:
2022
+
dsl: '1.0.0-alpha5'
2023
+
namespace: test
2024
+
name: asyncapi-example
2025
+
version: '0.1.0'
2026
+
do:
2027
+
- publishGreetings:
2028
+
call: asyncapi
2029
+
with:
2030
+
document:
2031
+
endpoint: https://fake.com/docs/asyncapi.json
2032
+
operation: greet
2033
+
protocol: http
2034
+
message:
2035
+
payload:
2036
+
greetings: Hello, World!
2037
+
headers:
2038
+
foo: bar
2039
+
bar: baz
2040
+
```
2041
+
2042
+
### AsyncAPI Subscription
2043
+
2044
+
Configures a subscription to an AsyncAPI operation.
2045
+
2046
+
#### Properties
2047
+
2048
+
| Name | Type | Required | Description |
2049
+
|:-------|:------:|:----------:|:--------------|
2050
+
| filter | `string` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to filter consumed messages. |
2051
+
| consume | [`subscriptionLifetime`](#asyncapi-subscription-lifetime) | `yes` | An object used to configure the subscription's lifetime. |
2052
+
2053
+
#### Examples
2054
+
2055
+
```yaml
2056
+
document:
2057
+
dsl: '1.0.0-alpha5'
2058
+
namespace: test
2059
+
name: asyncapi-example
2060
+
version: '0.1.0'
2061
+
do:
2062
+
- subscribeToChatInboxForAmount:
2063
+
call: asyncapi
2064
+
with:
2065
+
document:
2066
+
endpoint: https://fake.com/docs/asyncapi.json
2067
+
operation: chat-inbox
2068
+
protocol: http
2069
+
subscription:
2070
+
filter: ${ . == $workflow.input.chat.roomId }
2071
+
consume:
2072
+
amount: 5
2073
+
for:
2074
+
seconds: 10
2075
+
```
2076
+
2077
+
### AsyncAPI Subscription Lifetime
2078
+
2079
+
Configures the lifetime of an AsyncAPI subscription
2080
+
2081
+
#### Properties
2082
+
2083
+
| Name | Type | Required | Description |
2084
+
|:-------|:------:|:----------:|:--------------|
2085
+
| amount | `integer` | `no` | The amount of messages to consume.<br>*Required if `while` and `until` have not been set.* |
2086
+
| for | [`duration`](#duration) | `no` | The [`duration`](#duration) that defines for how long to consume messages. |
2087
+
| while | `string` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to determine whether or not to keep consuming messages.<br>*Required if `amount` and `until` have not been set.* |
2088
+
| until | `string` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to determine until when to consume messages.<br>*Required if `amount` and `while` have not been set.* |
0 commit comments