In this new post we are going to learn how to get the value of a global variable item which has a ‘password’ type. As you should know, the global variables in TIBCO allow you to define values which can be modified via TIBCO Administrator so we can use this to define enviroment variables and so on.
When you specify a new global variable you must select the type of this variable, and you can choose between: String, Integer, Boolean, Password. The main problem is that when you specify a global variable of type password, this variable is not present in the $_globalvariable root element, so you cannot use the element in your mapper activities.
So, if you want to get the value, you must to access through a Java Code activity. Via a Java Code activity you can access to the value of the variable, vía the following sentence:
myVar = com.tibco.pe.plugin.PluginProperties.getProperty(“tibco.clientVar.myVar”);
With this snippet you can extract the value of the variable, and put it as an output value of the activity.
As always you can download the project clicking here: Download!
I hope you can use these information in your new developments! See you in the next post!