Context Validation

Context validation is designed to verify the structure of an incoming data transmission. It verifies the records are in the correct order by analyzing the current and previous record types to determine if the pair of types is valid.

There are two types of tables from which the context node draws it configuration: record types and context validation. The record types table lists all of the known record types and the error codes to be assigned on failure. There is only one of these and it must be placed last in the XML descriptor for the context node.

The other table type lists the valid record pairs. There can be more than one of these tables configured and would follow the same method of instantiation as the content validation when stacking. For more information, see Stacking Rules.

The following is an example for a NACHA configuration.
<?xml version="1.0"?>
<nodeDescriptor name="NachaContextNode" type="ValContextNode" >
  <tasks>
    <task name="NachaContextOriginatorTask"/>
    <task name="NachaContextDepositorTask"/>
    <task name="NachaContextProductTask"/>
    <task name="NachaContextSpecTask"/>
    <task name="NachaRecordTypeSpecTask"/>
  </tasks>
</nodeDescriptor>

Context validation records are keyed by data type, record type, and records preceded by. For NACHA, two other field types are required in addition to the record type: standard entry class code and addenda type code. The columns for the table are:

Data Type
Transmission or file type
Record Type
Record being evaluated
Sec Code (NACHA only)
Standard entry class code
Addenda Type Code (NACHA only)
Addenda type code
Preceded By Record Type
Record types that are allowed to precede the record in process
Preceded By Sec Code (NACHA only)
Standard entry class codes that are allowed to precede the record in process
Preceded By Addenda Type Code (NACHA only)
Addenda type codes that are allowed to precede the record in process
X9 rule examples are shown in Table 1.
Table 1. X9 Rule Examples
Data Type Record Type Records Preceded By Description
3 1 0 Record 1 cannot be preceded by any other record
3 10 1 Record 10 can be preceded by record 1
3 20 10 Record 20 can be preceded by record 10.
3 20 70 Record 20 can be preceded by record 70.
3 20 75 Record 20 can be preceded by record 75.
Note:
  1. In this example, record 20 can be preceded by records 10, 70, or 75.
Record types records are keyed by data type and record type. For NACHA, two other field types are required in addition to the record type: standard entry class code and addenda type code. The columns for the table are:
Data Type
Transmission or file type
Record Type
Record being evaluated
Sec Code (NACHA only)
Standard entry class code
Addenda Type Code (NACHA only)
Addenda type code
Context Error Code
Error code to use when there is an error for the record type
An example of error code assignments for NACHA BOC Sec Code is shown in Table 2.
Table 2. Error Code Assignments
Data Type Record Type Sec Code Addenda Type Code Context Error Code Description
201 1 BOC 0 ACX1BOC BOC File Header
201 5 BOC 0 ACX5BOC BOC Batch Header
201 6 BOC 0 ACX6BOC BOC Entry Detail
201 7 BOC 99 A799BOC BOC Addenda 99
201 8 BOC 0 ACX8BOC BOC Batch Control
201 9 BOC 0 ACX9BOC BOC File Control

The context node compares the values of the current record and the previous record with the table of all known context rules. If a match is not found, the error code associated with the current record is assigned.

It also supports an optional process of detecting an unknown record type. By specifying '-1' for the record type in X9 or '0', '*', '0' for the record type, sec code, and addenda respectively, the context will engage this test and apply the associated error code if there is not a match in the table.

For X9 as an example.
Table 3. Test NACHA Unknown Record Type
Data Type Record Type Context Error Code Description
130 -1 CX0unkn Unknown Record
For NACHA as an example.
Table 4. Test NACHA Unknown Record Type
Data Type Record Type Sec Code Addenda Type Code Context Error Code Description
201 0 * 0 ACXunkn Unknown Record

The context node disables this check if the record is omitted from the record types table.