Validation overview
Validation is performed at all levels of the EDI message: the interchange, group and transaction envelopes, each segment, and each of the element components in each transaction.
The EDI Compliance Check framework performs validation as follows:
- Envelope
validation - The interchange, group, and transaction envelopes are
checked for structure and configurable partner content restrictions.
Segment, group and transaction counts are also validated.
- An interchange that fails the envelope validation cannot continue in the process.
- If the group envelope validation fails, the contents of the group cannot continue but other groups in the interchange continue.
- If any transaction fails the envelope validation, only that transaction envelope is rejected, and all other transactions continue to be validated.
- Type tree validation - the data in each transaction is compared to the pattern defined by the appropriate version of the standard EDI type tree. If the data matches the pattern in the type tree, it passes validation and no further processing is necessary.
- Segment structure validation - if data fails the type tree validation step, it is passed through more validation. The transaction is checked for segment structure errors by using an external library to validate the order of the segments. This step checks for errors such as missing mandatory segments, or loops, too many repetitions of a segment or loop, or unrecognized segments.
- Segment detail validation - if no segment structure errors are found, the data is passed to a segment map to check for data element errors within the segments. This uses the audit log information to collect information about the location and reason for the error. Examples of errors that are detected by this step include the missing data elements, invalid data element values, and data elements that are too long or too short.
- The EDI Compliance Check framework collects all error information into a detailed error log, and creates the acknowledgment. The error log and acknowledgment can report multiple errors if multiple errors are detected. However, there are some situations in which only the first error is reported. For example, if an error is found in the envelope, then detailed validation on the contained transactions is not performed. There are also some cases such as missing loops, or segments, where more error messages are suppressed because they would be misleading as they are the result of recovery attempts from the initial error.
Note: Incoming acknowledgements in the interchange are not validated,
or acknowledged.