ACSCE-5X practice question 7 of 15
What is the simplest way to call a custom Alfresco repository JavaScript extension from a content rule?
Full set: 87 questionsThe simplest and most direct method to execute a custom script from a content rule is by leveraging the built-in "Execute a Script" action. This standard action is designed to locate and run JavaScript files stored in a specific, predefined location within the repository: the Data Dictionary/Scripts folder. When configuring a rule in the user interface, this action provides a dropdown list of all available scripts from that folder. This approach requires no custom Java development, Spring configuration, or packaging into an AMP, making it the most straightforward option.
A. Creating a new custom action and bundling it into an AMP is a more complex, heavyweight development process, not the simplest way.
C. Placing a script on the classpath with a specific function name does not automatically register it as a new, selectable rule action in the UI.
D. The "Execute a Script" action is hard-coded to look in the Data Dictionary/Scripts folder, not the folder where the rule is applied.
1. Alfresco Content Services 5.2 Documentation, "Out-of-the-box actions": This official documentation lists the available actions for content rules. For the "Execute script" action, it states: "Executes a script against the content item. You select a script from the menu that contains all the scripts available in the Data Dictionary > Scripts folder."
Source: Alfresco Documentation, Alfresco Content Services 5.2, "Using rules > Out-of-the-box actions". (Specific section reference).
2. Alfresco Content Services 5.2 Documentation, "Repository-side JavaScript files": This section explains where to store repository-side JavaScript files for them to be accessible by features like rules. It specifies: "Store your scripts in the repository in Company Home > Data Dictionary > Scripts. The out-of-the-box rule action 'Execute a script' can then be used to run the script."
Source: Alfresco Documentation, Alfresco Content Services 5.2, "Developing > Customizing and Extending > Repository-side JavaScript > Repository-side JavaScript files". (Specific section reference).
Keep practicing
Take the free ACSCE-5X practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other ACSCE-5X practice questions
- Question 1Alfresco Content Services defines some root objects to use with Web Scripts FreeMarker te…
- Question 2You want to increase the maximum number of results returned by searches in Share from the…
- Question 3What does it mean when it is said in Solr indexing that the index is “eventually consiste…
- Question 4What are the minimum steps needed to add a custom search form in Alfresco Share?
- Question 5How should s be identified and recognized?
- Question 6What are the variable’s scopes available for Activiti workflows?
