External Variables
External variables are variables defined by a user on the machine where the TIBCO Hawk agent runs.
First, you define the variable values in a properties file on the local machine. Then you specify the variable file by using the -variable
option when starting Hawk agent. Then you can reference the external variable in a rulebase. For more information on agent startup parameters, see TIBCO Hawk Installation Configuration and Administration Guide.
After variable values are defined and the properties file is specified to the agent, you can reference external variables in a rulebase by using the following syntax:
${External.<variable-name
>}
where variable-name
is the name of an environment variable defined in the properties file. The file uses a standard Java property file format, with one line per variable defined. Each entry is a name-value pair in the following format:
<variable-name
>=<value
>
You can reference external variables in string arguments of actions and in data source method string arguments. For example, the Hawk Services sample rulebase provides a rule for sending a high-level alert. Without variable substitution, the text of the alert is generic. With variable substitution, the alert includes information specific to the generating condition.