Getting exception while deleting epm documents, please check below exception and provide code snippets if anybody knows :
- INFO : wt.system.err wcadmin - (wt.fc.fcResource/46) wt.fc.ReferentialIntegrityException: Referential integrity violations occurred for this operation:
- INFO : wt.system.err wcadmin - The following items cannot be deleted because they are members of "EPMCheckpoint - wt.epm.workspaces.EPMCheckpoint:1266915". "Assembly - 0000000501.asm, A.1 (1); "
- INFO : wt.system.err wcadmin - The following items cannot be deleted because they are members of "EPMAs Stored Config - ". "Assembly - 0000000501.asm, A.1 (1); "
One of the essential things that the system does is allow a user to go back and obtain any set of data as it was when it was checked in. This is the "as stored" condition, relative to a parent object.
Example: A drawing at A.2 was checked in displaying the geometry in a 3D model at A.7. The drawing is now at B.4 and the related 3D model is at B.3, but any user can go back and get the drawing and model as it was when A.2 was checked in.
For assemblies, this can get complex but you can always go back to how things were.
Important also is that any system-generated output (e.g. publishing) always uses the as stored condition to pull data.
There is database table EPMASSTOREDMMEMBER (generally very large) that keeps these relationships.
So, the system prevents deleting any deletion of a version used for as-stored condition. The only way to delete is to first delete parent objects.
It's a good protection that the system prevents deletion.
The question is: Why do you want to delete the EPM documents?
Like Mike said, they are in the system to preserve the As Stored condition.
I have many files that my users have created in a spur of the moment and then changed to a standard item, but because of the As Stored linkage, I am stuck with their stupidity. I have renamed a lot of parts with an Obsolete prefix and moved them to an Obsolete folder so they cannot make changes to those files and need to replace them with real parts when they do revisions.