Question
Skandiabanken
SE
Last activity: 15 May 2017 7:38 EDT
java.lang.ClassCastException:
Getting ClassCastException in logs from getMessageAll function .
java.lang.ClassCastException: com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl cannot be cast to com.pega.pegarules.pub.clipboard.ClipboardPage
; at com.pegarules.generated.getMessagesAll_071017_mhCGdeI9xn0snJ8HP8zsjA.invoke(getMessagesAll_071017_mhCGdeI9xn0snJ8HP8zsjA.java:85);
Function is configured as @Default.getMessagesAll(Top.TempItem) , TempItem is page property under pyWorkPage .
Looks like it's not accepting the page properties .why it's not accepting the page property ?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Skandiabanken
SE
It worked if i put a new step before page-set-message and define the step page as TOP.TempItem ,the function as @(Pega-RULES:Default).getMessagesAll(myStepPage) ,the result of the function is set to parameter and parameter is used for page-set-messages.
Pegasystems Inc.
IN
Just mention the page name as below.
@getMessagesAll(TempItem). No need to mention like "Top.TempItem".
-Srinivas
Skandiabanken
SE
Hi Srinivas,
TempItem page is under pyWorkPage but the activity where the function is being called is executing in data class context .
Pegasystems Inc.
IN
Hi
Can you please give us the test case which is resulting this in the log ?
Pegasystems Inc.
IN
please try @(Pega-RULES:Default).getMessagesAll(@(Pega-RULES:Property).getPageValue(Primary.<PROPERTYNAME>))
Skandiabanken
SE
Hi Phani,
After execution of validate rule, the errors lies on PageProperty under work page and the page conext of the activity is one of the data class record.
Empower Retirement
IN
This is very simple and good approach to find the Page Name and pass it to the function.
Accepted Solution
Skandiabanken
SE
It worked if i put a new step before page-set-message and define the step page as TOP.TempItem ,the function as @(Pega-RULES:Default).getMessagesAll(myStepPage) ,the result of the function is set to parameter and parameter is used for page-set-messages.