AnsweredAssumed Answered

Custom behaviour onCreateNode policy

Question asked by pedrosaraiva on Feb 8, 2010
Latest reply on Feb 2, 2011 by mitpatoliya

I'm trying to implement a listener to integrate alfresco with another system. The listener will be triggered when a file (or folder) is created, deleted, updated and versioned. I’ve created a behaviour and binded to the policies onContentUpdate, onCreateNode, onUpdateNode… etc, using java.

When I create a folder the onCreateNode is triggered. Then, I create a new thread and send to the other system, via webservice, an event with the webdav URL of the resource. The other system will try to connect to that URL and sometimes it will fail. The failure happens because the resource was not created yet.
The only way I'm seeing to make this work "right" is to make the thread sleep for while and then send the event. But that's a very bad solution…
I was hoping to find a afterCreateNode policy, but apparently it doesn't exist.

Can you help me, please?

Kind regards,

Pedro Saraiva