Click OK In the Faults section, click the Add another fault routing button shown in

19-14 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite To remove a fault routing section: The following steps are performed in the Routing Rules section of the Mediator Editor. ■ Highlight the fault routing you want to remove by clicking in the target service field, and then click Delete the selected fault routing, as shown in Figure 19–12 . Figure 19–12 Deleting a Fault Routing

19.2.2.7 How to Specify an Expression for Filtering Messages

The filter expression routing rule lets you filter messages based on their payload. If the filter expression for a given message instance evaluates to true, the message is delivered to the target service or event specified within the routing rule. For example, you route your data to customers in two different countries, such as US and Canada, but you only want notices regarding the MOBILE product line to be sent to US customers and the LANDLINE product line to customers in Canada. To implement this routing, you must define a routing rule for each component and operation pair that sends messages to the target customers. In addition, you specify filter expressions for the routing rules that send messages to the customers in the US or Canada. You can also define filter expression message properties or message headers. Note: You can route the same fault to multiple targets using different transformations. Creating Oracle Mediator Routing Rules 19-15 Filter Expression Message Properties Two examples of filter expression message properties are shown in Example 19–1 . Example 19–1 Filter Expression Message Properties in.property.custom.Priority = 1 in.property.tracking.ecid = 2 Filter Expression Message Headers Two examples of filter expression message headers are shown in Example 19–2 . Example 19–2 Filter Expression Message Headers in.header.wsse_Securitywsse:SecurityPriority = 234 in.header.wsse_Securitywsse:SecurityPriority = 234 For the preceding filter expression message headers to work, you must add the attribute shown in Example 19–3 to the root element of the .mplan file. Example 19–3 Attribute to Add wsse = http:docs.oasis-open.orgwss200401oasis-200401-wss-wssecurity- secext-1.0.xsd To specify an expression for filtering messages: You can use the Expression Builder to graphically create a filter expression. The Expression Builder dialog contains the components and controls that assist you in designing a filter expression.

1. To the right of the Filter Expression field in the Routing Rules section, click the

Invoke Expression Builder icon. The Expression Builder dialog appears, as shown in Figure 19–13 . 19-16 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 19–13 Expression Builder Dialog

2. Double-click a value in the Variables field or the Functions palette to add the

value to the Expression field. Using a combination of variable elements, functions, and manually entered text, you can build an expression by which you want message payloads to be filtered for a given routing rule. The following list describes each of the fields in the Expression Builder dialog: ■ Expression This field contains the actual expression used to filter messages. You can enter the filter expression either manually or by using the Variable field and the Functions palette. Using the icons on the upper right side of this field, you can undo the last edit made, redo the last edit made, or clear the entire Expression field. ■ Variables This field contains the message defined for an Oracle Mediator component. Oracle JDeveloper parses the Oracle Mediator WSDL file and presents the message definition in the Variables field. The input message is stored in the in variable, and you can use the in.properties to access the properties of an input message. If the input message consists of multiple parts, then you can use in.partname to access a part of an input message. ■ Functions Palette This list provides a list of functions that you can include in an expression. When you select a function, a preview of how that function appears when