Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 6 Configuring 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.
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 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 make them settable later.
Predefine a variable using TIBCO Designer, then override the value for individual services (for example, publication service or 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 make them settable 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 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. 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 leftmost icon. Specify the name of the group, then press Enter. With the group icon selected, you can click the abc icon to add variables to the group.
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
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 the system to partially define the subject name defined for a service.
Specifies the path name of the TIBCO Rendezvous certified messaging ledger file. 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.
Tells applications where the JMS daemon is located. Setting this value mostly makes sense in early stages of a project, when only one JMS daemon is 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.
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.
The flags that indicate client-specific notification mechanism and the mode of system access. The valid values are 1,2, 4, 8, 10, 20, 40 and 47.
When the adapter is used as a workstation client, the value for this variable should be set to null, which is the default. When the adapter is used as a native client, specify a valid Tuxedo group name for this variable.
This parameter determines how often the Request-Response service polls Tuxedo in an asynchronous mode for the outstanding invocations. The default setting is 2000 milliseconds.
This parameter determines how often the Request-Response service polls for a reply from Tuxedo in an asynchronous mode. The default value is 1000 milliseconds.
This parameter determines how often the Event-based Publication service polls for a connection between the adapter and the Tuxedo server. The default value is 3000 milliseconds.

Copyright © TIBCO Software Inc. All Rights Reserved