This content has been archived.

Table of Contents

A Java step requires an existing step page


A developer asks:

I have a Java step, with the embedded page .PrintResponse as the step page.  In the Java, I do the following:

ClipboardProperty base64Prop = myStepPage.getProperty(base64PropName)

This fails -- I believe because the .PrintResponse page doesn't exist (as this is the first time that I reference any properties on this page). If I add a Page-New of .PrintResponse before calling this Java step, all is well.

Is there a better way of doing this -- perhaps by using a method that would "create the property if its page didn't exist"?


Suggested Approach

The step page must exist before the step begins.

The exception is a small number of activity methods that are documented to create a step page internally, such as Page-New.

In particular, in a Java step the step page must exist before you enter your Java code.

Suggest Edit

66% found this useful

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.