Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Activity param pass-by-ref not working

SA-6537

Summary



When an inner activity designates a parameter for output on the Parameters tab, the calling activity expects that when specifying myPage.myProp as the value for that parameter, this will act as a pass by reference mechanism.  In other words, when the calling activity writes to the parameter, the data should appear in the property myPage.myProp.

This is only working for some users, however.

Error Messages



Not applicable.

Steps to Reproduce



1. From calling activity, specify the output parameter value of inner activity as myPage.myProp.
2. Call the inner activity.
3. The inner activity writes the string "Yes" to the output parameter and returns.


Root Cause



In the case where the inner activity was altered to return an output parameter after the calling activity was assembled, the generated java will use an incorrect method call. In order for the pass by reference mechanism to work, the java generation for the parameter needs to use "GetProperty" to fetch myPage.myProp. The java generation was observed to sometimes be using "getString" instead. This "getString" is used when the parameter of the inner activity is not declared as out.

Resolution



By using the revalidate-and-save tool to reassemble the calling activity after the inner activity has been update with a designated output parameter, the property "getProperty" is observed in the java, and the
pass by reference mechanism works.
 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us