Here’s a complete solution for establishing CAD references post-import. This addresses all three key aspects: bulk import mapping correction, CAD reference linking automation, and legacy data migration validation.
Step 1: Validate Your Existing Data
First, export your current quality issues and verify the CAD document numbers exist in Windchill. Run a query to identify any missing CAD documents:
SELECT qi.number, qi.cad_ref_number
FROM quality_issues qi
LEFT JOIN cad_documents cd ON qi.cad_ref_number = cd.number
WHERE cd.number IS NULL
Step 2: Create Reference Linking Utility
Develop a Java utility to establish the missing links programmatically. Here’s the core approach:
// Pseudocode - CAD Reference Linking Process:
1. Query all quality issues with missing CAD references
2. For each quality issue, lookup CAD document by number
3. Determine appropriate version (latest released or date-matched)
4. Create WTPartDescribeLink between quality issue and CAD document
5. Set link attributes (reference type, creation date, etc.)
6. Commit transaction and log results
7. Handle exceptions for missing documents or lifecycle conflicts
// Reference: Windchill Customization Guide Section 8.4
Step 3: Handle Version Resolution Logic
For legacy data migration, you need clear rules for version selection:
- If quality issue date < CAD latest release date: Link to version that was current at issue creation
- If quality issue date >= CAD latest release date: Link to latest released version
- If no released version exists: Link to latest version regardless of state
This ensures historical accuracy in your traceability.
Step 4: Bulk Processing Strategy
Process in batches of 500 records to avoid memory issues:
- Read mapping file (CSV with QI number, CAD number, creation date)
- Process each batch in separate transaction
- Log successful links and failures separately
- Generate reconciliation report showing link status
Step 5: Validation and Verification
After processing:
- Run count query to verify all expected links were created
- Spot-check 50-100 quality issues in UI to confirm references appear correctly
- Test traceability reports to ensure compliance requirements are met
- Verify lifecycle state transitions still work with new references
Critical Considerations for Bulk Import Mapping:
- Always include version/iteration identifiers in reference columns
- Import dependent objects (CAD documents) before referencing objects (quality issues)
- Use the ReferenceResolver utility post-import for standard reference types
- For custom reference types, programmatic linking is required
Legacy Data Migration Best Practices:
- Maintain original system IDs in Windchill custom attributes for troubleshooting
- Create detailed mapping documentation showing old ID to new ID relationships
- Keep import CSV files as audit trail for compliance
- Test migration process on subset (100-200 records) before full migration
This approach has worked successfully for migrations involving 10,000+ quality issues with CAD references. The programmatic linking typically takes 2-3 hours for your volume of 3,500 records, and you’ll have complete traceability restored with proper version control.