AnsweredAssumed Answered

Custom Action: Delete Node cause hanging reference id

Question asked by kirana on Nov 23, 2010
I am trying to move a file from Workspace to the AVM repository. But current Action doesn't provide this. So I created a Custom Action that will first make a copy of the node to the specified AVM repository, and later delete the node from the Workspace. The node successfully copied over to the AVM repo and deleted from workspace, but the UI keep showing error message ; "Unable to find the repository item referenced by Id: c0187e5c-8017-4743-aed5-6d2df7a38252 - the record has probably been deleted from the database.". See image below;


The snippet of my code is as below;

if (this.nodeService.exists(actionedUponNodeRef) == true) {

try {
   avmService.createFile(versionPath.getSecond(), name).close();
   ContentWriter writer = this.fileFolderService.getWriter(actionedUponNodeRef);
   OutputStream out = writer.getContentOutputStream();
   copyData(in, out);
   movePropsAndAspectsRepoToAVM(actionedUponNodeRef, childNodeRef, childPath, destinationAssocTypeQName, destinationAssocQName);
   * add temporary aspect to the node and then delete it, in this way alfresco don't archive the node before deleting it
   nodeService.addAspect(actionedUponNodeRef, ContentModel.ASPECT_TEMPORARY, null);                    

} catch (Exception e) {
        throw new AlfrescoRuntimeException("Generic Error : " + e.getMessage());

How do I remove this error message? Which item is still using the node reference id?
Replies & comments are deeply appreciated.