IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Building mediation flows

Selecting endpoints dynamically

You can configure your mediation flow component to route messages to endpoints that are determined dynamically at run time. Since these service endpoints are not statically defined in the mediation flow, you can change service endpoints without the need to update and redeploy the mediation flow.

An endpoint in a mediation module can be selected either statically by using an import's binding, or dynamically by using an endpoint address identified by a target address element in the message header. This endpoint address can be added to the target address element in the message header by mediation primitives within a mediation flow. The endpoint address could be updated with information from a registry, a database, or with information from the message itself.

In order for the runtime to implement dynamic routing on a request, the Use dynamic endpoint property of the callout node must be set. When this property is set, the callout will route the message using the endpoint address in element /headers/SMOHeader/Target/address in the message. If there is no endpoint address information in the message header, a service will be selected statically, if an import is wired to the associated reference of the callout in the mediation flow component. By default, the Use dynamic endpoint property is set, and therefore dynamic routing is enabled. For a summary of this behavior, see "Message routing when dynamic endpoint property is set" in the topic links below:

Dynamic endpoint support does not require you to wire a reference to an import. However, if you want to provide default configuration settings for the dynamic endpoint, you can use a wired import. After a reference is wired to an import, the configuration settings of the import apply to all dynamic endpoints using that reference.

For example, if you want to influence whether a service is called synchronously or asynchronously, from the callout or Service Invoke primitive, you can specify the Preferred interaction style on the import; and wire the reference to this import. Similarly, you can configure the security settings for a web service dynamic endpoint, by using a wired import with web service binding.

Building mediation flows