Thanks for the Script actions link - I looked at this, but when listing out the registered actions it seems to include only the core built in actions like mail, and not any of our webscripts registered in our alfresco install. I am guessing I would maybe need to add the webscripts to a config somewhere to may them available via the root actions JS object?
Just to add a bit more background to why I am asking about this - its basically to be able to generate HTML/XML/JSON files stored in the main repository which are then used as the underlying components for assembling web pages. I would need to capture the final output from the webscript, (including the result of the FTL processing), so any streaming / writing to an ADM node would need to be after the FTL component of the webscript has executed.
Going forward we may then decide to copy these ADM nodes/files out to multiple runtime WCM instances (AVM stores), and assemble the final web pages via JSP's, but I want to try and suss out if we can generate these component files in the main repository first.
The website we are generating uses categorised reverse date order sorted lists of items on several main pages, limited to X items per category. We retrieve these via a lucene search of the ADM repo, but then have to effectively reverse date sort and limit the results outside of the Lucene API. Currently this is done in the JS of the webscripts as this is faster than doing it in the FTL section of the webscript, but it is still an expensive operation.
As the item lists only need to be updated every hour or two we can avoid the overhead of a webscript call everytime someone hits the page by the scheduled generation of these lists via the Alfresco scheduling mechanism. This approach also reduces the dependency of front end website rendering performance on the main ADM repository performance, making the system more scalable.
We are already using the webscript caching mechanism to set the pages to cache for an hour, and have an apache / squid caching system in front of the alfresco instance. However if users do a hard refresh in their browser this will always bypass the cache and result in a webscript call on the main repository, which is unneccesary. If we use the interim file component approach described above, the webscript or JSP call needed to assemble the page would be very lightweight compared to running the original Lucene based webscript directly.
If I find out more on this I will add it to this post.
Thanks.