Execute Policy Workflow
Policy Designer: Execute Policy Workflow
This workflow describes the automated policy execution process. Depending on the input values and policy logic, policy execution may generate email alerts, as well as create, delete, or update records used in other Essentials workflows.
In the following workflow diagram, the blue text in a shape indicates that the corresponding description has been provided in the sections that follow the diagram.

Start
Persona: Automated Process
For policies configured for scheduled execution, the policy is executed when the schedule is due (i.e., date and time configured in a policy schedule is reached).
For policies configured for automatic execution, the policy is executed when a policy trigger occurs (i.e., a change occurs in an active policy instance input that is set to trigger the policy).
Retrieve Notification from Trigger Queue
Persona: Automated Process
When any of the following occurs, a notification is added to the policy trigger queue:
- A scheduled policy is due.
- A user requests execution by selecting Execute Now in Policy Designer or selecting a hyperlink configured to execute a policy or policy instance.
- A Essentials record is inserted, updated, or deleted. For example, a reading is added to a health indicator, or an equipment record is modified.
Add Instance to Policy Execution Queue
Persona: Automated Process
The policy trigger service processes each trigger message in turn to identify the relevant policy instances to be executed. Messages for inactive policies are ignored.
For a schedule trigger, all the active instances of the relevant policy will be executed.
For other triggers, the active policy instances that use a record that has changed, or that use a measurement location or health indicator that has a new reading, as an input that is configured to trigger the policy, will be executed.
The Policy Trigger Service sends a message for each policy instance that must be executed to the policy execution queue.
Retrieve Instance Message from Execution Queue
Persona: Automated Process
One or more Policy Execution Services monitor the policy execution queue and execute the policy instances that are added to it.
Messages are processed in the order that they were added to the execution queue. However, policy execution is a multi-thread operation and may be distributed across multiple Essentials servers. Therefore, it is possible for a given policy execution to end after another execution that was after it in the queue.
Retrieve Instance Execution Data
Persona: Automated Process
The input data needed for each instance execution is retrieved from the Essentials database or from the APM Time Series or APM Alerts service.
Execute Instance
Persona: Automated Process
Depending on the policy design, the policy instance execution may create, update, or delete records in the Essentials database, or it may send email alerts. In addition, the policy instance may be deactivated after execution to prevent generation of multiple email messages, events, or recommendations in response to a continuing asset condition.
For each instance execution, a policy execution record may be created, depending on the policy execution history log settings, and server log messages may be added (these messages are written according to the settings in the Policy Execution Service configuration settings, and their level of detail may vary).
Essentials Records
Persona: Automated Process
Policies can create, update, or delete records used in any other Essentials workflow.
Other Workflows
Persona: Various
The results from a policy execution may be used in, or trigger, any other Essentials workflow.