If you require to swap relays at runtime, please follow the instructions below:
Illustrated below is an example of a flow that passes relay details into a flow as parameters and changes the relay connection at runtime
- Add a Parameter to the flow:
- Specify a name and choose “String” as the data type.
- If no default value is specified, check the “Required” box to ensure a value is provided when executing the flow.
- Add a source step:
- Choose “Replace” in the connection field and specify the name of the flow parameter.
-
In this example, the rest of the flow retrieves data from a MySQL relay and sends it to a Buffer.
-
When executing the flow:
- Specify the Relay name in the format:
$$relay:NameOfRelay|Endpoint.
- The name of the relay can be found on the relay page, and the endpoint can be selected from the list of available endpoints. For example, the relay name is “global-mysqlserver,” and there are two endpoints: “MySQLServer” and “TestServer.”
- When executing the flow:
- Specify the relay using the correct syntax as shown in the image below.
For more information on getting a list of Relays in an organization and passing them into a flow, Refer to: How to Get a list of Relays to Swap at RunTime