From the File menu, select Save All.

19-2 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite

19.2.1 How To Access the Routing Rules Section

You define the routing rules in the Routing Rules section of the Mediator Editor. To access the routing rules section: You can access the Routing Rules section of the Mediator Editor using one of the following methods: ■ From the SOA Composite Editor: a. Double-click the icon that represents the Oracle Mediator for which you want to specify the routing rules. b. If the Routing Rules section is not visible, click the Plus + icon next to Routing Rules . ■ From the Application Navigator: a. In the Application Navigator, expand the SOA project and then expand the SOA Content folder.

b. In the SOA Content folder, double-click the name of the Oracle Mediator file

in which you want to specify the routing rules. The Oracle Mediator file has an MPLAN extension. c. If the Routing Rules section is not visible, click the Plus + icon next to Routing Rules . Figure 19–1 shows the Routing Rules section of the Mediator Editor. Figure 19–1 Mediator Editor- Routing Rules Section Creating Oracle Mediator Routing Rules 19-3 Figure 19–2 lists and describes the icons in the Routing Rules section. Figure 19–2 Routing Rule Section Icons

19.2.2 How to Create Static Routing Rules

When you define static routing rules, you can configure the following information and types of rules: ■ Target service Oracle Mediator sends messages to the target service you specify. This service can either be defined as a WSDL interface or a Java interface. For information about invoking a target service, see Section 19.2.2.1, How to Specify Oracle Mediator Services or Events . ■ Execution type Oracle Mediator executes routing rules either sequentially or in parallel. For information about specifying an execution type, see Section 19.2.2.3, How to Specify Sequential or Parallel Execution . ■ Reply, callback, and fault handlers You can define how Oracle Mediator handles synchronous reply, callback, and fault messages. For information about handlers, see Section 19.2.2.4, How to Configure Response Messages and Section 19.2.2.6, How to Handle Faults . ■ Filter expression You can define a filter expression that is applied to the message content payload or headers. When you define a filter, the contents are analyzed before any service is invoked. For example, you might apply a filter expression that specifies that a service be invoked only if the message includes a customer ID, or if the value for that customer ID matches a certain pattern. For information about specifying filter expressions, see Section 19.2.2.7, How to Specify an Expression for Filtering Messages . ■ Transformations 19-4 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Oracle Mediator can transform message data before forwarding the message to a service. You can define transformations to set a value on the target payload by mapping data or by assigning values. The XSLT Mapper lets you to define transformations that apply to the whole message body to convert messages from one XML schema to another. The Assign Values function works on individual fields. Using this dialog, you can assign values from the message for example, payload and headers, from a constant, or from various system properties, such as the properties of an adapter present in the data path. For information about defining transformations, see Section 19.2.2.8, How to Create Transformations and Section 19.2.2.9, How to Assign Values . ■ Accessing header variables from expressions Oracle Mediator can detect any SOAP headers that are used in building the expression for the current routing rule operation. For information about accessing headers, see Section 19.2.2.11, How to Access Headers for Filters and Assignments and Section 19.2.2.11.2, Manual Expression Building for Accessing Properties for Filters and Assignments . ■ Schematron-based validations You can specify the Schematron files that Oracle Mediator should use to validate different parts of an inbound message. For information about performing Schematron-based validations, see Section 19.2.2.12, How to Use Semantic Validation . ■ Java callout Custom Java class callouts let you use regular expressions with Java code, when regular expressions alone do not suffice. For information about using Java callouts, see Section 19.2.2.13, How to Use Java Callouts . ■ User-defined extension functions These are your own set of functions that can be used by the XSLT Mapper. For information about using user-defined extension functions, see To add user-defined extension functions: .

19.2.2.1 How to Specify Oracle Mediator Services or Events

After creating an Oracle Mediator component, you associate it with inbound service operations or event subscriptions and with outbound targets. Targets are outbound service operations or event publishing. A target specifies the next service or event to which an Oracle Mediator sends messages and also specifies which service operation to invoke. You can specify a service or an event as a target type. You can also echo source messages back to the initial caller after any transformation, validations, assignments, or sequencing operations are performed. An echo can only be specified if the Oracle Mediator component has a synchronous or asynchronous interface. Whether the echo is synchronous or asynchronous depends on the WSDL file of the caller. The echo option is only available for inbound service operations and is not available for event subscriptions. The purpose of the echo option is to expose all the Oracle Mediator functionality as a callable service without having to route it to any other service. For example, you can call an Oracle Mediator to perform a transformation, a validation, or an assignment, and then echo the Oracle Mediator back to your application without routing it anywhere else. You can specify multiple routings for an inbound operation or event. Each routing is mapped to one target service invocation or event. Therefore, to specify multiple