In hawkagent.cfg , I made an entry for the variable file like below …
# Identifies a file containing variable definitions. The format of the file
# is that used by the standard Java class java.util.Properties. Ther is one
# line per variable where each line has the format
my file is present in above location. I checked entry in window registry and it is same as “C:/tibco/hawk/variablefile/variable.txt “
Able to invoke RulebaseEngine:getExternalVariables() and get the external variable ENVIRONMENT with the value TEST. (see attached getExternalVariables.png)
After you use the Hawk Configuration UI (see attached hawkconfig.png) to set the variables file parameter, it will prompt you to restart the Hawk Agent Windows Service to have the variables file value take effect. You will also see that the corresponding Windows registry entry is updated with the same value (see attached regedit.png).
Make sure you are invoking the method from the rulebase microagent on the Hawk Agent that you had applied the changes to.
Also note that the Hawk Agent Windows Service does not pick up the changes from the hawkagent.cfg file by default. If you want to apply the changes in hawkagent.cfg file, you must configure using the Hawk Configuration UI to specify hawkagent.cfg under the General Tab->Hawk Advanced Configuration. (see attached hawkadvconfig.png)
For training on TIBCO HAWK mail us at email@example.com