I have a java applications where the user can add documents using alfresco. If fact the user uploads (scans) a document that is moved to the corresponding application folder then it is display in the corresponding application. To check if there are new documents I have a timer that checks the folder (poll). I want to change that to do a "push" when a new document arrives. I realize this I wanted to program a "push server" that notifies the client application of new documents. What I need is that alfresco calls a URL (containing the ID of the document) when a new document arrives but unfortunately I do not know how to realize this. The easiest method would be that I create a rule on the corresponding alfresco folder to call the URL but I did not managed to write a script to do this (I did not found out how to open an external URL in a script).
Does anyone can help or does anyone knows a better solution to realize a "push" of new documents to my applications?
Re: How to call a URL if new document enters folder
Create a rule on a folder which executes java script function on document upload to call a web script. Write a code to call a required URL in a web script controller. You must manage the response you get from the URL.