Global Variables Configurator
Global variables can help you simplify development and deployment of Cloverleaf interfaces.
Global variables are string name-value pairs that are used to define commonly-used or environment-related values for a site. After there are changes to variable values, these changes are then applied to all areas where the variable is used.
The engine runtime searches and replaces global variable names with actual values. Any string that matches the global variable naming pattern that fails to be replaced is reported as a warning. The string is left unchanged.
Global Variables support the master site model. For example, a global variable defined in a local site takes precedence over the same variable defined in the master site.
Global variables cannot be used recursively, that is, a global variable cannot be a part of the value of another global variable.
The Global Variables Configurator is similar to the Lookup Table Configurator. Global variable values can be masked and encrypted similar to lookup table entries.
Every variable must have a
$$
prefix. For example,
$$prodadtport
.
Global variables can be used in configuration file fields such as:
- NetConfig protocol parameters: For example, port number, directory path, and web services URL.
- Xlate files: Constants in input fields
- Lookup tables: Input or output values
- Arguments to UPoCs
- Alert definition entries
Global variable names are restricted to:
- A-Z
- a-z
- 0-9
- _ (underscore)
This tool lists all variables in an editable table. You can manipulate table cells to edit any variable name and value. Then, you can set whether the value should be encrypted before it is saved into globalVariables.ini.
Table values are masked when encrypted is selected, unless the password is provided. A right-click menu is available to edit variables.
Variables can be deleted and variable names can be updated, whether the variable is being used. When doing this, there could be an issue if an active variable is removed. To remind users of potential issues, the IDE tools that support global variables have additional validation, and prompts for any missing global variables.
Global variables afffect other functions in these ways:
- CLAPI has interfaces for getting and setting global variables.
- The Site Document has a page to display all global variables.
- For NetConfig, lookup tables, alerts, and xlate files where the global variables are used, the variable names are a link to the Global Variables tool. These links are located in Site Document.
- Security Server can add the tool and the ini file under security control.
- The globalVariables.ini is under Version Control, and has file read/write lock support.
- There are Tcl/Java APIs to get variable values (read-only).
When globalVariables.ini.
on the menu is configured, you can view all encrypted values only when a correct password is provided. Password values and global variables marked as encrypted are encrypted when saving into