Dynamically Changing a Service's Connection at Run Time
You can run a service using a connection other than the default connection that was associated with the service when the service was created. To override the default, you must code your flow to pass a value through the pipeline into a service's $connectionName field.
For example, you have a flow whose primary purpose is to update the data of a component interface (CI) in a PeopleSoft system. However, you want the flow to have the capability to update the CI in a test PeopleSoft system - with the decision of which PeopleSoft system to update to be made programmatically at run time. The output signature of the flow's first service contains a field called Target. The flow could branch based on the value in Target. If Target contains the value Production, the second service in the flow would ignore $connectionName-thus using its default connection to connect to (and then update) the production PeopleSoft system CI. However, if Target contains the value Test, the second service in the flow would use the value in the $connectionName from the pipeline and connect to (and then update) the test PeopleSoft system CI.
Keep in mind these restrictions when using dynamic connections:
Both connections - the default and override - must use the same PeopleSoft component interface.
The $connectionName field is present only in services created with
Designer