Check for custom warnings
When importing rule warnings from PRPC 6 platform to Pega 7 platform, they no longer work. Running an out-of-the-box check message to see if it resolves in CheckForCustomWarnings, the messages do not trigger.
Steps to ReproduceInsert "com.pegarules.generated.pega_wb_default.pxAddGuardrailMessage(null,"VALIDATE-NONSTREAMCLASS",null); " in a custom CheckForCustomWarnings Activity.
An issue in the custom application code. All parameters to a message rule are mandatory. In this case the parameter value is not included, as a result the activity does not save.
Follow the below steps (local-change) to fix the issue:1. Delete the CheckForCustomWarnings activity created in custom ruleset.
2. Create activity again with same name CheckForCustomWarnings.
3. Save the activity without any steps.
4. Add a java step and add code as below (provide parameters required for the message or it would fail) and save.
HashStringMap params = new HashStringMap();
com.pegarules.generated.pega_wb_default.pxAddGuardrailMessage(null,"VALIDATE-NONSTREAMCLASS",params);5. Create an instance of new rule type (for which CheckForCustomWarnings was created) and save it, you will see the custom warning.
Published January 31, 2016 - Updated October 8, 2020
Was this useful?
100% found this useful
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.