Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 9 Advanced Topics : Using Substitution Variables

Using Substitution Variables
The variable substitution mechanism can override substitution variables predefined in the project in a restricted manner. Predefined variables can be viewed and set in TIBCO Business Studio. 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.
Variable Specification
The adapter service engine can specify variables in the project during configuration using TIBCO Business Studio. It can also specify variables in a properties file. The properties file values overwrite values set in the project.
Specifying Substitution Variables Using TIBCO Business Studio
Substitution variables provide an easy way to set defaults for use throughout your project.
For example, you could assign the value 7600 to the predefined substitution variable RvaPort. And then use the variable in different sessions in the adapter service engine. To change the TIBCO Rendezvous daemon for the adapter service engine, globally set it to a different value or override it from the command line.
To use substitution variables in your project:
1.
In the Project Explorer, expand defaultVars, double-click defaultVars.substvar.
2.
You can do the following:
To assign or change a variable value, select the variable from the Defined Substitution Variables section, then go to the Details section, enter the new value in the Value field.
To add a substitution variable, click Add in the Defined Substitution Variables section. A new substitution variable entry is added to the bottom of the list. Enter the variable name, type, and, optionally, the value and description.
Figure 37 Substitution Variables
3.
To use the substitution variable in the fields of a resource, enter the variable name enclosed with %% on both sides or pick a substitution variable from the Binding Editor.
When the project is deployed and the configured components are run, all occurrences of the substitution variable name are replaced with the substitution variable value (unless it was overridden in a way that had higher precedence). For example, RvService would be replaced with 7500.
Changing Substitution Variables at Runtime
At runtime, you can update the values of the substitution variables using TIBCO ActiveMatrix Administrator.
The following figure shows the Substitution Variables editor in TIBCO ActiveMatrix Administrator, where you can specify runtime values for substitution variables
Figure 38 Substitution Variables in TIBCO ActiveMatrix Administrator
A number of substitution variables are predefined. See Predefined Substitution Variables for information. You can add definitions of any variables you need to the predefined variables.
Predefined Substitution Variables
Table 23 lists and explains the predefined substitution variables. Some of them are automatically used within the system when an adapter instance is configured.
Used by the system when defining the path name of the TIBCO Rendezvous certified messaging ledger file. The default is root installation directory.
The default value is Domain. This value can be any string value. This 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 "tcp: 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 TIBCO Rendezvous network parameter. Every network transport communicates with other transports over a single network interface. On computers with more than one network interface, the network parameter instructs the TIBCO Rendezvous daemon to use a particular network for all outbound messages from this transport. See TIBCO Rendezvous Concepts for details about specifying the network parameter.
Used by the system to identify the TIBCO Rendezvous service parameter. The Rendezvous daemon divides the network into logical partitions. Each transport communicates on a single service; a transport can communicate only with other transports on the same service. The default value is 7500.You can change the default value depending on your service requirement. See TIBCO Rendezvous Concepts for details about specifying the service 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 Rendezvous agent TCP port where the agent listens for client connection requests. 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.
Used at design-time to identify the name of the .nsf file to connect to. If the .nsf file resides in the local file system, specify the entire path in order to access the database.
Used at the design-time to identify the password associated with the username that is used to log on to Lotus Notes.
Used at the design-time to identify the username used to log on to Lotus Notes.

Copyright © TIBCO Software Inc. All Rights Reserved