Show TOC

Defining Dynamic RoutingLocate this document in the navigation structure

Context

When using routing conditions or routing rules in receiver determinations, 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 receiver determination editor. Therefore, this kind of routing is still static with regard to the individual receiver names. A dynamic routing option, which even includes the receiver names, is the enhanced (dynamic) receiver determination.

In an extended receiver determination, you can configure runtime behavior to ensure that the names of the receivers are determined at runtime by a mapping program. A typical usage case is if you do not yet know the names of the receivers at configuration time. However, note that if you want to implement a dynamic receiver determination, you also have to maintain a corresponding mapping (to be defined in the ES Repository). The mapping can be specified in such a way that it reads a list of receivers from a table or from the payload of the message at runtime.

Procedure

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

      Note

      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.

  2. Define an extended (dynamic) receiver determination 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.

    More information: Defining Extended (Dynamic) Receiver Determination