AnsweredAssumed Answered

Invoking a webscript from Script

Question asked by leonardo.celati on Apr 29, 2014
Latest reply on Apr 29, 2014 by romschn
I have a set of webscripts that I would like to invoke from an Alfresco Script.
Don't know if it's relevant, the script is a part of a folder rule.

By looking at the documentation it is stated that any client capable of doing http request can invoke a webscripts, so it seems it is not possible from within a Script.

If instead is possible, could you provide some example ?

Just a few notes about what I am trying to achieve.

This is the starting point: a folder MyFolder with a rule, a Script 'MyScript' and a WebScript 'MyWebScript'.
Whenever a file is added or removed in MyFolder the workflow invoke 'MyScript'.

'MyScript' is in turn invoking 'MyWebScript' which is doing some CMIS queries and give back an XML file.
'MyScript' should get that xml and create a node/file with such content, or at least save the file itself.

The webscripts set is already well consolidated, so I would like to reuse the logic as much as possible.