Function Overloading is not working in Pega 7.1.7
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.
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.
The root cause of this problem is a defect in Pegasystems’ code/rules.
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.
0% found this useful