How to Subscribe to a Business Event

To subscribe to a business event:

  1. From the Components window, drag a Mediator service component into the SOA Composite Editor. This service component enables you to subscribe to the business event.
  2. In the Name field, enter a name.
  3. From the Template list, select Subscribe to Events.

    The dialog is refreshed to display an events table.

  4. Click the Add icon to select an event.

    The Event Chooser dialog appears.

  5. Select an existing event or click the Add icon to create a new event, and click OK.

    You are returned to the Create Mediator dialog.

  6. Complete the remaining fields of the dialog. Table 43-3 provides details.

    Table 43-3 Events Table of Create Mediator Dialog

    Element Description

    Consistency

    Click inside the Consistency column to select a level of delivery consistency for the event.

    • one and only one

      Events are delivered to the subscriber in its own global (that is, JTA) transaction. Any changes made by the subscriber within that transaction are committed after the event processing is complete. If the subscriber fails, the transaction is rolled back. Failed events with retriable exceptions are automatically retried a configured number of times before they are moved to the Error Hospital for recovery (that is, subject to manual retries). Failed events with nonretriable exceptions are moved to the Error Hospital without automatic retries, and are not recoverable.

    • guaranteed

      Events are delivered to the subscriber in a local JMS transaction. The subscriber can choose to create its own local transaction for processing, but it is committed independently of the rest of event processing. The guaranteed consistency level is a lower quality of service option than one and only one, because a local transaction is used instead of a global transaction. Failed events with retriable exceptions are automatically retried a configured number of times before they are moved to the Error Hospital where they are recoverable, (that is, subject to manual retries. Failed events with nonretriable exceptions are moved to the Error Hospital without automatic retries, and are not recoverable.

      For information about the Error Hospital, see Section "Recovering From Faults in the Error Hospital" of Administering Oracle SOA Suite and Oracle Business Process Management Suite.

    Durable

    Durable subscriptions prevent against message loss caused by different life cycles of publishers, subscribers, and the framework. Select an option:

    • yes: Events are retained if the subscriber is not running. This is the default selection.

    • no: Events are dropped if the subscriber is not running.

    Run as Publisher

    Select a security publishing option:

    • yes: The subscriber has the event publisher's security identity. This is the default selection.

    • no: The subscriber does not have the event publisher's security identity.

    Filter

    If you want to filter the event, double-click the Filter column of the selected event or select the event and click the filter icon (first icon) above the table. This displays the Expression Builder dialog. This dialog enables you to specify an XPath filter expression. A filter expression specifies that the contents (payload or headers) of a message be analyzed before any service is invoked. For example, you can apply a filter expression that specifies that a service be invoked only if the message includes a customer ID.

    When the expression logic is satisfied, the event is accepted for delivery.

    For more information about filters, see How to Specify an Expression for Filtering Messages.

    Figure 43-3 shows the Create Mediator dialog.

    Figure 43-3 Create Mediator Dialog

    Description of Figure 43-3 follows
    Description of "Figure 43-3 Create Mediator Dialog"
  7. Click OK.

    Figure 43-4 shows an icon on the left side that indicates that Oracle Mediator is configured for an event subscription.

    Figure 43-4 Configuration for Event Subscription

    Description of Figure 43-4 follows
    Description of "Figure 43-4 Configuration for Event Subscription"