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:
- Schema definition sync completion (look for ‘AttributeDefinitionSynced’ events)
- Schema version validation success
- 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.