When using routing conditions, the receivers of a message are determined at runtime by evaluating the condition (which depends on the content of the message). However, the names of the receivers have already been defined at configuration time in the Integration Directory (integrated configuration, Receiver tab).
When you configure routing that way (referred to as standard receiver determination ), you have to specify the receiver names as part of the configuration procedure in Integration Directory.
A more flexible way to configure routing is offered by the extended receiver determination .
In an extended receiver determination, you can specify a mapping program that takes over the task of finding out the actual receivers at runtime. You can design the mapping program that way that the receivers of the message are read from a list that might be part of an external data source (mapping look-up approach).
This approach has the following advantages:
Storing receiver names in an external data source allows to update of the receiver list without the need of a cache refresh.
Storing receiver names outside the Integration Directory allows non-integration experts to maintain receivers.
This section applies to the use case when configuring message processing using the Advanced Adapter Engine only.
Define a suitable mapping in the ES Repository.
More information: Mapping Messages to Each Other Using Mapping Objects
In particular, do the following:
Define an operation mapping and assign the abstract service interface ReceiverDetermination as the target interface. The service interface ReceiverDetermination is in the Enterprise Services Repository in the software component SAP BASIS (namespace http://sap.com/xi/XI/System).
Define the message mapping or mapping program that is to determine the receivers at runtime. Assign this message mapping or mapping program to the operation mapping specified before.
The service interface uses the message type Receivers and the data type Receivers. The data type Receivers describes a list of receivers and has the following structure:
The following instance of the data type Receivers contains two receivers. The first receiver comprises a party (element Party) and communication component (element Service) and is identified by a DUNS number; the second receiver comprises a communication component without a party.
<Receivers> <Receiver> <Party agency="016" scheme="DUNS"></Party> <Service>"MyService"</Service> </Receiver> <Receiver> <Party agency="http://sap.com/xi/XI" scheme="XIParty"></Party> <Service>"ABC_200"</Service> </Receiver> </Receivers>
You can specify party and communication component for each receiver.
Define an integrated configuration in the Integration Directory
Enter the outbound interface of the operation mapping from above in the key of the receiver determination as the outbound interface. Assign this operation mapping to the receiver determination. Furthermore, define outbound processing (sender adapters) for all configured possible receivers.
More information on the steps to be performed in Integration Directory:
As for AEX no wildcards ( *) can be used to mask the key of configuration objects, you need to specify the name of the potential receivers when defining the integrated configuration.
If the mapping program returns an XML file with empty or missing <Service></Service> tag, the message is routed to the default receiver (that is configured in the integrated configuration, Receiver tab, under If No Receiver Is Found, Proceed as Follows , option Select the Following Receiver: ).