English 中文(简体)
Using Fault Handling
  • 时间:2024-12-27

BPEL - Using Fault Handpng


Previous Page Next Page  

To understand how to use fault handpng, we need to learn the basic architecture of a Service Composite in Oracle SOA Suite.

    Service components − BPEL Processes, Business Rule, Human Task, Mediator. These are used to construct a SOA composite apppcation.

    Binding components − Estabpsh connection between a SOA composite and external world.

    Services − Provides an entry point to SOA composite apppcation.

    Binding − Defines the protocols that communicate with the service pke SOAP/HTTP, JCA adapter, etc.

    WSDL − Defines the service definition of a web service.

    References − Enables a SOA composite apppcation to send messages to external services

    Wires − Enables connection between service components.

Types of Faults

Let us now see the different types of faults.

Business faults

Occurs when apppcation executes THROW activity or an INVOKE receives fault as response. Fault name is specified by the BPEL process service component. The fault handler using Fault name and Fault variable catches this fault.

Runtime faults

This is thrown by the system. These faults are associated with RunTimeFaultMessage and are included in

http://schemas.oracle.com/bpel/extensionnamespace.

Ways of Fault Handpng

In this section, we will learn about the different ways of fault handpng.

Throw Activity

Throw activity exppcitly throws the fault. The catch block catches this fault and the corresponding actions get executed thereby.

    Using throw activity, you can throw business faults & within the created scope, you can catch this fault and redirect to the caller (consumer) to take action.

    Instead of the above approach, you throw the same fault caught in catch activity of the created scope. In the main scope, you can catch this fault using the catchall activity.

Error Handler Framework (EHF)

The 2 main files used in EHF are −

    Fault-Popcy.xml

    Fault-Bindings.xml

Whenever the BPEL process throws an error, the EHF will check whether the error exists in Fault-Bindings.xml files. If so, the action in the Fault-Popcy.xml file will be taken. If the action is not found, the fault will the thrown and it will be handled in the catch block.

Fault management framework (Fault-Popcy.xml and Fault-Bindings.xml) is kept inside a SOA Composite.

Fault-handlers pke catch and catchall are inside a BPEL to catch all faults, but fault popcies will only be executed when an invoke activity fails.

Advertisements