Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Checked out records displaying incorrect rules

SA-11961

Summary



The checked out records from the Private explorer are not displaying correctly. Some of the rules that were discarded or deleted still show up in the list of checked out rules. The count of the rules in a branch ruleset also shows incorrectly.

Error Messages



Not Applicable

Steps to Reproduce



Click the Private link in Designer Studio to view the list of checked out records.

Root Cause



The root cause of this problem is a defect/misconfiguration in the operating environment. The database triggers associated with the pr4_rule_vw table were missing. Rules that were checked back in or had the checkout discarded without the triggers running will require manual updates to the pr4_rule_vw table to remove the invalid records.  

Resolution



This issue is resolved by making the following changes to the operating environment

1. Use the generateddl script from the installation media to generate and create the missing database triggers.

2. Replace the trpr4_rf_upd and trpr4_rfb_upd triggers with updated versions that will insert the record if not already present.

3. Run update statements so the database triggers will execute and update the pr4_rule_vw table.
        update pr4_base set pzInsKey = pzInsKey;
        update pr4_rule set pzInsKey = pzInsKey;
        update pr4_rule_ruleset set pzInsKey = pzInsKey;
        update pr4_fieldvalue set pzInsKey = pzInsKey;
        update pr4_rule_file set pzInsKey = pzInsKey;
        update pr4_rule_flow set pzInsKey = pzInsKey;
        update pr4_rule_property set pzInsKey = pzInsKey;
        update pr4_rule_autotest set pzInsKey = pzInsKey;
        update pr4_rule_shortcut set pzInsKey = pzInsKey;
        update pr4_rule_declarepages set pzInsKey = pzInsKey;
        update pr4_rule_file_binary set pzInsKey = pzInsKey;
        update pr4_rule_requirement set pzInsKey = pzInsKey;
        update pr4_rule_usecase set pzInsKey = pzInsKey;


4. Run this query to check for discrepancies and delete those records that are no longer needed.

        SELECT * 
        FROM pr4_rule_vw 
        WHERE pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_base)
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_ruleset)
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_fieldvalue)
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_file) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_flow) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_property) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_autotest) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_shortcut) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_declarepages) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_file_binary) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_requirement) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_usecase) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_message) 
        AND pzinskey NOT IN 
        (SELECT pzinskey FROM pr4_rule_sysgen) 
        ;
Suggest Edit

Published July 9, 2015 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us