Expression Rule definition

Expression rules provide a way to evaluate events, data, and conditions and then run actions based on the results of the evaluation. Expression rules are created using programmatic If -Then-Else expressions, and must evaluate to a Boolean result (that is, true or false or 1 or 0) at runtime.

For example, you can create an expression rule for an Alarm trigger (message) that evaluates the severity of alarms reported by any one of the associated, included assets. If the alarm name is "alarmXYZ", and the severity for alarmXYZ is greater than 100, and the data item "machineFan" is not 1, then the Platform needs to run an action that writes a value to a data item on the related asset. You can also specify an Else portion that directs the Platform to write a different value to the data item. In this page, you can create the expressions and conditions for this rule as follows:

Trigger: Alarm

If: (Alarm.name == "alarmXYZ" && Alarm.severity>100) && (DataItem.machineFan.value != 1)

Then: SendDataItem(dataItemB, 1)

Else: SendDataItem(dataItemB, 0)

See syntax rules for expression rules for rules about formatting the information in these expressions.

Note: In addition to alarms generated by Axeda Gateway and Axeda Connector Agents, by "smart" mobile or fixed wireless assets, by a Platform rule, or by the Axeda Platform SDK, you can use faults (alarms) sent from Axeda® IDM Agents in expression rules. For example, you may want to convert the Axeda IDM Agent alarm to a different type of Platform alarm. If using an Axeda IDM Agent alarm, you need to evaluate the content of the description attribute (all four components of the IDM Agent fault are put in the description field of the Alarm when it is received at the Axeda® Enterprise Server). See also Alarm Namespace.

Expression rules are created in the Configure Expression Rule page using programmatic If-Then-Else definitions. You can use the many predefined functions and actions to create a customized set of expression rules and logic specific to your business requirements. Each rule can be saved and reused or modified and saved as a new expression rule.

Expressions are created using a combination of functions, actions, and variables, including namespaces and symbols. Triggers are assigned to Expression rules. A trigger specifies what message causes the Platform to evaluate and run the related expression rule. Refer to the syntax requirements for Expression Rules.

For information about security for expression rules, refer to Security for Objects in Axeda® Connected Product Management Applications and for information about security for these objects when Delegated Administration is enabled, refer to Security for Objects in Delegated Administration Units.

Note: In a Platform with Delegated Administration enabled, the names of expression rules may have prefixes; for details, refer to Names of Objects in DA Units.

Also note that Delegated Admin visibility restrictions and privileges are NOT fully supported for expression rules. See Supported Objects for Delegated Administration for more information.

 

Format for an Expression Rule

Supported actions, functions, and variables

How Expression Rules Work