SAS Studio is shipped
with several predefined tasks, which are point-and-click user interfaces.
These user interfaces guide the user through an analytical process.
For example, tasks enable users to create a bar chart, run a correlation
analysis, or rank data. When a user selects a task option, SAS code
is generated and run on the SAS server. Any output (such as graphical
results or data) is displayed in SAS Studio. For more information
about these predefined tasks, see
SAS Studio: User's Guide.
Because of the flexibility
of the task framework, you can take your existing SAS code and turn
it into a SAS Studio task. In SAS Studio, all tasks use the same common
task model, which is based on XML and the Velocity Template Language.
No Java programming or ActionScript programming is required to build
a task.
The common task model
(CTM) defines the template for the task. In the CTM file, you define
the user interface for the task and specify the code that is needed
to run the task. In addition, the task has metadata so that it is
recognized by SAS Studio.
In the CTM file, a task
is defined by the
Task element, which has
these children:
Registration
The Registration element
identifies the type of task. In this element, you define the task
name, description, and other task properties.
Metadata
The Metadata element
can specify whether an input data source is required to run the task.
In the metadata, you also specify any role assignments and the options
in the task.
-
The Roles element
specifies the types of variables that are required by the task. Here
is the information that you would specify in this element:
-
type of variable that the user
can assign to this role (for example, numeric or character)
-
the minimum or maximum number of
variables that you can assign to a role
-
the label or description of the
role that appears in the user interface
-
The Options element
specifies how to display the options in the user interface.
UI
The UI element
describes how to present the user interface to the user. A top-down
layout is supported.
Dependencies
The Dependencies element
describes any dependencies that options might have on one another.
For example, selecting a check box could enable a text box.
Requirements
The Requirements element
specifies what conditions must be met in order for code to be generated.
Code Template
The CodeTemplate element
determines the final output of the task. For most tasks, the output
is SAS code.