01-26-2010 05:29 AM
The second way is to use direct URL addressing for a REST-style of execution. The Alfresco web client features a generic 'command' servlet that allows the execution of scripts directly via URLs. This feature allows direct access to scripts and the result of the script is returned as the HTML response stream. See the Command Servlet documentation for more information on this servlet.
Responsible for processing an Alfresco JavaScript through the 'execute' command. The NodeRef supplied as the first 3 arguments of the node specify the script to execute. Optionally an additional NodeRef can be specified to provide a document node context to the script (in addition the parent folder of the document node will then be used as the space context to the script). Returns the result of the script (if any) converted to a string as the HTML response. See the JavaScript API page for more information on the Alfresco JavaScript API.
Examples:
/alfresco/command/script/execute/workspace/SpacesStore/d8470f03-b80a-11da-97b9-8d453af5a554
/alfresco/command/script/execute/workspace/SpacesStore/d8470f03-b80a-11da-97b9-8d453af5a554/workspace/SpacesStore/12345678-9012-11da-97b9-8d453af5a554
Any additional URL parameter arguments can be passed to the servlet, they will be collected and supplied to the scripting data-model into an associative JavaScript array object called args. The args object is accessable from the root of the script scope and contains all the URL name/value pairs supplied to the servlet.
01-27-2010 08:52 AM
01-27-2010 10:08 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.