Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 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.
The Project panel is updated to display all currently defined global variables. 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 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
The next table 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 for file-based local projects is MyDomain. The value for server-based projects is the domain to which the project was saved.
Indicates 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.
TIBCO Rendezvous routing daemon (rvrd) to be used. See TIBCO Administrator Server Configuration Guide for details about setting up a domain using rvrd.
Computer on which the TIBCO Rendezvous agent runs. This variable is only relevant if you are using the TIBCO Rendezvous Agent (rva) instead of the TIBCO Rendezvous daemon, and if you have configured a non-default setup. See TIBCO Rendezvous Administration for details about specifying the rva parameters.
TCP port where the TIBCO Rendezvous agent (rva) listens for client connection requests. See TIBCO Rendezvous Administration for details about specifying the rva parameters. Defaults to 7501.
TIBCO Rendezvous daemon used in the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details about this parameter.
TIBCO Rendezvous network used by the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details about this parameter.
TIBCO Rendezvous service used by the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details about this parameter.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved