Trading Networks 10.7 | Administering and Monitoring B2B Transactions | webMethods Module for EDI | Before Creating the Service to Process EDI Documents | Logic to Include in the Service to Process EDI Documents | Determining Which Process Method to Use
 
Determining Which Process Method to Use
There are two basic ways to process documents:
* Process the entire document at one time. With this method, you invoke services that consume the entire EDI document at one time and then you can process it. Use this method to process EDI documents that have smaller transaction sets.
* Process the document iteratively, segment by segment. With this method, you process the document by working on one segment at a time (or groups of segments at a time). When you finish one segment or a group of segments, you work on the next. This method is useful when working with larger transaction sets that can easily be parsed into smaller units (for example, a large 810 document containing many line-item segments). For more information about handling large documents, see Handling Large Documents When Using Trading Networks .
The table below lists the advantages and disadvantages of each method:
Processing Method
Advantages
Disadvantages
Processing the entire document at one time
* Easier to implement because most of the processing and set up you need to do is provided with Module for EDI.
*You can use built-in services to perform envelope validation and compliance checks. For more information about envelope validation and compliance checks, see Performing Envelope Validation and Compliance Checks.
* Requires more memory because an IData object is created for the entire document.
Processing the document segment by segment
* Requires less memory because as the segments are being processed, an IData object is created for only the segment or group of segments that represent repeating content (for example, line items). Then, when working on subsequent segments, the memory is reused.
* If you want to perform envelope validation and compliance checks, you must add your own logic to do so.
*You likely will need to modify the flat file schema for the EDI document you are processing.
*You might need to create additional flat file schemas for segments within the EDI document you are processing.