Expression Rule Triggers

An event is always required to cause an Expression Rule to evaluate its condition. This is called the trigger.

When the rule looks at dataitems, the trigger will be "Data". There are many triggers that rules can evaluate on. When a trigger type is selected in the Expression Rule editor, the list of variables changes because only some variables make sense for that trigger type. For example, an Alarm trigger means the rule has an alarm in context - the alarm that triggered the rule is accessible using the variables like Alarm.name.

Triggers:

  • Alarm - an alarm is created
  • AlarmExtendedDataChange - an alarm's extended data changes
  • AlarmSeverityChange - an Alarm's severity has changed
  • AlarmStateChange - an Alarm's state changed, such as alarm Acknowledged or Escalated
  • AssetTimer - a timer fired, and this rule runs in the context of every associated asset
  • Data - dataitems have changed for an asset
  • Event - an event is created
  • File - a file has been uploaded
  • MobileLocation - a new GPS location has been reported
  • Registration - an asset has registered (the agent started)
  • StateChange - a state machine has changed state
  • SystemTimer - a timer fired, and this rule runs in a system context (just once, not for every asset)

For example, an Agent sends some data. This triggers any "Data" rules which look at dataitems. One of these rules may create an alarm. The alarm creation event is run back through any "Alarm" rules which may do something based on the alarm. If the "Data" rule had created another dataitem, that would similarly be routed back through the "Data" rules that may apply to it.

If you make a "Data" rule, the If expression must include the name(s) of dataitems that cause the rule to run. So if Temperature and Pressure are reported, a rule with

If: Temperature > 80
Then: ...

would run because it depends on a variable that just changed. On the other hand, a rule like

If: CPU > 50

would not run until a new value of CPU is sent.

Keywords: