ACSCE-5X practice question 1 of 15

Alfresco Content Services defines some root objects to use with Web Scripts FreeMarker templates. Which one of the following objects is NOT a default root object?

Full set: 87 questions
Answer options
A: args
B: user
C: url
D: workflow Correct answer
Correct Answer:
D. workflow
Explanation

The Alfresco Web Script framework provides a set of core root objects available by default in FreeMarker templates. These include objects related to the request context, such as args (URL arguments), user (authenticated user), and url (request URL details). The workflow object, while available in the template's root model, is not a core framework object. It is a root-scoped object that exposes the Alfresco Workflow Service. It is considered an Alfresco Repository service-specific object made available to the scripting and templating context, rather than a fundamental object of the Web Script framework itself. Therefore, it is the one that is NOT a default root object of the core framework.

Why Incorrect

A. args: This is incorrect. args is a fundamental, default root object provided by the Web Script framework to access arguments from the request URL.
B. user: This is incorrect. user is a standard, default root object that provides information about the currently authenticated user, which is essential for context and security.
C. url: This is incorrect. url is a default root object provided by the framework to help construct URLs and access information about the request URI.

References

1. Alfresco Content Services 5.2 Documentation, "Web Script reference": This page lists the root objects available to the controller script and template model as part of the core framework. Notably, it includes args, user, and url, but it does not list workflow as a core framework object.

Reference: Alfresco Documentation 5.2 > Developing > Web Scripts > Web Script reference > Root objects available to the controller script and template model.

2. Alfresco Content Services 5.2 Documentation, "FreeMarker Template API": This document distinguishes between different types of objects available. It lists url and args under "Web Script objects" and workflow under "Alfresco Repository objects". This supports the distinction that workflow is a repository-level object, not a core framework-level one.

Reference: Alfresco Documentation 5.2 > Developing > APIs > FreeMarker API > Available root objects.

3. Alfresco Content Services 5.2 Documentation, "Root-scoped JavaScript objects": This page officially lists workflow as one of the root-scoped objects available to server-side JavaScripts, defining it as an interface to the WorkflowService. This confirms its status as a service-level object rather than a core Web Script context object.

Reference: Alfresco Documentation 5.2 > Developing > APIs > JavaScript API > Root-scoped JavaScript objects > Root-scoped Services APIs.

Scroll to Top