In the Error Extension Handler field on the Error Notifications page, enter the

24-30 Developers Guide for Oracle Application Integration Architecture Foundation Pack Extending fault details can add functionally rich information to the fault message to help the integration flow consumer better understand the context of the fault, leading to more effective error resolution. These additional fault details can be used to enable extended error handling functionality as well. For more information about extending error handling, see Section 24.9, Extending Error Handling. For example, you can enrich the fault message with Order Number and Fulfillment System values, which are required to perform extended error handling tasks that update Order tables and create new service requests in an Order Fallout Management application.

24.8.2 Extending a Fault Message

Extending a fault message uses the ApplicationFaultData element, highlighted in Figure 24–11 , of type xsd:anyType in the FaultType message schema definition in Meta.xsd. Figure 24–11 ApplicationFaultData Element Highlighted in Meta.xsd The ApplicationFaultData element is populated by a fault extension handler that you will configure to be invoked by the Error Handling Framework at run time in the case of BPEL faults. The input to the fault extension handler is the default fault message. The fault extension handler enriches the fault message with additional content defined by the ApplicationFaultData element. Control of the enriched fault message is passed from the fault extension handler to the Error Handling Framework, which then passes the fault message on to the Oracle AIA common error handler for further processing. To extend a fault message: 1. Create a fault extension handler that will be invoked to enrich the fault message.

2. In the Error Extension Handler field on the Error Notifications page, enter the

name of the error extension handler that will be invoked to extend the fault Configuring Oracle AIA Processes for Error Handling and Trace Logging 24-31 message. For example, enter ORDERFOEH_EXT for an Order Fallout error extension handler. Based on the combination of error code, system code, service name, and process name parameters, the Error Handling framework checks to determine whether the error extension handler has a nondefault parameter defined. If so, the framework locates the full classpath for the parameter in the AIAConfigurationProperties.xml file and makes a call out to that handler with the base fault message as input. Within this error extension handler, the fault message will be enriched to accommodate custom content. It will then be sent back to the Error Handling framework for further processing. 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. 3. Access the AIAConfigurationProperties.xml file in AIA_HOMEaia_ instancesINSTANCE_NAMEAIAMetaDataconfig. Define a property name that matches the error extension handler name that you defined in step 2, as shown in Figure 24–12 . The value for this property is the fully qualified class path of the handler. Figure 24–12 Example Error Extension Handler Property and Value in AIAConfigurationProperties.xml It is through this class that the extension; Order Number and Fulfillment System values, for example; are added to the fault message using xsd:anyType in the ApplicationFaultData element in Meta.xsd. 4. Implement the IAIAErrorHandlerExtension interface in your error extension handler class registered in AIAConfigurationProperties.xml. Implement these methods: ■ handleCompositeSystemError for BPEL system errors ■ handleBusinessError for BPEL custom errors Example 24–18 and Example 24–19 illustrate the interface structure. Example 24–18 IAIAErrorHandler Interface Class public interface IAIAErrorHandler { param ebmHeader param faultMessage public void logErrorMessageElement ebmHeader, String faultMessage; 24-32 Developers Guide for Oracle Application Integration Architecture Foundation Pack param XMLELfaultMessage public void logErrorMessageXMLElement XMLELfaultMessage; param ebmHeader param faultMessage public void logErrorMessageNode ebmHeader, String faultMessage; since FP 2.3 param faultMessage param jmsCorrelationID public void sendNotificationString faultMessage, String jmsCorrelationID, HashMap compositeDetailsHM; } Example 24–19 IAIAErrorHandlerExtension Interface Class package oracle.apps.aia.core.eh; public interface IAIAErrorHandlerExtension { param iFaultRecoveryContext param faultMessageConstructed param componentType return public String handleCompositeSystemErrorIFaultRecoveryContext iFaultRecoveryContext, String faultMessageConstructed, String componentType; param faultMessageConstructed return public String handleBusinessErrorString faultMessageConstructed; } You can view extended field values in the error logs accessed in Oracle Enterprise Manager. For more information about viewing error logs in Oracle Enterprise Manager, see Using Trace and Error Logs in Oracle Fusion Middleware Infrastructure Components and Utilities Users Guide for Oracle Application Integration Architecture Foundation Pack. You should also be able to view them in email notifications if they have been configured appropriately. 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