Flow operation | Description |
1 | Invoke the EDI built-in service wm.b2b.edi.tradacoms.doc:isFileEnvelope to determine whether a BizDocEnvelope contains a TRADACOMS File document. |
2 | Invoke the wm.b2b.edi.tradacoms.doc:getFFSchemaNames service to return the name of the flat file schemas that can be used to parse the parts of the TRADACOMS file. This service returns up to four flat file schemas: a header schema, a detail schema, a VAT schema (if present), and a trailer schema. |
3 | Invoke the wm.b2b.edi.tradacoms.doc:getDocumentPartInfo service to return the number of detail messages contained in the TRADACOMS file and to determine whether the file contains VAT information. |
4 | Invoke the wm.b2b.edi.tradacoms.doc:getDocumentPart service to return the content part object representing the header message. |
5 | Invoke the wm.b2b.editn.util:getContentPartDataAsInputStream service to obtain the data, as an input stream, from the content part. This service determines whether the document is stored in memory or on disk. |
6 | Invoke the wm.b2b.edi.tradacoms:convertToValues service to convert the content part input stream to an IS document (IData object) based on the input flat file schemas. |
7 | Determine whether the file contains a VAT message. If it contains a VAT message, parse the VAT message by invoking the getContentPartInfo, getDocumentPartDataAsInputStream, and convertToValues services, as you did for the header message. |
8 | Parse the trailer message by invoking the getContentPart, getDocumentPartDataAsInputStream, and convertToValues services, as you did for the header message. |
9 | Parse the detail messages by executing a loop and invoking the getContentPart, getDocumentPartDataAsInputStream, and convertToValues services for each detail message, as you did for the header message. In addition, invoke the wm.b2b.edi.util.documentList:addDocToDocumentList service to put all detail messages into a document list. |
10 | Append the documents to a document list by invoking the pub.list:appendToDocumentList service. |