|
This note has been made with Tibco BW 5.8, Tibco Designer 5.6 and Tibco Business Events 3.0.
Global variables can be specified in Tibco Designer or directly in the defaultVars.substvar files in the BW project. If you do the latter then note that Designer does not like automatic backup files your editor may create. Furthermore note that each global variable has a type and usually setting a description is very handy. This is the xml tag description in the file defaultVars.substvar, which comes after the tag value and before the tag deploymentSettable. If the tag deploymentSettable is true then the global variable can be modified at deployment time, in Tibco Administrator. It is recommended to uncheck this flag for as many global variables as possible. This makes the life of Tibco system administrators easier.
Global variables are exported to a deploymnent via the ear file. The ear file can be renamed to a zip file and you will find a file TIBCO.xml at the root of the zip archive. This xml file has multiple tags NameValuePairs. One of these tags has an element name with value Global Variables. The global variables are in the sub elements NameValuePair, NameValuePairsPassword, NameValuePairBoolean and NameValuePairInteger. Again the tag description comes after the tag value inside these name-value pairs. A boolean element disableConfigureAtDeployment determines if the global variable can be modified at deployment time.
I must admit I have not tested this: if a global variable can not be modified at deployment time it is possible to change its value anyway by editing the tra file that is created at each deployment. For example, if your global variable is HTTP/Port and its desired value is 10089 then add the following line to the tra file:
tibco.clientVar.HTTP/Port=10089
This works also for other tra files, such as a be-engine.tra and tra files of tibco adapters. Use the command line parameter propFile to specify a tra file with custom global variables:
be-engine --propFile C:\tibco\be\3.0\bin\be-engine-local.tra localUnitTesting.ear
Overriding global variables in Designer is extremely handy when working in a team and using a version control system. Unfortunately it is not possible to override global variables in the debugger of Designer via the tra file designer.tra or bw-engine.tra.
Instead you can override global variables by first creating a property file in the Tibco Designer installation directory, e.g. c:\tibco\designer\5.6\local-params.cfg. The format of the global variables in this file is the same as shown above. To use this file click the Tester tab in Designer, then click the start button to start testing. A new window comes up for specifying the processes to test. Click Advanced in the new window. Enter the name of your properties file here preceded by the -p option: -p local-params.cfg. Unfortunately this option won't be saved in your file .TIBCO/Designer5.prefs. Therefore you will have to specify it again each time you start Tibco Designer.
Note that on Windows OS file urls can be different from what you would expect. For me worked the following file url in c:\tibco\designer\5.6\local-params.cfg:
tibco.clientVar.Connections/JMS/JndiContextUrl=file:c:/JNDI/DEV
|