User-Defined Variables
User-defined Universal Controller variables are available for use in triggers, tasks, and Workflows.
You can define variables to be either:
Available to a single trigger, task, or workflow; that is, Local.
Available to all triggers, tasks, and workflows; that is, Global.
You define Local variables (variables specific to a single trigger, task, or workflow) on the Variables tab in the Details of that trigger, task, or workflow. These variables are stored in the ops_local_variable table.
You define Global variables either by:
Selecting Other > Variables from the Automation Center navigation pane.
Using the Set Variable action for a task or workflow.
Global variables are stored in the ops_variable table.
Variable names must begin with a letter.
Allowable characters are alphanumerics (upper or lower case), and underscore (_).
White spaces are not permitted
Variable names are not case-sensitive.
Warning
Do not define Controller variables with the prefix ops_. That prefix is reserved for built-in variables.
When the Controller creates a task instance from a task, it also resolves all variables specified in its free text fields. Because you can define variables at four different levels (trigger, task, workflow, and global), the Controller follows a prescribed formula to determine which variable takes precedence if duplicate variables have been defined. The general order of precedence, each of which may or may not exist in any given situation, is as follows:
Task trigger (highest precedence)
Task
Workflow trigger
Workflow
Global (lowest precedence)
Note
You also can use the Set Variable Action of any task or workflow to define a variable. The Set Variable action explicitly states what scope you are setting the variable at, and under what circumstances.
The following scenarios provide more detailed information about how Controller variables are resolved.
For Tasks Launched by a Trigger
If the trigger defines the variable in the variables tab, that value is used to resolve the variable.
If the trigger does not define the variable, the value from the variable tab in the task Details is used.
If neither the trigger nor the task define the variable, the variable definition in the global variables table is used.
If the global variables table does not define the variable, the variable remains unresolved.
For Tasks Launched by a Workflow
If the task defines the variable in the variables tab, that value is used to resolve the variable.
If the task does not define the variable, and the workflow was launched by a trigger, the value defined in the trigger is used.
If the workflow's trigger does not define the variable or the workflow was not launched by a trigger, the value defined in the workflow is used.
If the workflow does not define the variable, and there is a parent workflow, the value defined in the parent workflow's trigger is used.
If the parent workflow's trigger does not define the variable or if there is no trigger, the value defined in the parent workflow is used.
If the parent workflow does not define the variable, the Controller checks up a level for the trigger on the next parent workflow.
If that trigger does not define the variable, it checks for variables associated with the workflow. (This continues until the top level workflow is reached.)
If the top-level workflow does not define the variable, the variable definition in the global variables table is used.
If the global variables table does not define the variable, the variable remains unresolved.
For Tasks Launched Manually
If the task defines the variable in the variables tab, that value is used to resolve the variable.
If the task does not define the variable, the variable definition in the global variables table is used.
If the global variables table does not define the variable, the variable remains unresolved.
When you enter a variable into a text field, precede the variable with the dollar sign ( $ ) and enclose the variable in curly braces ( { } ). You can enter a series of variables or nested variables.
Examples:
${variable_name}
${v1}${v2}
${${inner_variable}}
You can create variables that are:
Available on a Global level; that is, available for all triggers, tasks, and Workflows.
Available only for a specific trigger, task, or Workflow.
To create a Global variable that is available for all triggers, tasks, and Workflows:
Step 1 | From the Automation Center navigation pane, select Other > Variables. The Variables list displays a list of all Global variables. (You also can define a Global variable by using the Set Variable action for a task or workflow.) |
|---|---|
Step 2 | Enter / select Details for a new Variable, using the field descriptions below as a guide.
To display more of the Details fields on the screen, you can either:
|
Step 3 | Click a button to save the record in the Controller database. |