AnsweredAssumed Answered

onCreateNode isn't triggered by creation of archieved node

Question asked by alexsolomatin on Jan 27, 2011
Latest reply on Jan 27, 2011 by alexsolomatin
Hello.

Now I'm using Alfresco Enterprise 3.3.3.7 and have troubles with handling of archived nodes creation. I'm developing some kind of node monitoring. I implemented the interface NodeServicePolicies.OnCreateNodePolicy and bound this policy in this way:
this.policyComponent.bindClassBehaviour(QName.createQName(
   NamespaceService.ALFRESCO_URI, "onCreateNode"),
   ContentModel.TYPE_CONTENT, new JavaBehaviour(this,
   "onCreateNode"));
Also I implemented and bound the policies ContentServicePolicies.OnContentReadPolicy, NodeServicePolicies.OnDeleteNodePolicy and some the others. When it works with regular content, all is OK. When the node is being deleted, I need to intercept creation of an archived node. But as I see, onCreateNode() is not triggered for archived nodes. OnCreateNode() is implemented like this:
@Override
public void onCreateNode(ChildAssociationRef childAssocRef) {
   log.debug("onCreateNode()");
// some code
}
I have never seen calls of onCreateNode() for archived nodes in the log file. Besides, afrer deleting a node (i. e. after call of onDeleteNode()), I can see call of onContentRead() for just created archived node.

Could anyone tell me why onCreateNode() is not triggered by creating archieved nodes? When I used Alfresco Enterprice 3.2r, all worked correctly. The problems begin afrer switching to using of Alfresco 3.3…]

Thanks in advance.

PS. I tried to using "this" in the parameters of bindClassBehaviour() instead of ContentModel.TYPE_CONTENT. It did not give any result…

Outcomes