cancel
Showing results for 
Search instead for 
Did you mean: 

Executing an action in asynchronous mode

andrepra
Champ in-the-making
Champ in-the-making
Hi,
I have an action that works in batch mode configured as a scheduled action. I would like to call the same action from a webscript.
{{{
var rssImport = actions.create("importerPressReviewAction");
rssImport.parameters.dateFrom = dateFrom ;
rssImport.parameters.dateTo = dateTo ;
rssImport.parameters.mailTo = person.properties["cm:email"];
rssImport.parameters.mailFrom = "my@email.com";
rssImport.execute(companyhome);
}}}
The problem is that take a lot of time and the webscript request ends with a timeout. Exists a solutions to launch the action in asynchronous mode? I found this link

http://wiki.alfresco.com/wiki/3.0_JavaScript_API_for_Rules_and_Actions#Add_to_ScriptNode_API

but seems that  methods doen't exists on ScriptNode object.
Thanks
Andrea
1 REPLY 1

mrogers
Star Contributor
Star Contributor
Yes.  I agree that the JavaScript methods don't exist.  I've deleted that page to avoid further confusion. Smiley Sad

The slightly better news is that the action service does support running actions asynchronously and it should be an easy enhancement.