Question

Stratosphere Technical Consulting
US
Last activity: 11 Jan 2017 14:20 EST
ClassCastException in CustomGuardrailWarning exercise
Hii. I am getting the following error at runtime when my java step is executed, as soon as I add a 13th step to an activity to test the exercise. I created my rules in Rule-Obj-Activity and then created a test activity with 12 property sets. When I add the 13th property set so that the custom guardrail warning should be triggered, and click save, I get the error.
Hii. I am getting the following error at runtime when my java step is executed, as soon as I add a 13th step to an activity to test the exercise. I created my rules in Rule-Obj-Activity and then created a test activity with 12 property sets. When I add the 13th property set so that the custom guardrail warning should be triggered, and click save, I get the error.
This is the java which was taken from solution walkthrough modfied slightly for my difference in message rule name
// get add to property
ClipboardProperty addToProperty = myStepPage.getProperty(".pyAutoHtml");
// set message parameters
HashStringMap parameters = new HashStringMap();
parameters.put("NumberOfSteps", NumberOfSteps);
// add guardrail warning to activity
pega_wb_default.pxAddGuardrailMessage(addToProperty, "NumofStepsGuardrailWarn", parameters);