I am performing a FileNet to Documentum (22.2) migration using DFC (Java). I am hitting a "Smart Merge" issue during versioning where Documentum is silently re-applying metadata from the previous version even when I explicitly attempt to null it out on the Private Working Copy (PWC).

The Environment: Documentum 16.4 / 23.x (standard DFC) Goal: Create a new Major Version (e.g., 1.0 -> 2.0) with entirely new metadata from a Map. The Issue: If Attribute_A has the value "005293" in Version 1.0, and my data map for Version 2.0 says this field should be NULL, the resulting Version 2.0 object still contains "005293". My logs confirm the PWC is NULL in memory before checkin, but the checkin operation seems to "merge" or "carry forward" the old value because it sees it as an inherited attribute. Current Code Logic: java // 1. Checkout sysObj.checkout(); IDfSysObject pwc = (IDfSysObject) session.getObject(sysObj.getObjectId()); // 2. Content First (Requirement: Bind content before metadata) pwc.setContentType(formatFromMap); pwc.setContent(byteArrayOutputStream); // 3. Metadata Loop (The "Brute Force" attempt) for (String key : datamap.keySet()) { Object val = datamap.get(key); if (val == null || val.toString().isEmpty()) { pwc.setNull(key); if (pwc.isAttrRepeating(key)) pwc.removeAll(key); } else { pwc.setString(key, val.toString()); } } // 4. Checkin // Note: Adding pwc.save() before this line throws DM_SYSOBJECT_E_NOT_CHECKEDOUT IDfId newId = pwc.checkinEx(false, "2.0", "0", null, null, null); Use code with caution. What I have tried: pwc.setNull(key): DFC ignores this during checkin and pulls the value from the previous version. pwc.setString(key, " "): This "nudge" works for strings, but throws DM_API_E_BADDATE on date fields. pwc.save() before checkin: This releases the lock in my environment, causing the checkin to fail with NOT_CHECKEDOUT. The Question: How can I programmatically "break" the inheritance link on a PWC so that checkinEx honors the NULL values provided in the current session instead of merging them from the version history? Is there a specific IDfVersionPolicy or hidden checkinEx flag to disable this "Smart Merge" behavior?

Vaughan Walker's user avatar

New contributor

Vaughan Walker is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

2

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.