Friday, July 15, 2022

Process an Inbound EDI Batch File Using the Stage file action | Standalone mode | B2B for Oracle Integration

Usecase: Here, we will see how to create a B2B flow, using the stage file and B2B actions, to process an inbound EDI batch file and send a functional acknowledgment for the file back to the sender.

Implementation Steps:

Step1: Create a scheduled orchestation pattern and list all the EDI Batch files

Step2: For each file, download the incoming EDI batch file to Oracle Integration.

Step3: Use a stage file action to debatch EDI documents from the downloaded batch file.

Using a for-each action, iterate over the repeating elements to handle one EDI document at a time.

Read file in segments

Specify the structure of the file contents as EDI document.

A repeating element EDI-Document-Instance is generated for each EDI document debatched.

For each EDI-document-instance.

Step4: Use the B2B action and parse one EDI document at a time.

Choose Standalone mode

Choose the Doc type details.

Map to EDI-Translate action.

routing-info(map each child element from source to target)
validation-errors to passthrough-errors(map each child element from source to target)

Step5: Check if the B2B action completed successfully. You can do this by verifying if translation-status is either a Success or Warning. If the status is either of the two, use a map action to transform the EDI-XML into a backend application message. 

In my case, I wrote the EDIXML string file to a ftp location.


After the entire batch is parsed, send the functional acknowledgment document back to the original sender.

The B2B action generates an EDI X12 997 (Functional Acknowledgment) for the last EDI document it handles from a batch.This acknowledgment document contains the status information for the entire batch of all EDI documents, and according to the EDI X12 standard, you should transmit this document back to the originating trading partner after the entire batch has been parsed.

Check functional-ack-present is true

In my case, wrting this 997 to a ftp location.

Integration flow:

Left side:

Right side:

After a file is processed, rename it with the .processed file extension to ensure that the same file is not picked for processing again in a future execution.





No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...