How to Swap Relay Connections at Runtime

If you require to swap relay connections 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

  1. 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.

  1. Add a source step:
  • Choose “Replace” in the connection field and specify the name of the flow parameter.

  1. In this example, the rest of the flow retrieves data from a MySQL relay and sends it to a Buffer.

  2. 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.”

  1. 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