You’re dealing with a multi-faceted import validation issue that requires addressing four key components:
1. Import Mapping Configuration
Your current mapping is incomplete for proper duplicate detection. You need to map both the identifier and the OSLC resource URI:
<import:mapping>
<source>dcterms:identifier</source>
<target>rm:requirementId</target>
<matchRule>EXACT</matchRule>
</import:mapping>
<import:mapping>
<source>rdf:about</source>
<target>oslc:resource</target>
<matchRule>URI</matchRule>
<preserveSource>true</preserveSource>
</import:mapping>
The preserveSource attribute is critical-it tells the import engine to store the original DOORS Next URI with each imported requirement. This URI becomes the primary key for subsequent imports.
2. UUID Preservation Strategy
The UUID matching rule you’re using only works if the UUID field is populated in both source and target. DOORS Next requirements have UUIDs, but your QM test case management may not be preserving them during import. Add this to your mapping:
<import:uuidHandling>
<preserveSourceUUID>true</preserveSourceUUID>
<conflictResolution>SKIP</conflictResolution>
</import:uuidHandling>
This ensures that when a requirement with the same UUID is encountered, the import skips it rather than creating a duplicate.
3. Skip-If-Exists Validation
The skip-if-exists mechanism relies on an OSLC query to check for existing resources. Your import configuration needs to specify the query parameters:
<import:validation>
<skipIfExists>true</skipIfExists>
<oslc:query>
<oslc:where>dcterms:identifier="{sourceId}" and oslc:resource="{sourceURI}"</oslc:where>
<oslc:select>dcterms:identifier,oslc:resource</oslc:select>
</oslc:query>
</import:validation>
This query uses both identifier and source URI for matching, which is more reliable than UUID alone. The {sourceId} and {sourceURI} placeholders are replaced with values from each imported requirement.
4. OSLC Feed Validation
Before running another import, validate your DOORS Next OSLC export feed. Query the feed directly:
GET /rm/oslc/query?oslc.where=dcterms:identifier="REQ-001"
Accept: application/rdf+xml
Verify the response includes:
- Consistent
rdf:about URIs (same URI for same requirement across exports)
- Valid
dcterms:identifier values
- Proper namespace declarations for rm: and oslc: prefixes
If the rdf:about URIs are changing between exports (e.g., including timestamps or session IDs), that’s your root cause. You’ll need to configure DOORS Next to generate stable URIs.
Cleanup and Re-import
Before fixing the import:
- Delete the duplicate requirements from QM (keep only the original 200)
- Update your import mapping configuration with the four components above
- Run a test import with just 5-10 requirements to verify duplicate detection works
- Check the qm.log for “Resource already exists, skipping” messages
- Once validated, run the full import of your 50 new requirements
This systematic approach addresses import mapping completeness, UUID preservation, skip-if-exists validation, and OSLC feed integrity-the four pillars of reliable bulk import operations.