Posted: 9 May 2018 5:12 EDT Last activity: 9 May 2018 13:33 EDT
When will rule resolution algorithm pick highest version
If i created a rule in 01-01-01 and execute it Rule resolution will cache it, now later if i place it next highest version then when will rule resolution cache the highest version, is it while saving rule or executing the rule.
Saving a rule change (update, add, or delete) to one of the Rule tables in the database will fire a PegaRULES database trigger, which will then register the change in the pr_sys_updatescache table (in the same database). Each node records all their changes in this table; the types of event which are saved to this table include:
• Cache – for any changes to the rule cache (changes to the rules)
• Index – for Lucene changes • DELLC – when the lookuplist cache is deleted
• RFDEL – for any rule-file- deletes
Saving a rule change will also automatically invalidate the appropriate information in the caches on that node; however, all the other nodes in the system now have out-of-date information about that rule.
Once per minute, the pulse (which is part of the standard PegaRULES agent) on each node wakes up (independently) and queries the pr_sys_updatescache table. The query retrieves records which are “not from this node” (which this node did not create), and which have a timestamp which falls within the window of time starting with the last pulse (or system startup) and now. In this way, all of the changes originating on other nodes are selected, and the appropriate cache entries on this node are invalidated. The next time one of the rules which has been invalidated is called, it will not be found in the cache, and the updated version of the rule will be read out of the database and be eligible for caching again.