Remote Service instances are used in different contexts for reusing certain functions. In such scenarios it is important to make sure that messages which are originating from a calling flow does not affect other flows. Sender selectors can be extended to resolve such situations. Fiorano eStudio tool provides an option to auto generate the route selectors for a remote service instance so that components connected to the instance will only get the messages sent to this remote service. It simplifies routing by automatically setting Message Selectors on its output route(s) based on the components that are connected to its input port. 

Using Auto set Selectors 

To define Selectors on the output port(s) of a component, just right-click and select Autoset Selectors option.

Scenario

Consider a scenario where there are multiple applications corresponding to various functions like inventory, sales. All the applications use a single SMTP component for sending out error messages but they need to log the errors in their own dedicated database table. Below is an example with a scenario and the corresponding steps explained.

In the below Event Process which correspond to inventory, scheduler fetches the status of inventory from different Vendors by making calls to External Web Services and if there are any errors in their status, they are sent to the SMTP service which is a Remote Service Instance. The SMTP service in turn is connected to DB which inserts the error details into an Inventory Errors Database.

This Remote Service Instance is listening to error messages from different components of different Event Processes. So it is possible that errors coming in other flows like Sales will also be inserted into inventory database. To avoid this auto select feature can be used.


Figure 1: Event Process that uses the Remote Service Instance - SMTP component to listen to errors from External Services

To autoset the selectors, right-click the SMTP component and select Autoset Selectors option.


Figure 2: Selecting Autoset Selectors option on the Remote service Instance

After selecting Autoset Selectors option on the Remote Service Instance, that is, SMTP component, it listens to only those components which are connected to its input port. 

Notice that:

  • Filter sign appears next to the filterInventoryErrors route indicating that the filtering is done
  • Senders selected will be only those ones connected to its input port

Figure 3: Selectors autoset using Autoset Selectors option

Icon

The option needs to be used after making all the connections. If new inputs or outputs are added, the auto select option needs to be selected again.

Adaptavist ThemeBuilder EngineAtlassian Confluence