GlobalVariable :: refresh - Refresh global variable
Global variables are defined as elementary values, instances or collections. Usually, global variables can be created/allocated by calling create() or from within OSI expressions. Since global variables might be changed from different places, it may become necessary to refresh the global variable in order to get the current value.
Calling refresh() becomes necessary, when a global variable has been recreated, i.e. when a new property handle has been set for the global variable somewhere in the application (create()).
// fragment
GlobalVariable userName("UserName");
// ...
if ( !userName.isValid() )
userName.refresh();
A global variables is an odaba::Property, which may be accessed by name in the application context. When running multiple thread applications, each thread has its global variable list.
Implementation details
The function refreshes the instance selected in the property handle of the global variable. When an error had been detected, the function throws an exception. Otherwise, the function returns the global variable (calling object).