Executing an action in asynchronous mode

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 11:51 AM
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
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
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 12:12 PM
Yes. I agree that the JavaScript methods don't exist. I've deleted that page to avoid further confusion. 
The slightly better news is that the action service does support running actions asynchronously and it should be an easy enhancement.

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