Support Article
Function Overloading is not working in Pega 7.1.7
SA-5308
Summary
Function in Pega 7.1.7 is not supporting polymorphism. Previous function with same name with different parameter types work perfectly fine in Pega 7.1.6.
Error Messages
N/A
Steps to Reproduce
- Create a PRPC Function which has two parameters: ClipboardPage and ClipboardPage. The output is a String.
- Create a same name Function with two different parameters: ClipboardPage and ClipboardProperty. The output is a String.
- Create an Activity. In the step 1 (Property-Set), we are passing two parameters (ClipboardPage and ClipboardProperty) to the Function.
- View Java code of this activity. You will notice that “Function--(ClipboardPage,ClipboardPage)" instead of “Function--(ClipboardPage,ClipboardProperty)" is invoked. This is the issue.
Root Cause
The root cause of this problem is a defect in Pegasystems’ code/rules.
Resolution
This issue is resolved through the following local change: Rename the function or change the number of parameters to the overloaded function to have it picked up during the code generation.
The fix will be in Pega 7.1.8.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.