Question

2
Replies
35
Views
Close popover
Paulina Velez (apvelez)
Anthem
Pega Developer Advisor
Anthem
US
apvelez Member since 2019 4 posts
Anthem
Posted: January 31, 2021
Last activity: February 1, 2021

Ecxeption when retrieving Work Page errors

Pega 7.1.8

I'm trying to capture error messages from a page into a string parameter, but I always get the following error:

java.lang.ClassCastException: com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl cannot be cast to java.lang.String 

I have tried the following method which always result in a java exception:

@(Pega-ProCom:ProcessEngineStatus).getErrorMessages(tools, pyWorkPage)

When I look at the function definition, the return type is string and I'm trying to store the returned value into a string parameter with no success.

my pyWorkPage inherits from a class that inherits from the Work- class.

Param.ErrorMessages = @(Pega-ProCom:ProcessEngineStatus).getErrorMessages(tools, pyWorkPage)

What am I doing wrong?

 

***Edited by Moderator: Pooja Gadige to add platform capability tag***
Pega Platform 7.1.8 Enterprise Application Development Case Management Healthcare and Life Sciences System Architect