Discussion

API 02 to 03-02

Hi All,

I have one activity ABC with the API 02(Activity rule bottom left drop down),
The activity having one Java Step and code contains

Page flowParamPage = myStepPage.getProperty(".pxFlow("+ getParameterValue("flowName") + ").pyFlowParameters").getAsPage();

when i am trying to change the API value from 02 to 03-02, its giving the compile time error.

for example:

1) The method getParameterValue(String) is undefined for the type Rule_Obj_Activity_ABC

2) The method getAsPage() is undefined for the type Rule_Obj_Activity_ABC.

Thanks & Regards.

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

November 18, 2011 - 2:51am

02 and 02-03 are the versions of public API that Pega uses. Whatever API you mention in the activity, that version is used while compiling the acivity code.

So as per your post, you may have to cross check if
getParameterValue(String) and getAsPage() are available in 02-03 version of publicAPI.

November 21, 2011 - 4:33am

Hi
In API 03 Version methods got Changed.you need to use API 03 version methods to save this Rule..

Page need to replace with ClipboardPage
getParamValue need to replace with tools.getParamValue();
getAsPage() need to replace with getPageValue();
Try the below Code

API 03 Version code:
ClipboardPage flowParamPage = myStepPage.getProperty(".pxFlow("+ tools.getParamValue("flowName") + ").pyFlowParameters").getPageValue();

V02 Version Code:

Page flowParamPage = myStepPage.getProperty(".pxFlow("+ getParameterValue("flowName") + ").pyFlowParameters").getAsPage();

November 8, 2011 - 11:02am

Try myStepPage.getProperty(".pxFlow("+ tools.getParamValue("flowName") + ").pyFlowParameters").getPageValue();

myStepPage.getProperty(".pxFlow("+ tools.getParamValue("flowName") + ").pyFlowParameters") returns a ClipboardProperty.

And I guess it has nothing to do about conversion from 02 to 03-02, buts seems they are not supported in 03-02.

quote:


Originally posted by chepyala

Hi All,

I have one activity ABC with the API 02(Activity rule bottom left drop down),
The activity having one Java Step and code contains

Page flowParamPage = myStepPage.getProperty(".pxFlow("+ getParameterValue("flowName") + ").pyFlowParameters").getAsPage();

when i am trying to change the API value from 02 to 03-02, its giving the compile time error.

for example:

1) The method getParameterValue(String) is undefined for the type Rule_Obj_Activity_ABC

2) The method getAsPage() is undefined for the type Rule_Obj_Activity_ABC.

Thanks & Regards.


November 8, 2011 - 11:04am

Pega internally uses this API version to generate java code.

Its recommended to use the 03-02 API version rather than Deprecated 02 API.

I guess, Internally it decides which version of Java version to use to compile code... But not sure..

Try to clear the cache for this activty and change the version. It may help.

March 29, 2016 - 2:15am

We were editing an activity in V6.2 SP1; saving it resulted in the following warning ...
"API version 02 is deprecated. Use 03-02 instead."

The concerned method was sendData(String, String)

What is the equivalent of this method in API 03-02 ?