I'm developing some kind of CRUD application that needs to create, update and delete an external repository when content (a special type of document) changes in Alfresco.
Therefor I implemented a behaviour that should react on a version change (update external) and on the deletion (delete external) of a document.
But I realized that the policies beforeDeleteNode and onDeleteNode are both triggered when a new version is uploaded.
For me this makes no sense because the Node is NOT deleted, only a new version is created for an existing Node.
I consider this as a bug, because the Node document is only replaced with another Node. It keeps the id, the properties etc...
On the other hand I think there's no need to fire these events on a version change. Because the VersionServicePolicies is sufficient to react on it.
This breakes the concept of CRUD.
Does anyone know which event to react on, when a node is indeed deleted (or archived) from the repository?