Storage Options for File Document Types
You can use the TRADACOMS/storageOption variable in your EDITPA to control how you want Trading Networks to store the content parts of your File document types.
When Trading Networks receives TRADACOMS data, it creates up to three document types: Transmission, Batch (if present), and File. The Transmission and Batch document types have a single content part called EDIdata, which contains all the text in that transmission or batch. In contrast, by default, Trading Networks stores a File document type so that it contains multiple content parts—one content part for each of the following:
Transmission/Batch header information (STX/BAT segments)
Message header
Message detail (one content part per message detail)
VAT message (if applicable)
Message trailer
Transmission/Batch trailer information (END/EOB segments)
For example:
Message contents | The default storage method creates... |
STX Header1Detail1 Detail2 Detail3 VAT1 Trailer1 END | One File document type with eight content parts as follows: STX Header1 Detail1 Detail2 Detail3 VAT1 Trailer1 END |
Note: These are not the actual names of the content parts. You should not write code to access the content parts directly. Instead, use the built-in services provided in the wm.b2b.edi.tradacoms.doc folder to access the content parts. For more information, see webMethods Module for EDI Built-In Services Reference .
Storing File document types in this way enables you to build logic to process individual detail messages yet still be able to easily access related summary information from the header, VAT, and trailer messages.
However, if a single File document contains many detail messages (for example, fifty or more), My webMethods may not be able to display all of the content parts. In this case, you might want to consider using an alternative storage option.
The alternative storage option stores the Transmission and Batch information in the same manner as the default storage option. However, instead of storing all message details in a single File document type, Trading Networks creates a separate File document type for each detail message.
For example:
Message contents | The default storage method creates... | The alternative storage method creates... |
STX Header1 Detail1 Detail2 Detail3 VAT1 Trailer1 END | One File document type with eight content parts as follows: STX Header1 Detail1 Detail2 Detail3 VAT1 Trailer1 END | Three file document types (one per detail message), each with six content parts as follows: Document type 1: STX Header1 Detail1 VAT1 Trailer1 END Document type 2: STX Header1 Detail2 VAT1 Trailer1 END Document type 3: STX Header1 Detail3 VAT1 Trailer1 END |
To select which storage option to use, set the
TRADACOMS/storageOption variable in your EDITPA, as described in the
TRADACOM Variables.