Policy Execution
About Policy Execution
- Automatic execution
- Scheduled execution
Automatic Execution
When automatic execution is configured, individual Policy instances are executed when records belonging to the Policy instance are updated. Additionally:
- For records represented by a Measurement Location, OPC Tag, or Health Indicator node, Policy execution is also triggered by changes in related Reading records.
- For AMS Asset records represented by an AMS Asset node, Policy execution is also triggered by changes in related AMS Asset Alert records.
- For GE Tag records represented by an GE Tag node, Policy execution is also triggered by changes in related GE Tag Event records.
Automatic execution works in conjunction with the selection in the Trigger check box that appears on the Properties window for all Input nodes except Query, Constant, and Point Value nodes. When the Trigger check box is:
- Selected: Changes in a record or related readings represented by the node will trigger Policy execution. The Trigger check box is selected by default.
- Cleared: Changes in a record or related readings represented by the node will not trigger Policy execution.
For example, suppose that you have a Policy that contains an Entity node that represents an Equipment record, but this particular Entity node does not influence any of the logic in the Policy model that determines if action is needed. Rather, other Entity nodes (e.g., representing Measurement Location records that are linked to the Equipment record) influence the actual logic in the Policy model. In this case, you can exclude the associated Equipment record from triggering the Policy execution by clearing the Trigger check box for that node. By doing this, only the changes in the relevant records will trigger Policy execution.
When Should Automatic Execution Be Used?
Use automatic execution when the Policy is designed to monitor one or more values that change with time and when an action is needed in response to a specific change. Consider the following examples:
- The Policy monitors readings related to an OPC Tag. When a reading value crosses a defined a threshold, the Policy creates or closes a Policy event.
- The Policy monitors the status of a Health Indicator record. When the Health Indicator enters the Alert state, the Policy sends an email to the responsible user.
Scheduled Execution
When scheduled execution is configured, all active instances that are associated with a Policy are executed according to the schedule that you define.
When Should Scheduled Execution Be Used?
Use scheduled execution when the Policy is designed to evaluate data over a period of time or when automatic execution could produce misleading results.
Consider the following examples of Policies designed to evaluate data over a period of time:
- Using the Threshold Statistics node, the Policy analyzes threshold excursions during the previous month for values related to an OPC Tag or Health Indicator.
- The Policy evaluates conformance to an asset strategy by comparing the actual count of readings added for a measurement location within the previous week to the expected count.
Consider the following example of a Policy monitoring values where automatic execution could produce misleading results:
- The Policy evaluates combined information from a Rounds Route that includes multiple
measurement locations for a single asset.
Because mobile users can enter readings in any order and could change a previously entered reading value before finalizing the Route, using automatic execution in this scenario could trigger executions where one or more readings are from an earlier Route execution or are otherwise invalid.
Instead of using automatic execution, the Policy could be scheduled to run at a similar frequency to the Route. For example, if the Route is completed during the morning shift on every weekday, the Policy could be scheduled to execute after the end of the shift. The Policy could check whether new Readings have been added for all the required inputs before proceeding with the evaluation of the results.
Considerations for Scheduled Policies
You can take steps to prevent delays in Policy execution by considering the number of Policies you are scheduling and the number of instances associated with each.
When scheduling multiple Policies, you can configure the Policy schedules at different times so that the executions are staggered throughout the day.
All active instances of a scheduled Policy are submitted for execution at the same time. Therefore, when scheduling a Policy with a large number of instances, you can stagger the executions by creating multiple copies of the Policy, each with a subset of the instances. You can then schedule each of the Policies to be executed at a different time. This approach may be especially advantageous when users are located in multiple time zones, as you could configure relevant Policy instances to be executed outside of normal business hours such that results are available in different locations as needed.
About Active Policies and Policy Instances
When a policy is active, it means that the active policy instances that are associated with the policy will be executed according to the policy's defined execution settings.
Consider a policy with two instances, where one instance is active and one instance is inactive.
- If the policy is active, the active policy instance will be executed according to the policy's execution settings.
- If the policy is inactive, neither policy instance will be executed.
Configure Scheduled Execution
Before You Begin
- Run the validation process to confirm that the policy logic is working correctly.
- Verify that the correct time zone is specified for the policy.
About This Task
Procedure
Results
- When the policy is active, the active policy instances that are associated with the policy will be executed based on the defined schedule.
What To Do Next
Configure Automatic Execution
Before You Begin
- Run the validation process to confirm that the policy logic is working correctly.
About This Task
Procedure
Results
- When the policy is active, the active policy instances associated with the policy will be executed automatically when the specified records or related reading values are updated.
What To Do Next
Activate or Deactivate a Policy
Before You Begin
- Run the validation process in order to confirm that the policy logic is working correctly.
- Configure the execution settings for the policy.
Procedure
Results
- If you activated the policy, the active policy instances that are associated with the policy will be executed according to the policy's execution settings.
- If you deactivated the policy, none of the policy instances that are associated with the policy will be executed.