Monday, July 11, 2022

Generate Outbound EDI from an Application Message using Standalone mode | B2B for Oracle Integration

Usecase: Here, we will generate outbound 850 EDI using standalone mode and REST request -response pattern.

Implementation Steps:

Step1: create a Trading-Partner-Lookup to keep all the Host company and TP related EDI Interchange ID, Group Id and Qualifier.


Step2: Create an App driven Orchestration style and configure Rest trigger to post Application data and receive back the EDI payload.





Step3: Add B2B action and configure it for the outbound direction.




Step4: configure the map action that occurs between rest adapter and B2B action to transform the back end application XML message to edi-xml-document.

Part1: specify the edi delimiters 

Here, I used the following inside the edi-xml-document > headers > interchange-ctrl elemnt

element-separator : *

segment-terminator: ~

subelement-separator: :


Part2: Using the created TP lookup , insert the EDI Identifiers in the Interchange and Group Headers.

Under edi-xml-document > headers > interchange-ctrl.

sender-id-qualifier: dvm:lookupValue("tenant/resources/dvms/Trading-Partners-Lookup","TPID","Host Company","EDI_InterchangeID_Qualifier","TP Not Found")

sender-id: dvm:lookupValue("tenant/resources/dvms/Trading-Partners-Lookup","TPID","Host Company","EDI_Interchange_Identifier","TP Not Found")

receive-id-qualifier:

dvm:lookupValue("tenant/resources/dvms/Trading-Partners-Lookup","TPID",/nssrcmpr:execute/ns23:POMsgOutput/ns23:tradingPartnerId,"EDI_InterchangeID_Qualifier","TP Not Found")

receive-id:

dvm:lookupValue("tenant/resources/dvms/Trading-Partners-Lookup","TPID",/nssrcmpr:execute/ns23:POMsgOutput/ns23:tradingPartnerId,"EDI_Interchange_Identifier","TP Not Found")


Under edi-xml-document > headers > group

app-senders-code:

dvm:lookupValue("tenant/resources/dvms/Trading-Partners-Lookup","TPID","Host Company","EDI_Group_Identifier","TP Not Found")

app-receivers-code:

dvm:lookupValue("tenant/resources/dvms/Trading-Partners-Lookup","TPID",/nssrcmpr:execute/ns23:POMsgOutput/ns23:tradingPartnerId,"EDI_Group_Identifier","TP Not Found")


Part3: Map the Transaction data


Note: EDI control numbers are generated automatically, we dont need to map them.
  1. Interchange Control number (ISA13, IEA02)
  2. Group control number(GS06,GE02)
  3. Transaction set control number(ST02, SE02)
SImilarly, Date and Time fields in the interchage and group headers are also auto generated based on the current time stamp. Other remaining fields are assigned defaults, including those in the trailers element.

Step5: check if the EDI translation completed succeasfully by verifiying that translation-status is either a Success or Warning.


Step6: If translation success, map the tranlated edi-payload to stream reference of the rest response. Use decodeBase64ToReference() function to convert from base64 data to reference.


Add tracking


Integration flow:




Test with valid xml data.


Response:


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...