In the Name field, enter a name for the Oracle Mediator service component. From the Template list, select Subscribe to Events, as shown in

Getting Started with Oracle Mediator 18-23 When you view the Oracle Mediator component in the SOA Composite Editor, the icon on the left side of the Oracle Mediator indicates that this Oracle Mediator is configured for an event subscription, as shown in Figure 18–22 . Figure 18–22 Oracle Mediator Component Created with the Subscribe to Events Template When you double-click the Oracle Mediator, the Mediator Editor appears, as shown in Figure 18–23 . Figure 18–23 Event Subscription Oracle Mediator in the Mediator Editor

18.4.7 What You May Need to Know About the Mediator Editor

This section provides information you should know about creating an Oracle Mediator service component.

18.4.7.1 Resequencing

The resequencing feature of the Oracle Mediator reorders sets of messages that might arrive to the Oracle Mediator in the wrong sequence. You can define resequencing for all operations in an Oracle Mediator or for a specific operation. The resequencer provides three resequencing strategies that reorder incoming messages based on the type of sequencing information they contain. For more information about resequencing in Oracle Mediator, see Chapter 18, Getting Started with Oracle Mediator. 18-24 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite

18.4.7.2 Routing Rules

Routing rules are mediation logic or execution logic that you define to achieve the requisite mediation. Below is an overview of the routing rule features; for more information about defining routing rules, see Section 19.2, Defining Routing Rules. You can specify the following to create a routing rule: ■ Operation or Event A routing rule can be triggered either by a service operation or an event subscription. The service operation can be synchronous, asynchronous, or one-way. ■ Java Callouts Java callouts perform external Java logic at various points in the execution of the Oracle Mediator. ■ Static Routing Rule A static routing rule is not expected to change depending on the invocation context. In this case, the routing can be an echo, a routing to another service, or a publishing of an event. Static routing rules include the following information: – Request Handler This defines how Oracle Mediator handles incoming requests. – Reply Handler This defines how the synchronous response from the called service is handled by Oracle Mediator. – Fault Handler This defines how the named or declared faults from the called service are handled by Oracle Mediator. – Callback Handler This defines how the asynchronous response and callback from the called service are handled by Oracle Mediator. – Timeout Handler in Callback This defines how long Oracle Mediator waits for the asynchronous response and callback before performing timeout handling for the particular asynchronous request. – Event Publishing and Service Invocation This calls other services or publishes an event depending on the configuration of the handlers. – Sequential or Parallel Execution Each routing rule execution can be configured to be either sequential that is, running in the same thread or parallel that is, running in different threads. – Filter Expression Note: For synchronous service invocations, the routing rule should always be sequential.