Global Fault Handler in OIC

Share

  • Introduction

    Global Fault Handler in OIC is one of the most important error-handling mechanisms available in Oracle Integration Cloud (OIC) Gen 3. In real enterprise integrations, failures are inevitable—external systems may go down, APIs may return errors, payloads may be invalid, or network interruptions may occur. Without a proper centralized error-handling mechanism, integrations become difficult to maintain and troubleshoot.

    In large Oracle Fusion implementations, integrations may involve ERP, HCM, SCM, external REST services, SaaS applications, and on-premise systems. When a failure occurs in any step of an integration flow, developers must capture the error, log meaningful information, notify support teams, and sometimes perform recovery actions. This is where the Global Fault Handler becomes extremely useful.

    A Global Fault Handler in OIC acts as a centralized error-handling mechanism that captures exceptions occurring anywhere within an integration. Instead of adding error handling in every individual step, the integration developer can define a single fault handler that processes all errors consistently.

    From a consultant’s perspective, the Global Fault Handler is critical for building production-grade integrations because it enables:

    • Centralized error management

    • Standardized logging and monitoring

    • Automated notifications

    • Better troubleshooting capability

    In this detailed guide, we will explore how Global Fault Handler works in OIC Gen 3, its architecture, real implementation scenarios, step-by-step configuration, testing techniques, and troubleshooting methods used by experienced Oracle consultants.


    What is Global Fault Handler in OIC?

    The Global Fault Handler in Oracle Integration Cloud is a special error-handling scope that captures runtime exceptions occurring anywhere in an integration flow.

    Whenever an integration encounters an error such as:

    • Adapter connection failure

    • API response error

    • Mapping transformation error

    • Invalid payload format

    • Timeout or network issue

    The execution is redirected to the Global Fault Handler, where developers can define corrective actions.

    Unlike local fault handlers that are associated with individual scopes, the Global Fault Handler applies to the entire integration.

    Key Characteristics

    FeatureDescription
    ScopeApplies to the entire integration
    PurposeCentralized error handling
    TriggerInvoked when any unhandled fault occurs
    Common ActionsLogging, notifications, error response
    LocationIntegration canvas (top-level fault handler)

    This mechanism allows organizations to implement standardized error management across all integrations.


    Key Features of Global Fault Handler

    The Global Fault Handler in OIC Gen 3 provides several capabilities useful for enterprise integration development.

    1. Centralized Error Processing

    Instead of duplicating fault handling logic across multiple steps, the Global Fault Handler allows developers to define error logic once.

    Example:

    An integration interacting with:

    • Oracle ERP Cloud

    • Salesforce

    • Payment gateway API

    If any step fails, the Global Fault Handler processes the error uniformly.


    2. Access to Fault Details

    The Global Fault Handler provides detailed information about the error.

    Common attributes available:

    • Fault Name

    • Fault Code

    • Fault Reason

    • Fault Details

    • Integration ID

    • Tracking ID

    These attributes help in diagnosing production issues.


    3. Notification Capability

    Organizations typically configure email or messaging notifications inside the Global Fault Handler.

    Example:

    If a supplier invoice integration fails, an email notification can be automatically sent to:

    • Integration support team

    • Finance operations team


    4. Error Logging

    Many organizations log integration errors into:

    • OCI Logging

    • Database tables

    • Monitoring systems

    The Global Fault Handler is typically used for this logging mechanism.


    5. Custom Error Responses

    For synchronous integrations, the Global Fault Handler can return structured error messages back to the calling application.

    Example:

     
    {
    “status”:”ERROR”,
    “message”:”Supplier creation failed”,
    “errorCode”:”ERP-INV-102″
    }
     

    Real-World Integration Use Cases

    In real enterprise implementations, the Global Fault Handler is used in multiple scenarios.

    Scenario 1 – ERP Supplier Creation Integration

    Integration Flow:

    External Procurement System → OIC → Oracle ERP Supplier API

    Possible failures:

    • Supplier already exists

    • API validation error

    • ERP service unavailable

    Global Fault Handler actions:

    • Capture fault response

    • Log supplier payload

    • Send alert to procurement team


    Scenario 2 – HCM Employee Synchronization

    Integration Flow:

    HR System → OIC → Oracle HCM Worker REST API

    Possible failures:

    • Invalid employee data

    • Authentication failure

    • API timeout

    Global Fault Handler actions:

    • Capture worker ID

    • Log request payload

    • Send notification to HR integration support team


    Scenario 3 – Order Integration Between E-commerce and SCM

    Integration Flow:

    E-commerce Platform → OIC → Oracle SCM Order Import

    Possible failures:

    • Invalid product code

    • Missing customer data

    • Pricing validation error

    Global Fault Handler actions:

    • Capture order payload

    • Store error details

    • Send failure notification to order management team


    Architecture and Technical Flow

    The Global Fault Handler operates as a centralized exception handling layer.

    Integration Execution Flow

     
    Trigger → Integration Steps → External Systems
    |
    | (Error Occurs)

    Global Fault Handler
    |

    Logging / Notification / Error Response
     

    Key Components

    ComponentRole
    Integration FlowMain processing logic
    Global Fault HandlerCaptures runtime errors
    Fault ObjectContains error details
    Notification LogicSends alerts
    Logging MechanismRecords failure information

    Prerequisites

    Before implementing Global Fault Handler in OIC, ensure the following prerequisites.

    1. Access to OIC Instance

    User must have privileges such as:

    • Integration Developer

    • Service Administrator


    2. Configured Connections

    Depending on integration requirements:

    • REST connection

    • SOAP connection

    • ERP Cloud Adapter

    • HCM Adapter


    3. Notification Mechanism

    If sending alerts:

    • Email server

    • Notification integration

    • Logging database


    4. Error Handling Strategy

    Integration teams should define:

    • Error message format

    • Logging strategy

    • Notification rules


    Step-by-Step Implementation of Global Fault Handler

    Let’s walk through how consultants configure the Global Fault Handler in OIC Gen 3.


    Step 1 – Create an Integration

    Navigate to:

    OIC Console → Integrations → Create

    Select integration type:

    • App Driven Orchestration

    Provide values:

    FieldValue
    Integration NameCreateSupplierIntegration
    Identifiercreate_supplier_int
    Version01.00.0000

    Click Create.


    Step 2 – Configure Trigger

    Add a REST Trigger.

    Example:

     
    POST /createSupplier
     

    Payload example:

     
    {
    “SupplierName”:”ABC Supplies”,
    “Country”:”US”,
    “Currency”:”USD”
    }
     

    Step 3 – Add Processing Logic

    Typical integration steps may include:

    • Data mapping

    • Data validation

    • ERP Adapter invocation

    Example step:

    Invoke ERP Cloud Adapter → Create Supplier API


    Step 4 – Add Global Fault Handler

    In the integration canvas:

    1. Click Global Fault Handler section

    2. Add Scope Activity

    Inside the scope define fault handling logic.


    Step 5 – Capture Fault Details

    Add Assign Activity.

    Capture fault attributes such as:

     
    $GlobalFault
    $GlobalFault.reason
    $GlobalFault.code
     

    Example mapping:

    VariableValue
    errorMessageGlobalFault.reason
    errorCodeGlobalFault.code

    Step 6 – Send Notification

    Add Notification Activity.

    Example email:

     
    Subject: Supplier Integration Failure

    Body:
    Supplier integration failed.

    Error Code: {errorCode}
    Error Message: {errorMessage}
    Tracking ID: {trackingId}
     

    Step 7 – Log Error Details

    Many implementations log error data.

    Typical fields stored:

    FieldDescription
    Integration NameIntegration identifier
    TimestampFailure time
    Error CodeFault code
    Error MessageFault reason
    PayloadRequest payload

    Step 8 – Return Error Response

    For synchronous integrations, return response.

    Example response payload:

     
    {
    “status”:”FAILED”,
    “errorCode”:”SUPPLIER_API_ERROR”,
    “message”:”Supplier creation failed”
    }
     

    Step 9 – Activate Integration

    Click:

    Activate → Enable Integration

    The integration is now ready.


    Testing the Global Fault Handler

    Testing is critical before moving integrations to production.

    Example Test Case

    Payload:

     
    {
    “SupplierName”:””,
    “Country”:”US”
    }
     

    Issue:

    Supplier name missing.


    Expected Behavior

    1. ERP API returns validation error

    2. Integration fails

    3. Global Fault Handler executes

    4. Notification sent to support team

    5. Error logged


    Validation Checks

    Verify:

    • Email received

    • Error message correct

    • Payload logged

    • Response returned to caller


    Common Errors and Troubleshooting

    Even experienced consultants face certain issues when implementing Global Fault Handlers.

    1. Fault Handler Not Triggering

    Cause:

    Local fault handler capturing error.

    Solution:

    Ensure errors are not consumed inside local scope.


    2. Missing Fault Details

    Cause:

    Incorrect variable mapping.

    Solution:

    Use correct fault object variables.


    3. Notification Not Sent

    Cause:

    Email configuration issue.

    Solution:

    Verify SMTP configuration or notification integration.


    4. Integration Hanging After Error

    Cause:

    Fault handler missing response step.

    Solution:

    Return proper response payload.


    Best Practices Used by Oracle Consultants

    Experienced Oracle integration architects follow these practices.

    1. Standardize Error Format

    Define common structure.

    Example:

     
    {
    “integration”:”SupplierIntegration”,
    “errorCode”:”API_ERROR”,
    “message”:”Supplier creation failed”,
    “timestamp”:”2026-03-12″
    }
     

    2. Always Log Tracking ID

    Tracking ID helps correlate logs.

    Example:

     
    trackingId = $trackingId
     

    3. Separate Logging Integration

    Large organizations build a central logging integration to store all errors.

    Benefits:

    • Easier monitoring

    • Centralized logs


    4. Avoid Complex Logic

    Fault handlers should be lightweight.

    Avoid:

    • Large mappings

    • Multiple API calls


    5. Test All Failure Scenarios

    Always simulate errors such as:

    • API failure

    • Invalid payload

    • Network timeout


    Summary

    The Global Fault Handler in OIC is an essential component for building reliable and maintainable integrations in Oracle Integration Cloud Gen 3. It enables centralized error management, making it easier to log failures, notify support teams, and return meaningful responses to calling systems.

    From real-world Oracle Fusion implementations, it is clear that integrations without structured error handling become extremely difficult to maintain in production environments. By using the Global Fault Handler effectively, integration developers can ensure that failures are handled consistently across all integrations.

    Key takeaways:

    • Global Fault Handler captures errors across the entire integration

    • It simplifies centralized error handling

    • It enables logging, notifications, and structured responses

    • It improves troubleshooting and operational support

    For deeper reference on Oracle Cloud services and integration features, consult the official Oracle documentation:

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


    FAQ

    1. What is the difference between Local Fault Handler and Global Fault Handler in OIC?

    A Local Fault Handler handles errors within a specific scope, while a Global Fault Handler handles unhandled errors occurring anywhere in the integration flow.


    2. Can we return custom error responses using Global Fault Handler?

    Yes. In synchronous integrations, developers can design structured error responses that are returned to the calling application.


    3. Can Global Fault Handler be reused across integrations?

    The handler itself is defined per integration, but organizations often standardize the logic by calling a central logging integration from the fault handler.


Share

Leave a Reply

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