Inspection plan synchronization fails when custom attributes are mapped from ERP

We’re experiencing a blocking issue with inspection plan synchronization from our ERP system to Aveva MES 2021.2. The synchronization works fine for standard inspection plans, but fails completely when custom attributes are included in the mapping.

The schema mapper throws validation errors during the sync process:

<ValidationError code="ATTR_001">
  Custom attribute 'CertificationLevel' not found in target schema
</ValidationError>

We’ve verified the custom attributes exist in both systems and the mapping configuration looks correct. The integration logs show the sync starts but aborts at the attribute validation stage. This is blocking our quality team from releasing new inspection plans to the shop floor. Has anyone successfully mapped custom attributes between ERP and MES quality management module?

Let me provide a comprehensive solution addressing all three critical areas:

Custom Attribute Mapping: First, enable the attribute definition sync in your schema mapper configuration:

<SchemaMapper>
  <syncAttributeDefinitions>true</syncAttributeDefinitions>
  <includeMetadata>true</includeMetadata>
</SchemaMapper>

Schema Update in MES: Unlock the quality schema for extensions by updating QualityManagement.config:


quality.schema.allowExtension=true
quality.schema.validationMode=STRICT
quality.schema.versionCheck=true

Then create a schema bridge file (SchemaVersionBridge.xml) to handle the version mismatch between ERP (2.0) and MES (2.1):

<SchemaBridge source="2.0" target="2.1">
  <AttributeMapping>
    <Map source="CertificationLevel" target="CertificationLevel"
         transform="passthrough" validateType="true"/>
  </AttributeMapping>
</SchemaBridge>

Integration Log Analysis: The key is enabling detailed logging to track the entire sync process. Update your integration service logging configuration:


integration.log.level=DEBUG
integration.log.includeSchemaOps=true
integration.log.captureValidationErrors=true

After implementing these changes, restart the integration service and run a test sync with a single inspection plan. Monitor the logs for:

  1. Schema definition sync completion (look for ‘AttributeDefinitionSynced’ events)
  2. Schema version validation success
  3. Attribute mapping execution without validation errors

The root cause in your case is the combination of disabled attribute definition sync and the schema version mismatch. The validation error you’re seeing is actually MES protecting data integrity by rejecting attributes that don’t exist in its schema. Once the schema is properly updated with the attribute definitions and the version bridge is in place, your inspection plans will sync successfully.

One additional recommendation: After the first successful sync, set ‘syncAttributeDefinitions’ back to false unless you’re actively adding new custom attributes. This improves sync performance by skipping the schema check on every run.

Test this in a non-production environment first, as schema changes can affect existing quality data if not handled carefully. The schema extension is additive (won’t remove existing attributes) but always backup your quality database before making schema modifications.

Thanks for the suggestion. I checked the schema mapper configuration and found that attribute definitions are supposed to sync first, but the logs show they’re being skipped. The mapper configuration has a flag ‘syncAttributeDefinitions’ that’s set to false in our environment. Should this be enabled? I’m concerned about changing it without understanding the implications for existing plans.

Never downgrade the MES schema - that can corrupt existing inspection data. The proper approach is updating the ERP export to target the current MES schema version. You’ll also need to create a schema mapping file that bridges any structural differences between versions. Here’s what worked for us in a similar situation with custom attributes and schema updates across versions.