Hi All,
I was doing some Proof of Concept, while waiting for some response from anyone.
After the new batched envelope is created by the EDI Batch, containg a number of Invoices, the Bizdoc will have EDI Batch = Interchange.
Creating a processing rule based on this, the envelope can be processed again to add the TAXCON.
First thing to do it to break down the Env Header, Invoices and Env Trailer.
I used indexOf to find the UNH and UNZ segments. What other way is there to break the interchange?
After processing each Invoice (using convertToValues to create a document type), adding the tax information to the TAXCON document.
ConvertToString will create a taxcon string that can be added to the envelope using pub.string:replace (replacing the “UNZ” with “%strTAXCON%UNZ”). The envelope trailer control number also needs to be added. Using the pub.string:tokenize, pub.string:makeString to change the number and pub.string:replace to replace the old UNZ with the new UNZ.
New question: when resubmiting to TN for delivery, how can I make so that the envelope is not broken down into envelope and Invoices?
Please feel free to reply with you comments and suggestions.
Many thanks,
Pedro.
#webMethods#Integration-Server-and-ESB#edi