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.
For each EDI-document-instance.
Step4: Use the B2B action and parse one EDI document at a time.
Choose Standalone mode
edi-payload
tracking-info
edi-encoding
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.
Step6: 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
Integration flow:
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.Testing:
Input:
No comments:
Post a Comment