Wednesday, September 17, 2025

OIC - OIC Utility to Reprocess Failed Real-Time Integration JSON Payloads

📌 Use Case

In real-time OIC integrations, JSON payloads are exchanged with external systems via REST APIs. When such integrations fail (due to downstream errors, connectivity issues, or invalid data), the input payload is saved into an OIC SFTP error folder for recovery.

Manually retrieving, reviewing, and resubmitting these payloads is time-consuming and error-prone.

To simplify recovery, we build an OIC Utility Service that:

  • Takes Interface ID and Payload File Name as inputs
  • Fetches error folder path and target REST endpoint (relative path) from a Lookup
  • Reads the failed payload file from the error folder
  • Encodes and decodes the payload as Base64
  • Calls the dynamic downstream REST service
  • Resubmits the payload as binary JSON for seamless reprocessing

This ensures that failed real-time integrations can be reprocessed quickly and reliably, without manual intervention.


🛠️ Solution Steps

1. Create a Lookup for Metadata

Define a Lookup in OIC with mappings for each interface:

  • Interface ID → Error Folder Path → Relative REST Endpoint Path
    Example:
HCM_IFC    | /u01/error/hcm/json    | /hcm/v1/worker
Payroll_IFC| /u01/error/payroll/json| /payroll/v2/run

2. Design the Utility App-Driven Orchestration

Trigger the utility with a REST endpoint that accepts:

  • Interface ID
  • Payload File Name


3. Fetch Error Path and REST Endpoint from Lookup

  • Use Lookup functions to dynamically retrieve:
    • Error folder path
    • Relative endpoint URI

4. List Files in Error Folder

  • Use File Server (SFTP) action to list and fetch the payload file based on the provided name.
  • Capture the fileReference from the file action (pointer to the file inside OIC).

5. Read and Encode Payload

  • Use Read File (File Server Action) → Get the file content using fileReference.
  • Encode the payload into Base64, then decode back to binary JSON inside OIC.

6. Call Dynamic REST Service

  • Use HTTP Adapter with dynamic configuration:
    • Base URL → from OIC Connection
    • Relative Path → from Lookup
  • Pass the decoded JSON payload as the request body.





7. Handle Logging & Tracking

  • Log success/failure at each step (File found, Payload resubmitted, REST service status).
  • Update monitoring dashboard or custom tables for auditing.

Benefits

  • Automated reprocessing of failed JSON payloads
  • Dynamic & reusable across multiple interfaces via Lookup
  • Reduces manual errors in resubmission
  • Improves system reliability & recovery time for real-time integrations


No comments:

Post a Comment

Featured Post

OIC - OIC Utility to Reprocess Failed Real-Time Integration JSON Payloads

📌 Use Case In real-time OIC integrations, JSON payloads are exchanged with external systems via REST APIs. When such integrations fail (du...