I am using Filenet 4.5.1 I have a module in my project where we move the contents from a folder to a newly created folder , and then delete them from old folder.
ObjectStore objectStore;
ReferentialContainmentRelationship toRcr = null;
ReferentialContainmentRelationship fromRcr = null;
DocumentSet documentSet;
Iterator documentIterator;
documentSet = fromFolder.get_ContainedDocuments();
documentIterator = documentSet.iterator();
Document document;
while(documentIterator.hasNext())
{
document = (Document) documentIterator.next();
toRcr = toFolder.file(document,AutoUniqueName.AUTO_UNIQUE, document.getClassName(),DefineSecurityParentage.DO_NOT_DEFINE_SECURITY_PARENTAGE);
toRcr.save(RefreshMode.REFRESH);
toFolder.save(RefreshMode.REFRESH);
fromRcr = fromFolder.unfile(document);
fromFolder.save(RefreshMode.REFRESH);
}
But, here toFolder.save(RefreshMode.REFRESH); is not being executed properly and an exception is coming
Exception in FNServices.getOldFileFolderObject() : The object {ADF64C74-F80D-4BD7-8A58-86699C66BFAC} has been modified since it was retrieved. Update sequence number mismatch; requested USN = 2, database USN = 3.
Here , the object refers to the new folder created.