When I try to compile/activate our rules, why do I get an 'integrity' error?
When I try to compile or activate my rulebase, I receive the following error:
Rulebase Compile Error
Database Referential Integrity Error (in hier_menus table)
To resolve this, edit each of the rules listed and review the product or category selections of the condition noted in the integrity error. If no changes are necessary, simply Save the rule. This will update the products/categories referenced in that first condition at the database level. This will also clear it from the integrity check when compiling the rules. Once they have all be edited and saved, you will then be able to compile and activate without any alerts.
If this error is presented for your upgrade site, make sure to also compile and activate the rulebase for your production site as this error could be observed on your production site after the upgraded cutover.
When a “Referential Integrity” error is received, this generally means a value is being referenced within a rule that does not exist at the database level. The ‘Database Table’ column will help identify the type of value. The ‘Rule Sequence’ column will show which condition or action within the rule has the incorrect reference.
In the example above, if the table referenced is the hier_menus, this table holds product and category information. In this case, it is likely a product value, sub-product, category or sub-category has been deleted since the last time business rules were activated. At the time such a change was made, there is no alert from the product/category editor to tell you that some rules may be affected. Instead, you receive the integrity check the next time the rules are compiled/activated.
Please note, an integrity error can also occur if other data points are removed such as dispositions or staff accounts.
For incident queues and incident statuses, an alert will appear at the time the value is deleted if there are any conflicts within the rules. Those conflicts must be resolved, and the rulebase activated, prior to the value being deleted.