Introduction to Extending Error Handling Implementing an Error Handling Extension

Configuring Oracle AIA Processes for Error Handling and Trace Logging 24-33 For more information about customizing error notifications, see Customizing Error Notification Emails in Oracle Fusion Middleware Infrastructure Components and Utilities Users Guide for Oracle Application Integration Architecture Foundation Pack.

24.9 Extending Error Handling

This section includes the following topics: ■ Section 24.9.1, Introduction to Extending Error Handling ■ Section 24.9.2, Implementing an Error Handling Extension This section provides an overview of error handling extension and discusses how to implement an error handling extension.

24.9.1 Introduction to Extending Error Handling

The default error handling behavior for BPEL and Mediator errors is to route fault messages to the Oracle AIA common error handler, which logs the error and delivers the fault messages to the Oracle AIA error topic. The default Oracle AIA error listener subscribes to this Oracle AIA error topic, picks up the fault message, and calls the error notification process, which issues a notification to the Oracle BPM Worklist if configured to do so. For information about using the Oracle BPM Worklist with Oracle AIA error handling, see Using the Oracle BPM Worklist in Oracle Fusion Middleware Infrastructure Components and Utilities Users Guide for Oracle Application Integration Architecture Foundation Pack. You can extend the Error Handling Framework to perform actions beyond these default behaviors. For example, you may want a particular error to trigger default error-handling behavior, in addition to extended error handling behavior, such as updating a table and creating a new request in an application. To implement an error-handling extension, you may also need to extend fault messages to provide additional values. For more information about extending fault messages, see Section 24.8, Extending Fault Messages.

24.9.2 Implementing an Error Handling Extension

To implement an error handling extension: 1. On the Error Notifications page, enter an Error Type field value for an error code, system code, process name, and service name value combination. For more information about the Error Notifications page, see How to Set Up AIA Error Handling Configuration Details in Oracle Fusion Middleware Infrastructure Components and Utilities Users Guide for Oracle Application Integration Architecture Foundation Pack. The Error Handling Framework uses the Error Type value to stamp the JMSCorrelationID JMS header. The JMSCorrelationID is used by the custom error listener to identify fault messages that require its custom error handling. 2. Implement an error extension listener to subscribe to the Oracle AIA error topic. 24-34 Developers Guide for Oracle Application Integration Architecture Foundation Pack Configure an error extension listener to filter fault messages based on the JMS Header - JMSCorrelationID value defined by the error type you created in step 1. For example, you can create an Order Fallout error extension listener that will pick up fault messages with the JMSCorrelationID value of ORDER_FO. For this example the Error Type field value defined on the Error Notifications page in step 1 should be ORDER_FO. The Order Fallout error extension listener can then extract values from the fault message, extended to include Order Number and Fulfillment System values, for example. The error extension listener can then pass those values to an Order Fallout Management application, for example, which can use those values to update Order tables and create new service requests. The extended error handling flow is illustrated in Figure 24–13 . Figure 24–13 Sample Extended Error Handling Flow Alongside a Default Error Handling Flow

24.10 Configuring Oracle AIA Processes for Trace Logging