Expression Rules that violate execution policies

If a rule runs for too long or runs too frequently, the Platform may disable it from running again or terminate it before it can adversely affect Platform performance. The Platform monitors executing rules, tracking when a rule starts and ends, how often it runs within a specified timeframe, how long a single rule takes to complete, how long all events spawned from a single rule take to complete, and so on. The Platform administrator has defined acceptable values for each of the rule metrics which, as a whole, define the rule execution policy for the Platform.

Consider an execution policy defining that no more than 5000 rules should run within a 2 minute period. If that threshold (5000) is met, the Platform determines which rule ran most frequently within that period of time and disables it. In the example below, the threshold, set at 5000, was crossed and reached an actual value of 6000 before the Platform disabled the biggest policy offender, a rule that executed 500 times with the monitored time period.

image\expressionrule_disabled_sniper.gif

If the Platform disables a rule, it will show it as disabled in the View and manage expression rules page (as above). You can mouse over the violation icon to see a tooltip explaining why it was disabled and the circumstances that led the Platform to disable it. The Platform will create an Audit log message for display in the Asset dashboard of the related asset and in the Administration application. In addition, the Platform sends two notifications: one to the Platform administrator and one to the user who last modified the rule.

If the problem expression rule is configured for a state within a state machine, this icon appears in the Enabled column for the state machine in the View and manage state machines page and in the States pane in the Configure the state machine page.

Enabling disabled rules

When a rule is disabled, it will not run automatically (that is, based on its configuration). For example, if the rule is defined to run when the Platform receives an Alarm message, it will not run until it is re-enabled. Before you re-enable the rule, you should review the rule and fix the behavior(s) that caused the Platform to disable it in the first place. To edit the rule, select the violation icon for that rule: the Configure the expression rule page appears.

Creating efficient and effective rules

The notification sent when the Platform disables a rule provides guidelines for making corrections to your rules. Review those actions to determine if one or more of them may help you resolve the issues with the disabled rule, as well as help you design other rules that run effectively and efficiently.

For a complete reference on developing efficient rules and custom objects, see the Axeda Rules Development Guidelines (PDF).

Note: The Platform administrator has the ability to collect system metrics and statistics and to monitor message and rule activities and traffic. The administrator can tune the Platform to handle varying message traffic and the load put on the Platform from rule execution.