EDI Validation
MapForce validates all source and target EDI documents when the mapping is executed. This happens when you click the Output pane or when the mapping is run by MapForce Server. You can also explicitly validate the EDI output generated by the mapping. For more information, see Validation.
To view and/or customize the validation settings, open the EDI Component Settings dialog box and click the Validation button. The default validation settings are shown below.
EDI validation events
The EDI Validation Settings dialog allows you to configure validation actions for the following events:
•Missing segment: A mandatory segment is missing or the occurrence is less than the specified minimum.
•Unexpected segment: A segment is defined in the specification but not in this message.
•Unrecognized segment ID: MapForce has found a segment that is not defined in the specification.
•Missing group: A mandatory group is missing or the occurrence is less than the specified minimum.
•Unexpected end of file: The instance cannot be parsed, because some data is missing.
•Missing field or composite: A mandatory field or composite is missing, or the occurrence is less than the specified minimum.
•Extra data in segment or composite: The input instance contains additional data that is not accepted by the syntax requirements.
•Extra repeat: The actual number of fields within a segment/composite exceeds the specified maximum number.
•Invalid field value: A numeric field contains an invalid character.
•Invalid date: The date field contains an invalid character, or the value of the month or day is invalid.
•Invalid time: The time field contains an invalid character, or the value of the hours or minutes is invalid.
•Numeric overflow: A numeric value is not within its defined domain. This error is only supported in the generated code.
•Data element too short: The length of a data element is less than the specified minimum value.
•Data element too long: The length of a data element is greater than the specified maximum value.
•Invalid code list value: The value of a data element does not match any of the pre-configured code values. See Full Field Validation and Message-Level Validation.
•Semantic error
•Implementation "Not Used" data element present: An element that exists in the input file is not allowed by the HIPAA configuration file (maxOccurs="0").
•Input file was not completely parsed
Validation actions
For each validation event listed above, you can take any of the following actions: stop, report and reject, report and accept, ignore (see details below).
•Stop is used to abort the execution of the mapping when fatal errors occur.
•Report & Reject provides information about the error and rejects the current message.
•Report & Accept provides information about an error and accepts the current message. The actual error information is available in the Messages window. For source X12 and HIPAA components, validation errors are also logged inside the component, which enables you to generate X12 997 and X12 999 reports (see Validation of X12 and HIPAA).
•Ignore provides no information about errors.
If unexpected segments are encountered during the processing of an EDI mapping, only MapForce and MapForce Server have the capability to recover and attempt to continue parsing. The generated C++/C#/Java code cannot recover from unexpected segments, which will cause the processing to stop. Unexpected segments include the following: incorrect segment order, missing mandatory segments, incorrect segment names, additional segments that are not present in the configuration files.
Validation customization
Besides defining validation settings in the EDI Validation Settings dialog, you can further customize validation by editing configuration files. Depending on your business needs and requirements, you can perform incomplete, global, local, and character-level validation.