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 APM workflows.
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 APM record is inserted, updated, or deleted. For example, a reading is added to a health indicator, or an equipment record is modified.
- A reading is added to a process historian (OT Source Tag) that is associated with one or more policy instances through a Content Map record.
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, health indicator, OT Connect Tag, GE Tag, or AMS Asset that has a new reading or event, 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 APM 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 APM database or from the OT Connect service.
Execute Instance
Persona: Automated Process
Depending on the policy design, the policy instance execution may create, update, or delete records in the APM 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).
APM Records
Persona: Automated Process
Policies can create, update, or delete records used in any other APM workflow.
Other Workflows
Persona: Various
The results from a policy execution may be used in, or trigger, any other APM workflow.