Validation Errors in the Source Report Section of the Audit Log

The Message section of the Source Report documents the validation errors generated by the engine for each card. This functionality enables users to conveniently review the validation errors after executing the map. It is essential to clarify that the recording of these error messages in the audit log does not require the enabling of engine trace.

To enable the audit option that reports the validation errors, in the Map audit settings set the SummaryAudit > Execution to Always, OnError or OnErrorOrWarning.

The number of error messages can be regulated through a setting in the config.yamlconfiguration file:

runtime:
  validationErrors:
    maximumCount: 20

The default value for this parameter is set at 20. If you wish to deactivate validation error reporting, simply set this configuration parameter to zero.

The following is a sample of the map audit when the validation fails for a choice group. SourceReport sections shows three validation error messages. The choice group had three types and all failed to validate.
<ExecutionSummary MapStatus="Error" mapreturn="8" ElapsedSec="0.0018" BurstRestartCount="0">
   <Message>One or more inputs was invalid</Message>
   <CommandLine>C:\maps\validationerrors\choicegroups\fix_tag.mmc</CommandLine>

<SourceReport   card="1"   adapter="File"   bytes="6"   adapterreturn="0">
   <Message>
      Data read successfully
      Data at offset 4 of size 1 failed RESTRICTION check for text [relative_size valid_values IOIQty Tag FIX]
      Data at offset 4 of size 1 failed item presentation test for number [qty float DataTypes FIX]
      Data at offset 4 of size 1 failed RESTRICTION check for text [a_b_or_c valid_values IOIQty Tag FIX]
   </Message>
   <Settings>C:\maps\validationerrors\choicegroups\fix_tag_all_3_invalid.inp</Settings>
   <TimeStamp>2024-01-04T18:36:13Z</TimeStamp>
</SourceReport>

<WorkArea type="Memory">
<inputarea  card="1"   bytes="131344"/>
</WorkArea>

In addition to messages describing the validation error, the last known data that was correctly validated can be reported. In order to enable this message, user needs to set in the config.yaml file:

runtime:
  validationErrors:
    lastFound: true
The default value for lastFound is false. If the lastFound option is set to true, the example map audit file looks like:
<ExecutionSummary MapStatus="Error" mapreturn="8" ElapsedSec="0.0058" BurstRestartCount="0">
   <Message>One or more inputs was invalid</Message>
   <CommandLine>test.mmc</CommandLine>

<SourceReport   card="1"   adapter="File"   bytes="91"   adapterreturn="0">
   <Message>
      Data read successfully
      Data at offset 62 of size 0 is INVALID data for text [lastname textblobs Root] (A required object is missing.)
      Data at offset 89 of size 0 is INVALID data for text [lastname textblobs Root] (A required object is missing.)
      Data at offset 86 of size 2 was last found to be number [month textblobs Root]
   </Message>
   <Settings>inout.txt</Settings>
   <TimeStamp>2024-06-10T14:05:11Z</TimeStamp>
</SourceReport>

The last message points to the offset and size of data that was last found to be valid.

If the Audit data type validation is enabled on output cards, the engine validation errors audit report is not supported.