Policy Execution

About Family Policy Execution

When records in the Predix Essentials database are created, modified, or deleted, any family policies configured for the corresponding family and trigger will be executed automatically. For example, if an After Insert family policy is configured for the Reading family, the policy will be executed after a Reading record is added to the database.

When a policy is executed, the logic in the policy model is evaluated and any resulting actions are taken. Each time a family policy is executed, the results of the execution are recorded in the execution log, which you can view on the Execution History pane in the Policy Design page.

A change to a record in the Predix Essentials database will trigger the appropriate family policy regardless of the current user's permissions. However, if the user does not have permissions for an action a policy is taking, the policy will not execute, the transaction will be rolled back, and no changes will be made. Similarly, the transaction will be rolled back if an error occurs during policy execution.

Configure Family Policy Execution History Log Setting

About This Task

You can configure the policy to determine when execution history log records will be created.

Important: The Family Policy execution history records can significantly impact the size of the Predix Essentials database. To minimize the impact, you can select either the Errors Only or Summary Only option.

Procedure

  1. Access the Family Policy for which you want to configure the execution history log setting.
  2. In the Details workspace, in the Execution History Log Setting section, select one of the following options.
    OptionDescription
    NormalCreates an execution history record for every execution of the policy. This option is selected by default for new policies.
    Errors OnlyCreates an execution history record only for the executions of the policy that result in an error. This option can be used to reduce the number of execution history records being added to the Predix Essentials database, thus reducing the load on the database server.
    Note:

    If you select the Errors Only option, you can only review the execution results in the design canvas for policy executions that result in errors.

    Summary OnlyCreates an execution history record for every execution of the policy and saves only the summary of the execution in the record. You can use this option to reduce the file size of the execution history records being added to the Predix Essentials database.
    Note: If you select Summary Only in the Execution History Log Setting section and the policy execution resulted in an error, the node execution details are also saved along with the summary.
    For policies which include Sub Policy nodes, execution history logs are created as follows:
    • If the Execution History Log Setting is Normal for a calling policy, and Errors Only for the sub policy, an execution history record is created for every execution of the calling policy. The Sub Policy node in the execution history records displays execution details only for the executions of the sub policy, which resulted in an error.
    • If the Execution History Log Setting is Errors Only for a calling policy, and Normal for the sub policy, an execution history record is created only for the executions of the calling policy, which resulted in an error. The Sub Policy node In the execution history records displays the execution details for every execution of the sub policy, regardless of whether the sub policy execution resulted in an error.
    • If the Execution History Log Setting is Errors Only for both calling policy and sub policy, an execution history record is created only for the executions of the calling policy, which resulted in an error. The Sub Policy node in the execution history record displays execution details only for the executions of the sub policy, which resulted in an error.
    • If the Execution History Log Setting is Summary Only for a calling policy, and Errors Only for the sub policy, an execution history record that contains the summary of the execution is created for every execution of the calling policy. The Sub Policy node in the execution history records displays the node execution details also when the sub policy execution resulted in an error.
  3. On the toolbar, select

    The policy is saved. The execution history log setting is applied to subsequent policy executions.

Access Execution History in Family Policies

Procedure

  1. Access the policy for which you want to view the execution history.
  2. In the Design workspace, select the Execution History tab.

    The Execution History pane appears, displaying a summary of past executions.



  3. Select an execution summary to view additional details on the policy canvas.

    On the policy canvas, the nodes in the model are color-coded to indicate the results of the execution.

    Note:
    • If changes have been made to the policy model since the selected execution occurred, you will not be able to view the details of that execution on the canvas.
    • You can use the Actions and Errors and Warnings check boxes to display only the executions that resulted in actions or only the executions that resulted in errors and warnings.
    • Execution history records are retained for the duration specified in the Policy Admin page.
  4. In the policy model, select a node to view additional details about the specific node's execution.
    Note: You can now check the Execution Duration for each node in a policy. If you select each node of a policy in the Validation mode or in the Execution history entry record, the Node Execution Details display the Execution duration.