Global vs Scope Fault Handlers in OIC

Share

  • Introduction

    Global vs Scope Fault Handlers in Oracle Integration Cloud (OIC) is an important topic for anyone building enterprise integrations. In real-world implementations, integrations rarely run perfectly every time. Network outages, incorrect payload formats, API timeouts, authentication failures, and business validation errors frequently occur. Without proper error handling, these failures can cause integrations to terminate abruptly, leaving transactions incomplete and difficult to troubleshoot.

    Oracle Integration Cloud (OIC) Gen 3 provides powerful fault handling mechanisms that allow developers to capture, manage, and respond to errors in a structured way. Two of the most commonly used mechanisms are:

    • Global Fault Handlers

    • Scope Fault Handlers

    Understanding the difference between these two approaches is essential when designing robust integrations that can gracefully recover from errors.

    In many Oracle Fusion Cloud projects (HCM, ERP, SCM), integrations are responsible for moving sensitive transactional data between systems. If an error occurs while processing payroll data, employee updates, purchase orders, or invoices, the integration must properly log the error and take corrective action. This is where Global vs Scope Fault Handlers in OIC becomes a critical design decision.

    This article explains the concepts, architecture, real-world usage, implementation steps, and best practices used by experienced Oracle integration consultants.


    What are Global and Scope Fault Handlers in OIC?

    In Oracle Integration Cloud, a fault handler is a mechanism used to capture errors that occur during the execution of an integration.

    Fault handlers allow developers to:

    • Capture runtime errors

    • Log error messages

    • Send notifications

    • Trigger recovery processes

    • Prevent integration failure from impacting other processes

    There are two levels where fault handling can be implemented.

    Global Fault Handler

    A Global Fault Handler captures errors that occur anywhere in the integration unless they are already handled at the scope level.

    It acts as a centralized error handler for the entire integration.

    Characteristics:

    • Defined at the integration level

    • Catches unhandled faults

    • Used for general error logging and notifications

    • Applies to the entire orchestration flow

    Example use case:

    If an integration calls multiple external APIs and one of them fails, the Global Fault Handler captures the error and logs it.


    Scope Fault Handler

    A Scope Fault Handler captures errors that occur within a specific scope block.

    Scope handlers allow developers to isolate errors within a particular section of the integration.

    Characteristics:

    • Defined inside a Scope activity

    • Handles errors specific to a business logic section

    • Prevents errors from propagating to the Global Fault Handler

    • Allows localized recovery logic

    Example use case:

    If an integration calls a third-party tax calculation API, a Scope Fault Handler can handle the error and retry the request without affecting the rest of the integration.


    Real-World Integration Use Cases

    In real Oracle Fusion Cloud implementations, fault handlers are used extensively.

    Scenario 1 — Employee Creation Integration (HCM)

    Integration Flow:

    HR System → OIC → Oracle Fusion HCM

    Process:

    1. Receive employee data

    2. Transform payload

    3. Call Fusion HCM REST API

    Possible error:

    Employee email already exists.

    Solution:

    A Scope Fault Handler handles the validation error and logs the employee record for correction instead of stopping the entire integration.


    Scenario 2 — Invoice Integration (ERP)

    Integration Flow:

    Supplier System → OIC → Oracle Fusion ERP

    Process:

    1. Receive invoice

    2. Validate supplier

    3. Create invoice in ERP

    Possible error:

    Supplier not found.

    Solution:

    The Scope Fault Handler logs the supplier error and routes the record to an exception queue.


    Scenario 3 — Procurement Order Processing

    Integration Flow:

    E-commerce Platform → OIC → Oracle Fusion SCM

    Possible issues:

    • Network timeout

    • API authentication failure

    • Transformation error

    Solution:

    A Global Fault Handler captures any unhandled system errors and sends notifications to the integration support team.


    Architecture and Technical Flow

    The following illustrates how error handling works in OIC.

     
    Integration Flow

    Trigger
    |
    Scope 1
    |– Invoke ERP API
    |– Scope Fault Handler
    |
    Scope 2
    |– Invoke External System
    |– Scope Fault Handler
    |
    Main Flow
    |
    Global Fault Handler
     

    Error processing flow:

    1. Integration executes normally.

    2. If an error occurs inside a scope, the Scope Fault Handler executes.

    3. If the scope does not handle the error, the error propagates upward.

    4. If no scope handles the error, the Global Fault Handler executes.

    This layered architecture allows precise error management.


    Key Differences: Global vs Scope Fault Handlers

    FeatureGlobal Fault HandlerScope Fault Handler
    LevelIntegration levelScope level
    CoverageEntire integrationSpecific section
    Use CaseGeneric error handlingLocalized error handling
    Execution PriorityLast levelFirst level
    Error HandlingUnhandled errorsSpecific process errors
    FlexibilityLimited controlHighly customizable

    Prerequisites

    Before implementing fault handlers in OIC Gen 3:

    Ensure the following:

    • Active Oracle Integration Cloud Gen 3 instance

    • Access to Integration Designer

    • REST or SOAP connection configured

    • Basic understanding of orchestration flows

    • Logging strategy defined

    Recommended roles:

    • ServiceDeveloper

    • ServiceAdministrator


    Step-by-Step Implementation

    Step 1 — Create a New Integration

    Navigate to:

    OIC Console → Integrations → Create

    Select:

    App Driven Orchestration

    Example Name:

     
    EmployeeCreateIntegration
     

    Choose trigger:

     
    REST Adapter
     

    Step 2 — Design Integration Flow

    Example flow:

     
    REST Trigger
    |
    Scope (Employee Validation)
    |
    Invoke HCM REST API
    |
    Return Response
     

    The Scope will contain business logic.


    Step 3 — Add Scope Fault Handler

    1. Drag Scope activity into the orchestration.

    2. Inside the scope, configure your API call.

    Example:

     
    Invoke CreateWorker API
     

    Now add a fault handler.

    Steps:

    1. Click Scope

    2. Select Add Fault Handler

    3. Choose Catch All Faults

    Inside the handler:

    Add activities such as:

    • Logger

    • Notification

    • Data store update

    Example logging structure:

     
    EmployeeId
    ErrorCode
    ErrorMessage
    Timestamp
     

    This allows partial recovery of integration.


    Step 4 — Configure Global Fault Handler

    To configure Global Fault Handler:

    1. Open integration canvas

    2. Click Global Fault Handler icon

    Add error handling logic.

    Typical activities inside Global Fault Handler:

    • Logger

    • Send Email

    • Write to Database

    • Call error management integration

    Example email content:

     
    Subject: OIC Integration Failure

    Integration Name: EmployeeCreateIntegration
    Error Message: Worker API validation error
    Timestamp: ${currentDateTime()}
     

    Step 5 — Add Notification

    Example:

    Use Notification action.

    Recipient:

     
    integration-support@company.com
     

    Message:

     
    Integration failure occurred in EmployeeCreateIntegration.
    Please review OIC tracking logs.
     

    Step 6 — Save and Activate Integration

    Click:

     
    Save → Activate
     

    Integration becomes available for execution.


    Testing the Fault Handling

    Testing is critical during implementation.

    Test Scenario

    Send request payload.

    Example payload:

     
    {
    “EmployeeNumber”: “E1001”,
    “Email”: “duplicate@email.com”,
    “FirstName”: “John”,
    “LastName”: “Smith”
    }
     

    Expected result:

    • HCM API returns validation error

    • Scope Fault Handler executes

    • Error logged in OIC


    Validation Steps

    Check:

    OIC Console → Monitoring → Tracking

    Verify:

    • Error captured

    • Fault handler executed

    • Integration completed gracefully


    Common Errors and Troubleshooting

    Error 1 — Fault Handler Not Triggering

    Cause:

    Scope not properly configured.

    Solution:

    Ensure Catch All Fault is selected.


    Error 2 — Error Propagates to Global Handler

    Cause:

    Scope handler incomplete.

    Solution:

    Ensure error processing logic handles the exception.


    Error 3 — Logging Data Missing

    Cause:

    Variables not mapped correctly.

    Solution:

    Map fault variables properly.

    Example variable:

     
    $error/message
    $error/code
     

    Best Practices from Real OIC Projects

    Experienced Oracle consultants follow specific strategies when designing fault handling.

    1. Always Implement Both Handlers

    Use:

    • Scope Fault Handlers for business errors

    • Global Fault Handlers for system errors


    2. Avoid Silent Failures

    Never ignore errors.

    Always log:

    • Error message

    • Payload

    • Timestamp


    3. Centralized Error Logging

    Many enterprises create a common error logging integration.

    Every fault handler calls this integration.

    Benefits:

    • Centralized monitoring

    • Better analytics

    • Faster troubleshooting


    4. Use Retry Mechanisms

    For transient errors like API timeouts.

    Example:

     
    Retry API call 3 times
     

    5. Use Structured Logging

    Example format:

    FieldValue
    Integration NameEmployeeCreate
    Error CodeAPI-500
    Error MessageTimeout
    Payload IDE1001

    6. Separate Business and Technical Errors

    Business errors:

    • Validation failures

    • Data issues

    Technical errors:

    • Network failure

    • API timeout

    Handle them differently.


    Summary

    Global vs Scope Fault Handlers in Oracle Integration Cloud is a foundational concept for building reliable integrations. Proper error handling ensures that integrations remain resilient even when failures occur.

    Key takeaways:

    • Scope Fault Handlers manage localized errors within specific logic blocks.

    • Global Fault Handlers capture unhandled errors across the integration.

    • Scope handlers execute first, while Global handlers act as a fallback mechanism.

    • Real implementations always combine both approaches to ensure robust error management.

    When implemented correctly, these mechanisms significantly improve integration stability, observability, and maintainability.

    For deeper understanding of Oracle Integration Cloud architecture and error handling frameworks, Oracle documentation is a useful reference:

    https://docs.oracle.com/en/cloud/saas/index.html


    Frequently Asked Questions

    What is the main difference between Global and Scope Fault Handlers?

    Global Fault Handlers handle all unhandled errors across the integration, while Scope Fault Handlers manage errors within a specific section of the integration flow.


    Which handler executes first in OIC?

    The Scope Fault Handler executes first. If the error is not handled there, it propagates to the Global Fault Handler.


    Can an integration have multiple Scope Fault Handlers?

    Yes. Each Scope activity can have its own fault handler, allowing precise error handling for different integration steps.


Share

Leave a Reply

Your email address will not be published. Required fields are marked *