Envelope Context Validation

The envelope validation context rules verify the structure of a transmission by defining pairs of records that must be processed together. The term envelope refers to the way the pair of records surrounds other records. They can be contained inside other envelopes, but the nesting must be proper. An outer envelope cannot end before all of the inner envelopes are complete. These validation rules compliment the standard context validation rules by providing a way to return a specific error when one record in a pair is processed without processing the second record. The rules are maintained using the Business Rules user interface edit function.

The following is an example of a context envelope validation node XML descriptor for a X9 configuration.

<?xml version="1.0"?>
<nodeDescriptor name="ValContextEnvelopeNode" type="ValContextEnvelopeNode">
  <tasks>
    <task name="X9RecordEnvelopeTask" />
  </tasks>
</nodeDescriptor>

Exclusive context validation records are keyed by data type, record type, and records preceded by. The columns for the table are:

The envelope rules table uses these columns:
Record Type
Record being evaluated
Record Followed By
Record types that must follow the record in process
Error Code
Error code to return if the pair of records does not occur as a proper pair in the transmission
Rule examples are shown in Table 1.
Table 1. Rule Examples for Envelope Context Validation
Record Type Record Followed By Error Code Comment
1 99 CX01001 Record 1 must be followed by record 99 before the end of the file or the error CX01001 is produced
10 90 CX10001 Record 10 must be followed by record 90 before the end of the file or the error CX10001 is produced
20 70 CX20001 Record 20 must be followed by record 70 before the end of the file or error CX20001 is produced