Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 7 Configuring Advanced Topics : Using Global Variables

Using Global Variables
The variable substitution mechanism can override global variables predefined in the project in a restricted manner. Predefined variables can be viewed and set in TIBCO Designer. Variables are specified as %%VARNAME%% and cannot contain any white space.
Variable substitution allows you to accomplish the following.
Variables can be used anywhere in the configuration and will be replaced by the locally-defined adapter instance.
Specifying Variables Using TIBCO Designer
Global variables provide an easy way to set defaults for use throughout your project. There are several ways in which they can be used:
For example, you could assign the value 7474 to the predefined global variable RvDaemon. You can then use the variable in different sessions in your adapter. If you wish to change the TIBCO Rendezvous daemon for your adapter, you can globally set it to a different value or override it from the command line.
To use global variables in your project, follow these steps:
1.
In the project panel, select the Global Variables tab.
The project panel is updated to display all currently defined global variables. Click Open Advanced Editor (pencil icon at the top left corner). You now have these choices:
 
To add a global variable, click the abc icon. A new global variable item is added to the bottom of the list. Supply the variable name and, optionally, the value. Press Enter when you’re done.
 
The global variable is now displayed in the global variables list.
2.
When the project is deployed and the configured components are run, all occurrences of the global variable name are replaced with the global variable value (unless it was overridden in a way that had higher precedence).
A number of global variables are predefined. See Predefined Global Variables for information. You may add definitions of any variables you need to the predefined variables.
Changing Global Variable Values at Runtime
You can change the value of a global variable when you deploy your project in TIBCO Administrator. See the section on modifying runtime variables in the TIBCO Administrator User’s Guide for more information on using TIBCO Administrator.
You can also specify values for global variables when starting a process engine on the command line. To do this, specify the following as a command line argument when starting the process engine:
 
-tibco.clientVar.variablePathAndName value
where variablePathAndName is the name of the variable you wish to set, including the path to the variable if it is contained in a folder. value is the value you wish to set the variable to. For example, if you have a global variable named item1 contained in a folder named myGroup and you wish to set its value to 500, add the following argument to the command line when starting the process engine:
 
-tibco.clientVar.myGroup/item1 500
Predefined Global Variables
Table 42 lists and explains the predefined global variables. Some global variables are automatically used within the system when an adapter instance is configured.
The default value is MyDomain. This value can be any string value. This global variable is used by the system to partially define the subject name defined for a service.
Used by the system to indicate whether TIBCO Hawk is used to monitor the adapter. True indicates that a Hawk microagent is defined for the adapter. False indicates the microagent is not to be used.
Used by the system to identify the TIBCO Rendezvous routing daemon. See TIBCO Rendezvous Administration for details about specifying the routing daemon name.
Used by the system to identify the TIBCO Rendezvous daemon parameter. The parameter instructs the transport object about how and where to find the Rendezvous daemon and establish communication. The default value is 7500, which is the default value used by the Rendezvous daemon. See TIBCO Rendezvous Concepts for details about specifying the daemon parameter.
Used by the system to identify the computer on which the TIBCO Rendezvous agent runs. See TIBCO Rendezvous Administration for details about specifying the rva parameters.
Used by the system to identify the TIBCO Hawk daemon parameter. See the TIBCO Hawk Installation and Configuration manual for details about this parameter.
Used by the system to identify the TIBCO Hawk network parameter. See the TIBCO Hawk Installation and Configuration manual for details about this parameter.
Used by the system to identify the TIBCO service parameter. See the TIBCO Hawk Installation and Configuration manual for details about this parameter.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved