Accessing ActiveMatrix BusinessWorks Global Variables and Java System Properties
You can use the com.tibco.pe.plugin.PluginProperties.getProperty()
method to retrieve any Java system property or global variables defined in your project.
Global variables are contained in Java System properties that are prefixed with tibco.clientVar
. For example, if you define a global variable named myVar
, you can access the value of the global variable with the following Java code:
String var1 =
com.tibco.pe.plugin.PluginProperties.getProperty(
"tibco.clientVar.myVar");
You must specify the full path for global variables contained in variable groups to access the variable’s value. Use the slash character (/) to separate each element in the path. For example, if you have a global variable named item1
contained in a group named myGroup
, you can access the value of the global variable with the following Java code:
String var1 =
com.tibco.pe.plugin.PluginProperties.getProperty(
"tibco.clientVar.myGroup/item1");
Any Java System property can also be accessed with the PluginsProperties.getProperty()
method. Supply a string containing the property name as the input parameter to the method to obtain the property’s value.
com.tibco.pe.plugin.PluginProperties
class is contained in the lib/engine.jar
file within the ActiveMatrix BusinessWorks installation directory. This directory is in the ActiveMatrix BusinessWorks classpath, and therefore Java Code activities can compile code referencing this class. If you compile your code outside of ActiveMatrix BusinessWorks, you must ensure your development environment has access to theengine.jar
file.