ACSCE-5X practice question 6 of 15
What are the variable’s scopes available for Activiti workflows?
Full set: 87 questionsIn Activiti, the workflow engine embedded in Alfresco ACS 5.x, variables have two primary scopes. The first is the 'process instance' scope, where variables are accessible throughout the entire lifecycle of that specific workflow instance, including all its tasks and execution paths. The second is the 'task' scope, where variables are local to a particular user task. Task-local variables are typically used for data that is only relevant to that specific step and are not propagated to the parent process instance upon task completion.
B. Node and task: "Node" is a generic term for any element in a process diagram (e.g., task, gateway). It is not a defined variable scope in Activiti; scope is tied to the process instance or a specific task.
C. Process instance and form: A form is a user interface component used to capture data and set variables. It is not a variable scope itself; the variables it sets are stored in either the task or process instance scope.
D. Process instance and global: The term "global" is ambiguous. While process instance variables are global within that instance, Activiti does not have a "global" scope that spans across multiple, independent process instances. The correct terms are process instance and task.
1. Activiti 5.x User Guide, Section 7.5. Variables: "Every process instance can have variables... A variable can also be local to a specific task. Such a variable is only accessible on that task and its lifecycle is bound to that task." This section explicitly defines the two scopes.
2. Alfresco Content Services 5.2 Documentation, Workflow API: The Java API for the TaskService clearly distinguishes between the two scopes with methods like setVariable(String taskId, String variableName, Object value) which sets a process-instance-scoped variable from a task context, and setVariableLocal(String taskId, String variableName, Object value) which sets a task-scoped variable.
3. Alfresco Content Services 5.2 Documentation, Server-side JavaScript API, Workflow objects: The documentation for the task object in the Workflow JavaScript API shows properties for both process-scoped variables (task.vars) and task-scoped variables (task.localVariables), reinforcing the two distinct scopes.
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 7What is the simplest way to call a custom Alfresco repository JavaScript extension from a…
