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


Chapter 5 Advanced Features : 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.
Global variable substitution allows you to accomplish the following.
Specify the value for a variable in a properties file. This overrides the project repository and values set in code but not variables set on the command line.
Variables can be used anywhere in the configuration and will be replaced by the locally-defined adapter instance.
Specifying Global Variables
The adapter can specify variables:
The values in the properties file or Enterprise Edition take precedence over the values set in the project through TIBCO Designer.
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:
Define a variable using TIBCO Designer, then override the value for individual applications at deployment time using TIBCO Administrator. You can also override values for predefined variables, unless the GUI does not allow you to set them later.
Predefine a variable using TIBCO Designer, then override the value for individual services (for example, a publication service or a TIBCO ActiveMatrix BusinessWorks process) at deployment time using TIBCO Administrator. The values you specify are then used at runtime. You can also override values for predefined variables, unless the GUI does not allow you to set them later.
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 want to change the TIBCO Rendezvous daemon for your adapter, you can globally set it to a different value or override it from the TRA file.
To Specify Global Variables:
1.
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 assign or change a variable value, select that region and triple-click the variable. The variable expands so you can change either the variable name or the variable value. Press Enter when you’re done.
To add a new global variable group, click the group icon (on the left below the project panel). Specify the name of the group, then press Enter.
To add a global variable to the list, click the abc icon below the project panel. A new global variable item is added to the bottom of the list. Type the variable name and, optionally, the value. Press Enter when 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 Configuring a Remote Adapter for details. You may add definitions of any new variables you need to the existing list.
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 TIBCO Administrator documentation on modifying runtime variables.
You can also specify values for global variables when starting a process engine from 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 want to set, including the path to the variable if it is contained in a folder and value is the value you want the variable to use. For example, if you have a global variable named item1 contained in a folder named myGroup and you want 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.
Defaults to the TIBCO Designer project name. This global variable is used by TIBCO Designer to partially define the subject name for a service.
Specifies where the EMS server is located. Setting this value mostly makes sense in the early stages of a project, when only one EMS server is used.
Specifies the path name of the TIBCO Rendezvous certified messaging ledger file. The default is the root installation directory.
Specifies the path name for the log file used by the adapter. The default is the root installation directory.
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 TIBCO 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.
TIBCO Rendezvous network. This variable need only be set on computers with more than one network interface. If specified, the TIBCO Rendezvous daemon uses that network for all outbound messages.
TIBCO Rendezvous service. The Rendezvous daemon divides the network into logical partitions. Each transport communicates on a single service. A transport can communicate only on the same service with other transports.
Unless you are using a non-default TIBCO Rendezvous configuration, you should leave the default (7500).
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 rva parameters.
TCP port where the TIBCO Rendezvous agent (rva) listens for client connection requests. Defaults to 7501. See TIBCO Rendezvous Administration for details about specifying the rva parameters.
TIBCO Rendezvous daemon used in the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details on this parameter.
TIBCO Rendezvous network used by the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details on this parameter.
TIBCO Rendezvous service used by the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details on this parameter.

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