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
Copy file name to clipboardExpand all lines: dsl-reference.md
+184-16
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,10 @@
56
56
+[HTTP Request](#http-request)
57
57
+[URI Template](#uri-template)
58
58
+[Process Result](#process-result)
59
+
+[AsyncAPI Server](#asyncapi-server)
60
+
+[AsyncAPI Message](#asyncapi-message)
61
+
+[AsyncAPI Subscription](#asyncapi-subscription)
62
+
59
63
60
64
## Abstract
61
65
@@ -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
@@ -1940,4 +1963,149 @@ do:
1940
1963
version: '0.1.0'
1941
1964
input: {}
1942
1965
return: none
1966
+
```
1967
+
1968
+
### AsyncAPI Server
1969
+
1970
+
Configures the target server of an AsyncAPI operation.
1971
+
1972
+
#### Properties
1973
+
1974
+
| Name | Type | Required | Description |
1975
+
|:-------|:------:|:----------:|:--------------|
1976
+
| 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. |
1977
+
| variables | `object` | `no` | The target [server's variables](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverVariableObject), if any. |
1978
+
1979
+
#### Examples
1980
+
1981
+
```yaml
1982
+
document:
1983
+
dsl: '1.0.0-alpha5'
1984
+
namespace: test
1985
+
name: asyncapi-example
1986
+
version: '0.1.0'
1987
+
do:
1988
+
- publishGreetings:
1989
+
call: asyncapi
1990
+
with:
1991
+
document:
1992
+
endpoint: https://fake.com/docs/asyncapi.json
1993
+
operation: greet
1994
+
server:
1995
+
name: greetingsServer
1996
+
variables:
1997
+
environment: dev
1998
+
message:
1999
+
payload:
2000
+
greetings: Hello, World!
2001
+
headers:
2002
+
foo: bar
2003
+
bar: baz
2004
+
```
2005
+
2006
+
### AsyncAPI Message
2007
+
2008
+
Configures an AsyncAPI message to publish.
2009
+
2010
+
#### Properties
2011
+
2012
+
| Name | Type | Required | Description |
2013
+
|:-------|:------:|:----------:|:--------------|
2014
+
| payload | `object` | `no` | The message's payload, if any. |
2015
+
| headers | `object` | `no` | The message's headers, if any. |
2016
+
2017
+
#### Examples
2018
+
2019
+
```yaml
2020
+
document:
2021
+
dsl: '1.0.0-alpha5'
2022
+
namespace: test
2023
+
name: asyncapi-example
2024
+
version: '0.1.0'
2025
+
do:
2026
+
- publishGreetings:
2027
+
call: asyncapi
2028
+
with:
2029
+
document:
2030
+
endpoint: https://fake.com/docs/asyncapi.json
2031
+
operation: greet
2032
+
protocol: http
2033
+
message:
2034
+
payload:
2035
+
greetings: Hello, World!
2036
+
headers:
2037
+
foo: bar
2038
+
bar: baz
2039
+
```
2040
+
2041
+
### AsyncAPI Subscription
2042
+
2043
+
Configures a subscription to an AsyncAPI operation.
2044
+
2045
+
#### Properties
2046
+
2047
+
| Name | Type | Required | Description |
2048
+
|:-------|:------:|:----------:|:--------------|
2049
+
| filter | `string` | `no` | A [runtime expression](dsl.md#runtime-expressions), if any, used to filter consumed messages. |
2050
+
| consume | [`subscriptionLifetime`](#asyncapi-subscription-lifetime) | `yes` | An object used to configure the subscription's lifetime. |
2051
+
2052
+
#### Examples
2053
+
2054
+
```yaml
2055
+
document:
2056
+
dsl: '1.0.0-alpha5'
2057
+
namespace: test
2058
+
name: asyncapi-example
2059
+
version: '0.1.0'
2060
+
do:
2061
+
- subscribeToChatInboxForAmount:
2062
+
call: asyncapi
2063
+
with:
2064
+
document:
2065
+
endpoint: https://fake.com/docs/asyncapi.json
2066
+
operation: chat-inbox
2067
+
protocol: http
2068
+
subscription:
2069
+
filter: ${ . == $workflow.input.chat.roomId }
2070
+
consume:
2071
+
amount: 5
2072
+
for:
2073
+
seconds: 10
2074
+
```
2075
+
2076
+
### AsyncAPI Subscription Lifetime
2077
+
2078
+
Configures the lifetime of an AsyncAPI subscription
2079
+
2080
+
#### Properties
2081
+
2082
+
| Name | Type | Required | Description |
2083
+
|:-------|:------:|:----------:|:--------------|
2084
+
| amount | `integer` | `no` | The amount of messages to consume.<br>*Required if `while` and `until` have not been set.* |
2085
+
| for | [`duration`](#duration) | `no` | The [`duration`](#duration) that defines for how long to consume messages. |
2086
+
| 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.* |
2087
+
| 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