Requirements

The general requirement for this utility is to convert one or more XML instance documents, each representing a single logical document, into an X12 transaction set. The transaction sets are bundled into one functional group and interchange. Here's a summary of the required functionality.

  • Inputs: There are two user-specified inputs. The first is a directory containing one or more XML instance documents, each in a single file. All have the same grammar. The second input is a file description document (as discussed in Chapter 6) that describes the XML documents and the X12 interchange to be produced. The utility also uses a document for maintaining EDI control numbers, as described in a later section of this chapter.

  • Processing: Each input Element corresponding to a segment (as described in the file description document) is written to a segment in a transaction set. Each of its child Elements corresponding to data elements are written to the appropriate positions in the segment. Schema language data types are converted to X12 data types according to the data element descriptions in the file description document. XML Elements corresponding to segment groups and composite data structures are not directly used. Envelope segments are created based on values from the file description document, and incremented sequence numbers from the control number document.

  • Output: A valid X12 interchange.

Again, in keeping with the basic functionality required in most trading situations, we must go a bit beyond simple file format conversion. Many major EDI users audit the control numbers used in interchanges and functional groups and reject interchanges with duplicate control numbers. Some also check with a trading partner if there is a missing number in a sequence of control numbers. So, we're including minimal support for sequence number generation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset