AnsweredAssumed Answered

Calling rest service via rule script

Question asked by ally311 on Jan 2, 2018
Latest reply on Jan 15, 2018 by douglascrp



For a project I'm working on I need to be able to upload files to an alfresco repository along with a document Id (to be stored as a value of a custom model).

After a file is uploaded, I want to make a call to an external rest service (that I have built) that will be able to retrieve other useful bits of metadata from a database by using the document Id provided and update the node using the public rest api.

I had been hoping to create a script to call this rest service using the folder rules.

My current approach doesn't seem to be working as I get errors when trying to upload when the rule is active, which I imagine is due to the seemingly common "XMLHttpRequest is not defined" error (which I get when trying to run the script locally).


Is there a way I can achieve this via this approach?

If not, what is the best approach to take?