Sun B2B Suite eXchange Integrator User's Guide

Chapter 7 Configuring Exception Handling

This chapter explains the concept of exception handling and how to configure various methods of handling errors.

What’s in This Chapter

Overview

Exception handling is the identification of failed components or systems. In eXchange Integrator, exception handling allows one or more components to throw an exception that is caught by eXchange Integrator within a scope. Using the scope element, you can configure eXchange Integrator to catch all exceptions or certain exceptions that you specify. The elements that you use to configure exception handling in your model are:

Exception handling in B2B protocols relies heavily on the concept of compensation. Compensation is an application-specific activity that reverse the effects of a previous activity that was carried out as part of a larger unit of work that is being abandoned.

B2B protocols are often of long duration and use asynchronous messages for communication. They also manipulate sensitive business data in back-end databases and line-of-business applications. As a result, the overall business transaction may fail or be cancelled after many transactions have been committed during its progress. In these cases, the partial work may need to be reversed.

Exception Handling Configuration

Exception handlers are configured to catch errors that are thrown by eGate components and/or Web Services. These systems can be configured to publish one or more exceptions.

Each exception can be handled differently. The following represents one example:

ProcedureException Handling Example

  1. Build the exception handling logic as a B2B protocol.

  2. Select the exception handler to configure which exception triggers the exception handling process.

  3. Drag the Scope element onto the eXchange Protocol Designer canvas.

  4. Drag the Exception modeling element into the scope for which it should take effect.

  5. Define a B2B protocol that appropriately handles each exception.

  6. Model manual exceptions in a B2B protocol.

  7. Configure the exception handler to take place when one of the components within the Scope throws the appropriate exception.

Identifying Component or System Failures

Exception management allows users to quickly identify and correct problems with components or systems.

Scope

Scope allows you to define a range

The range of the scope can span one or more activities in the B2B protocol or even the entire B2B protocol.

Scope or Process-level exceptions

Either Catch Named Exception or Catch All Exceptions can be used at the B2B protocol level.

Catch Named Exception

  1. Drag the Catch Named Exception element into the scope for which the exception handler applies.

  2. In the Exception Handler properties, configure the following:

    • Fault Container — The output Attribute that contains the run-time name of the thrown fault.


      Note –

      The fault name is auto-populated with values based on the components dragged to the editor.


    • Select the configuration control for the Exception Handler– the properties pane appears to select the Fault name and container.

    • Fault Name — The run-time value for the exception that is passed from the component to the engine at run time.

Catch All Exceptions

No configuration of the Catch All Exceptions element is required; any thrown exception not previously caught is caught with the Catch All Exceptions element.

Compensation

Compensation allows the modeler to create the process flow for executing complex compensations. Exception Handlers for parent scopes invoke the correct Compensation Handlers in the appropriate order.

Using Scope and Exceptions to Trigger Compensation

Validating the B2B Protocol

After generating the business process code (BPEL), you can click the Validation button on the toolbar to identify any issues with the model. The validation results now appear in a wizard, listing any issues one by one with clear and understandable descriptions for the issues. You can fix each issue, regenerate the business process code, and again view the validation results until each of the issues has been fixed, and the model validates as correct.