Question
BNY Mellon
US
Last activity: 17 Jul 2017 16:31 EDT
How to do effective rule revalidation?
Looking to have a consistent, modern approach to revalidating rules.
Taking off from a PDN document initially written for v5.4...
https://pdn.pega.com/system-operations/how-to-revalidate-all-rules-in-a-ruleset
the description for BulkValidateSave says "Run the validation and save the record without updating its history."
And yet the code updates the pxUpdate* properties and writes a message to history -- that seems to contradict the description.
RevalidateAndSave requires us to filter by class (why? why not all rules in a ruleset?) Reviewing the docs for RevalidateAndSave... "If an instance passes validation, the History tab is updated with your Operator ID, the current date and time, and current system in the Updated row. For rules, a history detail instance is added with your Memo and the notation Bulk Update
."
Which is, not exactly what we want. Updating the pxUpdate* properties is not ideal, since it gives the false impression that the user made a substantive change to the rule.
Looking to have a consistent, modern approach to revalidating rules.
Taking off from a PDN document initially written for v5.4...
https://pdn.pega.com/system-operations/how-to-revalidate-all-rules-in-a-ruleset
the description for BulkValidateSave says "Run the validation and save the record without updating its history."
And yet the code updates the pxUpdate* properties and writes a message to history -- that seems to contradict the description.
RevalidateAndSave requires us to filter by class (why? why not all rules in a ruleset?) Reviewing the docs for RevalidateAndSave... "If an instance passes validation, the History tab is updated with your Operator ID, the current date and time, and current system in the Updated row. For rules, a history detail instance is added with your Memo and the notation Bulk Update
."
Which is, not exactly what we want. Updating the pxUpdate* properties is not ideal, since it gives the false impression that the user made a substantive change to the rule.
It would be prudent to have fields distinct from pxUpdate* (which imply that an actual change has been made). Why not create new fields called pxValidate*
Additionally, it would be helpful to have a Validate button on a ruleform, which would simply run the validation, but not update the pxUpdate properties (and not save a record in history)
***Updated by moderator: Lochan to add Categories***
***Updated by moderator: Marissa to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems
US
Hi Jon,
In Pega 7.1.7 (may have been introduced in an earlier Pega 7 release though), there is a landing page that allows you to validate rules for your entire application or a specified ruelset. . This doesn't actually save them, it just runs validation and returns a list of rules that throw messages. My teams have found this very useful to help identify and clean up technical debt within our application.
You can get to this tool via DesignerStudio>Application>Tools>Validation.
See the Pega 7 Help topic About the Validation tool for more info. The intro paragraph from this help topic states:
Use the Validation tool to check the validity of rules in your application. This tool ensures that all rules defined in an application are valid and contain valid rule references based on a specified application context.
The Validation tool can help you improve the quality of your application and should be used regularly. It is available for both Application-Based Validation (ABV) mode and Ruleset-Based Prerequisite (RSP) mode rulesets.
BNY Mellon
US
Thanks -- there was some validation in earlier v7.x, and I did see that this got updated somewhat in v7.1.7. This is another opportunity to update the documentation (helpfeedback) to make it clear what exactly this utility does, and how best it can be used.
Pegasystems Inc.
US
Jon,
Given Jessica Haider's excellent explanation, I've added a note to the Help bug referenced in the 2nd Decision mark on Re: Designer Studios menu evolution in v7.1.7-- linking to this new discussion topic.My note for the Help bug suggests that a PDN Article might be in order.
Do you want to tag this discussion helpfeedback (your suggested tag)?
Thanks!
-Mary
Pegasystems Inc.
US
Doc BUG-203991 and related BUG-202883 and BUG-203033 (cited in the Decision marker above) are in Open state under US-100730 for EPIC-13390.
Pegasystems Inc.
IN
Hi Jessica, Good Morning!
Are the wizards Validation & Revalidate and Save identical/same?
- DesignerStudio > Application> Tools> Validation [learning: Bulk validate the accessibility of rule and its references in the application stack]
- since, each rule type from every ruleset has to be revalidated individually/manually - the new wizard validation is introduced?
- DesignerStudio > System --> Release--> Upgrade --> Validate --> Revalidate and Save [learning: post upgrade/before skimming the tool ensures the recompilation of code]
- What is the difference?
- Which tool should be used when?
- also, Can we differentiate the wizards 'Validate', 'Revalidate & Save' and 'Revalidate for references' (Use on system upgraded from releases before V5.3 only; not necessary otherwise)
- Would the tools obey in filtering PEGA rule sets (string starting with Pega*)
- for Validate tool - the ruleset type under security tab should be defined as PegaFW to filter the validation logic.
- Is there a future plan to deprecate any of these wizards?
Apologies if any of the questions above doesn't make sense.
Hi Jessica, Good Morning!
Are the wizards Validation & Revalidate and Save identical/same?
- DesignerStudio > Application> Tools> Validation [learning: Bulk validate the accessibility of rule and its references in the application stack]
- since, each rule type from every ruleset has to be revalidated individually/manually - the new wizard validation is introduced?
- DesignerStudio > System --> Release--> Upgrade --> Validate --> Revalidate and Save [learning: post upgrade/before skimming the tool ensures the recompilation of code]
- What is the difference?
- Which tool should be used when?
- also, Can we differentiate the wizards 'Validate', 'Revalidate & Save' and 'Revalidate for references' (Use on system upgraded from releases before V5.3 only; not necessary otherwise)
- Would the tools obey in filtering PEGA rule sets (string starting with Pega*)
- for Validate tool - the ruleset type under security tab should be defined as PegaFW to filter the validation logic.
- Is there a future plan to deprecate any of these wizards?
Apologies if any of the questions above doesn't make sense.
Kindly share your thoughts, Thank you!
psahukaru
Pegasystems
US
I can't provide an answer to that question. Someone with more knowledge of that area of Pega 7 can provide a better comparison of the 2 tools that you mention and what the roadmap for the tools are.
My recent experience was from the 2 scrum teams I work with running the validation tool I mentioned (Designer Studio>Application>Tools>validation) against our application. It was recommended that we run this tool after we change to application based validation.
Pegasystems Inc.
US
Hi,
For validating the validity of your rules the new feature, found via DesignerStudio > Application> Tools> Validation is the one to use. Unlike the Revalidate & Save it does NOT actually save the rule to the database and update the pxUpdateDateTime/Operator. The revalidate and save is a bigger hammer as it is actually saving rules to the database. Also from a usability perspective the Application Validation tool is done at an application level (an entire application is validated) whereas the revalidate and save tool requires you select individual rulesets and rule types. Unless you have a need to resave the rule to the database (e.g. to force indexing) I'd strongly recommend the use of the new application level validation tool (DesignerStudio > Application> Tools> Validation).
Hope that helps.
Pegasystems
US
>>> Are the wizards Validation & Revalidate and Save identical/same?
I would hope the big difference would be that validation is a read-only situation where the rule is checked for validity, whereas reval-and-save will actually save a new copy of the rule if the validation phase finds no errors.
Can someone please confirm or deny this ? Thanks. /Eric
Pegasystems Inc.
US
Eric Osman wrote:
>>> Are the wizards Validation & Revalidate and Save identical/same?
I would hope the big difference would be that validation is a read-only situation where the rule is checked for validity, whereas reval-and-save will actually save a new copy of the rule if the validation phase finds no errors.
Can someone please confirm or deny this ? Thanks. /Eric
Correct, the new validation tool ((Designer Studio>Application>Tools>validation)) does NOT cause any database activity it only runs the validation logic for each rule.
Pegasystems
US
If we go to that validation tool, which by the way I find on 7.1.9 but not on 7.1.6, and choose "help", it says:
>>> Note: When you open the rule from the results grid, it will not contain the error messages from the validation process. You can manually re-validate the rule again by clicking Save.
But clicking "Save" won't work if the rule is in a locked ruleset, and isn't one of the major features of the validation tool that it works without modifying the db, as compared with "revalidate-and-save" which updates the db ?
/Eric
Pegasystems Inc.
US
Eric Osman wrote:
If we go to that validation tool, which by the way I find on 7.1.9 but not on 7.1.6, and choose "help", it says:
>>> Note: When you open the rule from the results grid, it will not contain the error messages from the validation process. You can manually re-validate the rule again by clicking Save.
But clicking "Save" won't work if the rule is in a locked ruleset, and isn't one of the major features of the validation tool that it works without modifying the db, as compared with "revalidate-and-save" which updates the db ?
/Eric
This is just pointing out that when you open the rule from the results the error message doesn't automatically show up on the rule form. You need to click save to see error on the rule form itself (the way you always have to in the product) - this was just pointing out that fact.
Pegasystems
US
Thanks for the response, Frank. If clicking "save" for the purpose of showing the error messages will work even though the actual "save" will be prevented due to the locked ruleset, then it is certainly useful. However, if the locked ruleset prevents the error messages from being shown, then that would be an issue. /Eric
Pegasystems Inc.
US
Well you can see the error message on the results table on the actual validation tools. Once you open the rule form it behaves the way the rule form always does - only showing error messages when you click save. I think what you are requesting is a button/option on the rule form to validate an individual rule without actually saving it (so it could happen on locked rules) - is that correct?