EL Usage in Objects Rules and Queries

Using EL for Defining Key and Label

Each group, resource, and process type must have a Key and Label defined to uniquely differentiate instances of each type. While most of the time a unique field within the type is designated as the Key or Label, sometimes it is necessary to make a Key or Label that consists of more than one field. Each type gives the option of defining a Key and Label using EL. For defining a Label using EL you may write something like this: ${car_model} - ${car_engine} instead of choosing "Label" checkbox on any field.

Rule Engine and Queries

Within the rule engine, you can use EL for getting access to any rule variables, from forms or device messages that trigger a rule, or any resource, group, or process found within the rule. Additionally, within a business rule the Set Variable action allows you to save the result of almost any function into a local or global variable. For example:

Define a local variable named "noaa" this way: ${nx:noaa_observation(s.s_location)}. The "noaa" variable is now an object, and you can get access to all its fields using EL. For example: ${_local.noaa.pressureIn}. Note that for getting access to a local or global variable, you have to write the prefix "_local" or "_global" (respectively) before the variable name. Similarly, when creating a query on the report builder, you can use EL to gain access to any field of the selected targets. Once you gain access to a variable using EL, you can then use any function or standard operator to operate upon that variable and create more complex values.