Chapter 26 Deploytime Configuration : Defining and Using Global Variables

Defining and Using Global Variables
You can define and use global variables in your TIBCO Designer project and then provide the variable values at deploy time.
You can also provide values in the BE_HOME/bin/be-engine.tra engine property file.
Values provided in TIBCO Administrator override values provided in the engine property file (BE_HOME/bin/be-engine.tra) and TIBCO Designer.
This section provides the basic procedures for defining and using global variables as a convenience. These topics are covered in more detail in documentation for TIBCO Administrator.
To Add a Global Variable to a Project in TIBCO Designer
To add a global variable, select the Global Variables tab, click the pencil icon to display the editing window, and add the variable name and, as desired, a default value. See TIBCO Designer documentation for more details.
For example, you define a global variable to define the location of a custom caching scheme. You call the variable CachingSchemeLoc and provide a default location of C:/beCachingScheme/myschemes.xml.
To Use a Global Variable in TIBCO Designer
To use a global variable as the value for a project setting, drag it from the list of variables into the text box for the setting, or enter it manually using the syntax %%Variable_Name%%. For example, to use the caching scheme global variable in the File Path field, enter %%CachingSchemeLoc%%.
Note that this syntax is not used with the system functions, System.getGlobalVariableAstype.
To Specify a Value in TIBCO Administrator
Global variables you define in a project appear automatically in TIBCO Administrator, on the application’s Advanced tab. To navigate to this tab, expand Application Management > Application_Name > Configuration, click the application name in the Configuration Builder panel, and then click Advanced. You see the list of global variables. Provide a value in the Value field. Save and deploy.
To Specify a Value in the Engine Property File
Open the engine property file (BE_HOME/bin/be-engine.tra) and add the variable name and the value to be used at deploytime. Use the syntax:
tibco.clientVar.variablename defaultvalue
Alternatively, you could also put the name and value in an override property file and specify the appropriate file using -p option at deploy time.