I'm trying to get the filename of the deleted document using a behaviour, this is my function :
public void onDeleteNode(ChildAssociationRef childAssocRef, boolean arg1) {
NodeRef nodeRef = childAssocRef.getChildRef();
String filename = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
System.out.println(filename);
}
the error in this line :
String filename = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
I changed onDeleteNode with beforeDeleteNode and I'm still facing same issue "Node does not exist"
public void beforeDeleteNode(NodeRef nodeRef)
Hello,
Maybe this post will be helpful for you:
Policy method 'beforeDeleteNode' gives an invalid NodeRef
Best,
Thanks.
It helps.
Also relevant https://www.google.es/amp/s/angelborroy.wordpress.com/2015/05/22/alfresco-implementing-delete-behavi...
Thanks.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.