Your BOM sync failure is caused by inadequate handling of part identity changes. Here’s how to configure proper part renaming support across all three critical areas:
CAD-BOM Mapping Rules:
Your mapping rules are using filename-based matching, which breaks immediately when parts are renamed. You need to reconfigure the mapping to use stable identifiers. Modify your CAD connector mapping configuration:
<MappingRules>
<PartIdentification method="property" fallback="filename">
<PrimaryKey>part_number</PrimaryKey>
<SecondaryKey>unique_id</SecondaryKey>
</PartIdentification>
</MappingRules>
This tells the connector to match parts by their embedded part_number property first, and only use filename if that’s unavailable. Ensure your CAD parts have unique identifiers stored as custom properties that persist through renames.
If you must support filename-based matching, add a rename tracking mechanism:
// Pseudocode - Rename tracking logic:
1. Query CAD vault for rename history of source files
2. Build filename mapping: old_name -> new_name
3. Before sync, update BOM references with new filenames
4. Execute sync with updated references
5. Log all rename operations for audit trail
Structure Reconciliation Process:
Your current reconciliation logic aborts on the first missing part reference. You need a more sophisticated reconciliation process that attempts multiple resolution strategies:
Implement a cascading resolution approach:
- Try exact filename match (current behavior)
- If failed, query CAD vault for renamed versions of the missing file
- If found, update the BOM reference and continue sync
- If not found, check if part was deleted and mark as obsolete in BOM
- Only abort if no resolution path exists
This requires enhancing your CAD connector’s reconciliation module to be rename-aware. The connector needs to query the CAD system’s rename history API (if available) or maintain its own tracking database.
Part Renaming Handling:
To support design iteration renames without breaking sync, implement a pre-sync validation step:
Before executing BOM sync:
- Compare current CAD structure filenames against last sync snapshot
- Identify all renamed parts (same part ID, different filename)
- Create a rename mapping table
- Update BOM part references to use new filenames
- Then execute normal sync process
You can implement this as a server-side method that runs before the CAD connector sync:
// Pseudocode - Pre-sync rename handler:
1. Load previous sync snapshot from database
2. Get current CAD assembly structure from connector
3. For each part in current structure:
- Check if part_id exists in snapshot with different filename
- If yes, add to rename mapping
4. Update BOM relationships with new filenames from mapping
5. Proceed with standard sync operation
For your immediate issue with the ‘PART_123’ rename, you’ll need to manually update the BOM references. Run a database query to find all BOM relationships pointing to ‘PART_123_OLD.sldprt’ and update them to ‘PART_123_NEW.sldprt’. Then re-run the sync.
Long term, consider implementing a part numbering policy where the part number (not filename) is the authoritative identifier, and filenames are allowed to change as long as the part number property remains constant. This makes the entire system much more resilient to renames.