Altova MapForce 2023 Enterprise Edition

EDI Component Validation

Home Prev Top Next

MapForce validates all supported EDI source and target documents when the mapping is executed. This happens either when you preview the mapping in MapForce, by clicking the Output tab, or when the mapping is run by MapForce Server, or by a C++, C#, or Java program. You can also validate explicitly the EDI output generated by the mapping. To do this, first click the Output tab, and then click the Validate Output ic-validate toolbar button (see also Validating the Mapping Output).


MapForce performs validation of EDI documents as specified in this documentation for each individual supported format. The validation process is, however, not a full EDI syntax or semantic validation. For example, there may exist instances where the possible values of a field rely on standards external to EDI and cannot be easily expressed as a finite set of values that would foresee all processing possibilities. To address this limitation, you can customize the validation rules on a case-by-case basis with the help of configuration files (see Customizing EDI Validation).


At a very basic level, some validation options can be configured from the MapForce graphical user interface. For example, you can choose to ignore specific errors, or stop the mapping execution when specific errors are encountered.


To customize the validation settings, double-click an EDI component and click the Validation button in the Component Settings dialog box (see also EDI Component Settings). The default validation settings are shown below.


EDI Validation Settings dialog box

For each validation event listed above, you can take any of the following actions: Stop, Report & Reject, Report & Accept, Ignore.


Stop is used to catch fatal errors and stops the execution of the mapping.


Report & Reject provides information about the error and rejects the current message. Report & Accept provides information about the error and accepts the current message. The actual error information is visible in the Messages window of MapForce. For source X12 and HIPAA components, the validation errors are also logged inside the mapping component, which enables you to generate X12 997 or X12 999 reports (see Validation Results and X12 Acknowledgement).


Ignore ignores the validation event. If you select this action, no information is provided about the error, so use it cautiously.


If unexpected segments are encountered while processing an EDI mapping, only MapForce and MapForce Server have the capability to recover and attempt to continue parsing. The generated C++, C#, or Java code cannot recover from unexpected segments and will stop processing. Unexpected segments include the following: incorrect segment order, missing mandatory segment, incorrect segment name, additional segments that are not present in the configuration files.


The EDI validation events for which you can configure custom actions (Stop, Ignore, etc) are as follows.




Error might occur for a

Missing segment

A mandatory segment is missing or the occurrence is less than a specified minimum.

source component

Unexpected segment

A segment is defined in the specification but not in this message.

source component

Unrecognized segment ID

A segment was found which is not defined in the specification.

source component

Missing group

A mandatory group is missing or the occurrence is less than the specified minimum.

source component

Unexpected end of file

The instance cannot be parsed since some data is missing.

source component

Missing field or composite

A mandatory field or composite is missing, or the occurrence is less than the specified minimum.

source or target component

Extra data in segment or composite

The input instance contains additional data that is not expected by the syntax description.

source component

Extra repeat

The actual number of fields within a segment/composite exceeds the specified maximum number.

source or target component

Invalid field value

A numeric field contains an invalid character.

source component

Invalid date

A date field contains either an invalid character or the values for the month or the day are invalid.

source component

Invalid time

A time field contains either an invalid character or the value for the hours or the minutes are invalid.

source component

Numeric overflow

A numeric value overflows its defined domain. This error is only supported within the generated code.

source component

Data element too short

The length of a data element is less than the specified minimum value.

source or target component

Data element too long

The length of a data element is greater than the specified maximum limit.

source or target component

Invalid code list value

The value of the data element does not match any of the preconfigured code values. See also Changing Possible Code Values of Data Elements.

source or target component

Semantic error

A semantic error has occurred.

source or target component

Implementation "Not Used" data element present

An element exists in the input file which is not allowed by the HIPAA configuration file (maxOccurs="0").

source component

Input file was not completely parsed

The input file was not completely parsed.

source component


Validation results and X12 Acknowledgment

When MapForce validates an X12 or HIPAA component, the validation results are placed in "virtual" items at the base of the EDI component (under "ParserErrors_Message" and "ParserErrors_Group", as shown in the image below). This information can be used to generate X12 997 or X12 999 files that report the status of the interchange (see Generating an X12 997 Functional Acknowledgment and Generating an X12 999 Implementation Acknowledgment).


With X12 or HIPAA.X12 components, the validation actions available on the EDI Validation Settings dialog box (discussed above) have the following meaning:


Stop will stop the execution of the mapping without generating a report message.


Report & Reject and Report & Accept will provide information in the "ParserErrors_Message" and "ParserErrors_Group" items of the EDI component which can be mapped further.


Depending on the setting Reject or Accept, the "Functional Group Acknowledge Code F715" and the "Transaction Set Acknowledgment Code F717" will contain either:

the value 'R' for 'Rejected' or

the value 'E' for 'Accepted, but errors were noted'. The errors also appear in the Messages window.


Ignore ignores the specific error. No information is provided within the "ParserErrors_Message" and "ParserErrors_Group" items.

© 2016-2022 Altova GmbH