I need a help on Document Containing Multiple Invoice when Submited to Trading Network.
My requirement is something as mentioned below. A document containing multiple invoice will be submited to Inbound Layer and which inturn submitted to TN for recoginsing the Invoice as document and TN willl extracting some sender/receiver data from it and as per processing rule it will invoke a Mapping wrapper service.
The mapping wrapper will map the One Invoice to some format and then persist in the database.
Now my question is when i submit the document with multiple invoice to TN…Is the TN call the Mapping wrapper for each of the Invoice…
TN by itself will not be able to do this. It needs some help. Here’s one approach.
Create a doc type for the multiple invoice document. Presumably your doc has a root tag or some other way to recogonize this doc type.
Create a processing rule that processes this mulitple invoice doc type. Have the rule invoke a “unwrapping” service that you create.
The unwrap service will loop over the invoices, submitting each invoice back to TN.
Create a doc type for an individual invoice.
Create a processing rule that processings this single invoice doc type. Have the rule invoke your invoice handling service that you create (or maybe you’ve already created it).
Your invoice handling service does whatever you need it to do.
This process is how the EDI for TN module processes EDI docs, so the technique is a proven one. If you don’t want to submit each invoice back to TN, just have the unwrapping service invoke the proper invoice handling service directly.