You can check if a global variable is defined in an environment by calling theĀ isGlobalVariable(String variableName) method

If the global variable specified by the given variable name is present in the scripting environment, this method will return true. Otherwise, it returns false.

boolean isGlobalVariable(String variableName)



The following code fragment shows how to check if a global variable, e.g., GLOBAL_COUNT, is defined through ALH API.

ALH.isGlobalVariable("GLOBAL_COUNT");	// Returns true or false.