Policy Designer Upgrade
Upgrade or Update Policy Designer to V5.0.6.0.0
Upgrading or updating to the V5.0.6.0.0 is a two-step process. You need to first upgrade to APM V4.6.2.0.0 or later and then follow the steps to upgrade or update to V5.0.6.0.0.
Upgrade from | Upgrade to | Procedure |
---|---|---|
V5.0.0.0.0 through V5.0.5.0.0 | V5.0.6.0.0 | Upgrade from any version V5.0.0.0.0 through V5.0.5.0.0 |
V4.6.2.0.0 through V4.6.10.0.0 | V5.0.6.0.0 | Upgrade from any version V4.6.2.0.0 through V4.6.10.0.0 |
Upgrade from any version V5.0.0.0.0 through V5.0.5.0.0
This module will be upgraded to V5.0.6.0.0 automatically when you upgrade the components in the basic APM system architecture. No additional steps are required.
Upgrade from any version V4.6.2.0.0 through V4.6.10.0.0
The following tables outline the steps that you must complete to upgrade this module to V5.0.6.0.0. These instructions assume that you have completed the steps for upgrading the basic APM system architecture.
These tasks may be completed by multiple people in your organization. We recommend, however, that the tasks be completed in the order in which they are listed.
Step | Task | Notes |
---|---|---|
1 | Configure the time limit for the Policy Execution Service. | This step is optional. You can perform this step if you want to modify the policy execution time limit for the Policy Execution Service. By default, the policy execution time limit is 15 minutes per policy instance. |
2 | Configure the time limit for the execution of the Math node. | This step is optional. You can perform this step if you want to modify the Math node execution time limit for the Policy Execution Service. By default, the Math node execution time limit is 5 minutes. |
3 | Configure the SubPolicy Node for Policy Execution | This step is optional. |
4 | Configure the alternative query for the Policy Designer Overview page. | This step is optional. You can perform this step if you are facing performance issues with the Policy Designer Overview page. |
5 | Configure the settings for the Policy Execution Service. | This step is optional. You can perform this step if you want to modify the default retries, concurrency, or duplicate trigger timeout settings. |
6 | On the APM Server, stop and restart the Meridium Policy Execution service. |
This step is required. If your system architecture contains more than one APM Server, you must complete this step for every server that you want to use for policy execution. You can review the log files for this service at C:\ProgramData\Meridium\Logs. |
7 | Configure the settings for the Policy Trigger Service. | This step is optional. You can perform this step if you want to modify the default retries or concurrency settings. |
8 | On the APM Server, stop and restart the Meridium Policy Trigger service. |
This step is required. If your system architecture contains more than one APM Server, you must start the Policy Trigger Service on at least one APM Server. You can review the log files for this service at C:\ProgramData\Meridium\Logs. |
9 | On the APM Server, reset IIS. | This step is required only if you have modified the time out value for the Math node execution or Policy Execution in the appSettings.json configuration file. |
10 | Review and upgrade the following items: | This step is required. For more information, refer to About Upgrading Policy Designer and Family Policies. |
About the Asset Health Services
When you deploy the Asset Health Manager, OT Connect, and Policy Designer modules together, the services used by each module interact with each other in various ways. This topic summarizes those services and describes a standard system architecture containing the components used by all three modules.
Services Summary
The following services are used by the Asset Health Manager, OT Connect, and Policy Designer modules:
-
Asset Health Indicator Service: Automatically updates the following field values in a Health Indicator record when reading values related to the health indicator source record (for example, an OT Source Tag or Measurement Location record) change:
- Alert Level
- Last Reading Date
- Last Char Reading Value (for records that accept character values)
- Last Numeric Reading Value (for records that accept numeric values)
This service also facilitates the automatic creation of Health Indicator records for configured sources.
- Policy Trigger Service: When an input to a policy (that is, an associated record in the APM database or reading value in the process historian) changes, when a policy schedule is due, or a user submits an Execute Now request, a message is added to the policy trigger queue. The Policy Trigger Service monitors the trigger queue. When it receives a message, it determines which policy instances should be executed for the message, and then it sends corresponding messages to the policy execution queue. Even if your APM system is configured with multiple Policy Execution servers, only one policy execution queue is used.
- Policy Execution Service: The Policy Execution Service handles the execution of policies. Specifically, the Policy Execution Service monitors the policy execution queue and executes the policy instances that are added to it. If the APM system is configured with multiple Policy Execution servers, when each Policy Execution Service completes the execution of a policy instance, it will execute the next instance from the shared policy execution queue. In this way, the policy execution load is automatically balanced across all available Policy Execution Services.
- OT Connect Service: Monitors the subscribed tags (that is, tags that are used in policies and health indicators) and when data changes occur on these tags adds messages to the appropriate queues. This service also facilitates the automatic import and synchronization of tags from a configured OT Source. For more information, refer to the OT Connect section of the documentation.
Standard System Architecture Configuration
The following diagram illustrates the machines in the APM system architecture when the Policy Designer, OT Connect, and Asset Health Manager (AHM) modules are used together. This image depicts the standard configuration, where the OPC Server software and the OT Connect Adapter Service are on the same machine.
The following table summarizes the machines illustrated in this diagram and the software and services that you will install when you complete the first-time deployment steps for Asset Health Manager, OT Connect, and Policy Designer.
Machine | Software Installed | Service Installed with APM Software |
---|---|---|
APM Server | APM Server software | Asset Health Indicator Service |
Policy Trigger Service | ||
Policy Execution Service | ||
OT Connect Conductor Service | ||
OPC Server | GE Vernova OT Connect Adapter software | OT Connect Adapter Service |
OPC Server software | N/A | |
Process Historian | Process historian software | N/A |
About Policy Execution
Policy designers can configure a policy to be executed on a schedule or automatically when records or reading values associated with the policy are updated. Policies may also be executed on demand. This topic describes the ways that the items configured in the first-time deployment workflow facilitate each type of policy execution.
Automatic Execution
When any record or reading value is updated by the APM Server, or when a reading value for a tag associated with one or more policies is updated on the process historian, a message is added to the policy trigger queue. The Policy Trigger Service monitors the trigger queue. When it receives a message, it determines which policy instances should be executed for the message, if any. Only active policy instances associated with the record or reading update will be executed. The Policy Trigger Service then sends corresponding messages to the policy execution queue for each relevant policy instance. Finally, a Policy Execution Service executes each policy instance that was added to the policy execution queue in turn.
Scheduled Execution
When a scheduled policy is due, a scheduled job adds a message to the policy trigger queue. The Policy Trigger Service monitors the trigger queue and sends messages to the policy execution queue for each active instance of the policy. Finally, a Policy Execution Service executes each active instance that was added to the policy execution queue in turn.
On Demand Execution
When you request a policy or policy instance execution from the Policy Designer user interface, or select a hyperlink configured to execute a policy or policy instance, a message is added to the policy trigger queue. The Policy Trigger Service monitors the trigger queue and sends messages to the policy execution queue for each active instance of the policy. Finally, a Policy Execution Service executes each active instance that was added to the policy execution queue in turn.
Configure Queue Settings for Policy Execution Service
About This Task
- Retries
- Redelivery attempts and interval
- Concurrency limit
Increasing the concurrency limit allows the policy execution service to process more messages in parallel, resulting in higher throughput of policy executions, provided that the system has available resources. Reducing the concurrency limit reduces the policy execution throughput and the system resources used by policy execution. APM recommends that the concurrency limit be less than or equal to the number of logical processors on the APM Server used for policy executions.
Procedure
Configure Queue Settings for Policy Trigger Service
About This Task
- Retries
- Redelivery attempts and interval
- Concurrency limit
- Duplicate Measurement Location reading trigger elimination timeout
Procedure
Configure the Time Limit for Policy Execution
About This Task
Procedure
Configure Execution Time Out Value for Math Node
About This Task
Procedure
Configure the Default Historical Readings Time Range for the OT Connect Tag node
About This Task
Procedure
Configure Alternative Query for the Policy Designer Overview Page
About This Task
Procedure
Configure Multiple APM Servers for Policy Execution
Depending on the number of policies that you need to manage in your system, you may have multiple APM Servers to process policy executions. Based on your company preference for server load balancing, you can configure these servers using global load balancing or isolated load balancing.
Regardless of the approach you use, you must fully configure each APM Server according to the steps for deploying the basic APM system architecture. In addition, each APM Server must be configured to use the same instance of Redis and ActiveMQ.
Global Load Balancing
In global load balancing, you configure all APM Servers to process policy executions in a single load-balanced cluster. In this scenario, an increase in policy execution demand can be absorbed across all servers in your system architecture.
In this scenario, you must:
- Configure and start the Policy Trigger Service on at least one APM Server.
- Configure and start the Policy Execution Service on all APM Servers.
Isolated Load Balancing
In isolated load balancing, you configure designated APM Server(s) to process policy executions. In this scenario, the policy execution processes are isolated from other APM Server processes, therefore preventing an increase in policy execution activity from negatively impacting other processes.
In this scenario, you must:
-
Configure and start the Policy Trigger service on at least one APM Server.
- Configure and start the Policy Execution Service on only the APM Servers that you want to use to process policy executions.
Configure the SubPolicy Node for Policy Execution
About This Task
If the policies contain recursive sub policies in them, the policy does not execute. If the sub policy nesting is more than 10 levels, the policy does not get executed. This topic describes how to modify the Policy Execution Service configuration to change the recursion limit for policy execution.
.Procedure
Configure Policy Reference Clean Up Batch Size
About This Task
When policies and policy instances are inserted, modified or deleted, this may result in changes to very large numbers of related records. In order to optimize the performance for the end user, the related record clean-up is completed in batches by a background task. You can configure the batch size and the frequency for this task. The batch size must be less than 1000 in order to avoid database table locks.
Procedure
About Upgrading Policy Designer and Family Policies
This topic provides some of the significant changes in Policy Designer and Family Policies modules in the current version, along with the impact and action items for each change.
- Deprecation of the MI_ENTITIES table: The number of references to the MI_ENTITIES table in the product cause the table and the number of joins to that table grow very large. To enhance scalability, this dependency has been removed. As a result of this change, Delete Entity, Create Relationship, and Delete Relationship nodes require an additional Family ID or Family Key input.
The upgrade process attempts to automatically upgrade policies and family policies that use these nodes to add the required Family IDs. However, due to the complexity of the changes introduced in the current version, some of these records are not upgraded automatically (for example, policies or family policies that use queries referencing the MI_ENTITIES system table, queries that contain Union statements). In that case, errors or warnings appear, and policies and policy instances are deactivated. If that happens, you must review the upgrade logs, identify the family IDs, and then upgrade the following items:
- Deprecation of the CONTENT_GUID field: The Content GUID output has been removed from all applicable policy nodes. In the Policy Instance and Policy Event families, the Content GUID foreign key fields have been replaced with the entity key foreign key fields. Therefore, before you upgrade, you must identify the Policies, Family Policies, and queries that reference Content GUID. After the upgrade, you must verify that they work as expected.
In addition, the Policy has Policy Instance relationship family has been created to relate the Policy and Policy Instance entity families. Similarly, the Policy Instance has Policy Event relationship family has been created to relate the Policy Instance and the Policy Event entity families.
- JSON data changes: The JSON data stored in the Instance Mappings field in Policy Instance records includes the family ID in addition to the entity key of the mapped records.
- Hyperlinks changes: Some of the hyperlinks in the execution history include the family ID in addition to the entity key of the linked records.
- Scheduler changes: The new Scheduler upgrade utility creates scheduled jobs for active scheduled policies. You may be required to recreate schedules for policies that were deactivated during the upgrade.
Limitations:
If you import Policies or Family Policies from a previous version, and if they use a Create Relationship, Delete Relationship, or Delete Entity node, you may have to modify the policy model. For instructions, refer to Upgrade Relationship Nodes and Upgrade Delete Entity Nodes.
Similarly, if the Policies or Family Policies that you import use query nodes, you may have to modify the policy model. For instructions, refer to Upgrade Query Nodes.
Access Upgrade Logs
About This Task
However, due to the complexity of the changes introduced in the current version, some of these records are not upgraded automatically (for example, policies or family policies that use queries referencing the MI_ENTITIES system table, queries that contain union statements). In that case, errors or warnings appear, and policies and policy instances are deactivated. If that happens, you must review the upgrade logs to identify the required changes and then manually modify the policy models and queries.
These upgrade logs appear in a new field, Upgrade Log, in the Policy and Family Policy records. This field contains information on the upgrade steps that you have performed, including any errors or warnings.
This topic describes how to access these upgrade logs.
Procedure
What To Do Next
- Resolve any errors in the upgrade logs by modifying the policy model.
- As needed, update queries referenced by the policy.
- Reactivate each Policy.
About Identifying Family IDs
- If an entity key input to the node is sourced from an input node (for example, an entity node or a Health Indicator node), the family ID is normally identified, and the upgrade will happen automatically, except in the following cases:
- The entity key input is sourced from an entity node where the family is not configured.
- The entity key input is sourced from a Point Value node, where the entity key is defined in a policy instance.
- The family referenced by the node does not exist.
- The family referenced by the node is not licensed in the APM database.
- If an entity key input to the node is sourced from a query node, the upgrade process attempts to identify the family ID based on the query definition. This process considers entity key fields (that is, <family ID>.ENTY_KEY) as well as other system fields that contain entity keys of related records, including predecessor and successor key fields for relationships, created or updated by user key fields, site key fields, and so on. This process attempts to ascertain the relevant family ID even if the entity key field is defined in a sub query. However, it is not possible to determine the family ID if the query contains a union (among other reasons).
For Create Relationship and Delete Relationship nodes, if the predecessor family ID cannot be determined, the upgrade process will not attempt to determine the successor family ID. If it is not possible to identify the family IDs to use in a Create Relationship, Delete Relationship, or Delete Entity node, a warning message appears in the Upgrade Log field, and the policy is deactivated. Family policies cannot be deactivated, therefore, only the warning message appears in the Upgrade Log field. You must then review these error messages and manually modify the policy models and queries. For instructions on accessing the upgrade log, refer to Access Upgrade Logs.
Upgrade Baseline Policies
About This Task
Procedure
Upgrade Create Relationship and Delete Relationship Nodes
About This Task
Procedure
Upgrade Delete Entity Nodes
About This Task
Procedure
Upgrade Create Relationship, Delete Relationship, and Delete Entity Nodes in Sub Policies
About This Task
This topic describes how to upgrade the nodes in such scenarios.
Procedure
Upgrade Policies and Queries Referencing Content GUID Fields
About This Task
- The Content GUID foreign key fields in the Policy Instance and Policy Event families have been replaced with the entity key foreign key fields.
- The Policy has Policy Instance relationship family has been created to relate the Policy and Policy Instance entity families. Similarly, the Policy Instance has Policy Event relationship family has been created to relate the Policy Instance and the Policy Event entity families.
Fields in Previous Versions | Fields in Current Version |
---|---|
[MI_PCYEVENT].[MI_PCYEVENT_POLICY_INST_GUID] | [MI_PCYEVENT].[MI_PCYEVENT_POLICY_INST_KEY] |
[MI_POLICY_INST].[MI_POLICY_INST_POLICY_GUID] | [MI_POLICY_INST].[MI_POLICY_INST_POLICY_KEY] |
[MI_POLICY_INST].CONTENT_GUID | [MI_POLICY_INST].ENTY_KEY |
[MI_POLICY].CONTENT_GUID | [MI_POLICY].ENTY_KEY |
Similarly, if the Content GUID output from a predecessor node is used in a policy node, it is replaced with the entity key output of the predecessor node. This will resolve the scenarios where the Content GUID output from an Entity or Current Entity node referencing the Policy or Policy Instance family was used to update a related Policy Instance or Policy Event record, respectively.
Procedure
- Before the upgrade, identify the Policies and Family Policies that reference Content GUID, along with queries that reference the fields used in previous versions (as listed in the preceding table).
- After the upgrade, verify that all the Policies, Family Policies, and queries work as expected. If not, modify the policy models and queries as needed.
Upgrade Query Nodes
About This Task
In addition, if a query column is referenced from a sub query, the column alias may contain extra quotation marks. During the upgrade, these extra quotation marks are removed from the column alias.
Procedure
Upgrade Policy Instances
About This Task
- n1: An entity node that references the Equipment family
- n2: A Measurement Location node
- n4: A Predix Time Series node
- n5: A Health Indicator node
- n6: A Point Value node, which can reference a different family in each Policy Instance
- n7: A User node
The following table describes the Mappings field before and after the upgrade.
Before the Upgrade | After the Upgrade |
---|---|
|
|
This topic describes how to upgrade Policy Instances if the upgrade fails.