To the right of the Filter Expression field in the Routing Rules section, click the Double-click a value in the Variables field or the Functions palette to add the

19-18 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 19–15 Expression Builder Dialog – Variables Element Inserted

4. From the Functions list, select the function to apply to the message payload. For

example, equals. Functions are grouped in categories that are listed when you click the down arrow in the Functions list. For example, if you click the down arrow and select Logical Functions , the list appears as shown in Figure 19–15 .

5. Click Insert Into Expression.

The XPath expression for the selected function is inserted into the Expression field. 6. Complete the expression. In this example, the Customer ID must equal1001 to evaluate to true, as shown in Figure 19–16 . Creating Oracle Mediator Routing Rules 19-19 Figure 19–16 Sample Expression Builder Dialog – Value Entered 7. If there are any errors, you can edit the expression manually, or use the expression editing icons, which are summarized in Figure 19–17 . Figure 19–17 Expression Editing Icons

8. Click OK.

The expression is added to the Routing Rules section. To modify or delete a filter expression, double-click the Add Filter Expression icon, and then modify or delete the expression in the Expression field of the Expression Builder.

19.2.2.8 How to Create Transformations

Oracle JDeveloper provides an XSLT Mapper that lets you specify a mapper file XSL file to transform data from one XML schema expressed as an XSD file to another. The XSLT Mapper enables data interchange among applications using different schemas. For example, you can map an incoming purchase order schema to an outgoing invoice schema. After you define an XSL file, you can reuse it in multiple routing rule specifications. To create a transformation: 1. In the Routing Rules section, click the Select an existing mapper file or create a new one icon to the right of the Transform Using field. 19-20 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite The Request Transformation Map dialog appears. You can select an existing XSL file or create a new XSL file with the XSLT Mapper to perform the required transformation. 2. Do one of the following: ■ If the mapping file exists, select Use Existing Mapper File and then click Browse to find and select the mapper file to use. ■ To create a mapper file, select Create New Mapper File, and then enter the input information. 3. Repeat the above steps for any synchronous reply, callback, response, or fault messages. In case of synchronous reply or fault message, the Reply Transformation Map dialog or the Fault Transformation Map dialog contains an Include Request in the Reply Payload option, as shown in Figure 19–18 . Figure 19–18 Reply Transformation Map Dialog 4. To create an initial variable that contains the original message of a synchronous interaction, select the Include Request in the Reply Payload option. The variable is created, as shown in Figure 19–19 . Figure 19–19 Initial Variable in XSL File Note: An initial message can also consist of multiple parts. You can use initial.partname to access a part of the initial message. If the parts of the inbound and outbound messages are identical, then no transformation is required for data interchange.