Support Article
Library compilation fails with save of a function
Summary
User has created function (test_funct1,funct1) in one environment and had configured custom code in it.
Later deleted test_funct1. Now after performing an upgrade to Pega 7.3.1,the custom code in that function is not compatible with the current version of pega.
Hence, when the user tries to edit the function to use the methods that are compatible with, while saving the rule, user receives a compilation error on library generation pointing it to the deleted function test_funct1.
Error Messages
Not Applicable
Steps to Reproduce
1. Open function which is not able to compile in Pega 7.3.1.
2. Save it in a new ruleset version in same library.
3. Make changes to resolve compiler errors.
4. Try saving the rule.
Root Cause
Reference of the old version of code in the function still exists in the environment referring to the library.
Hence, compilation errors are thrown while save of the function which which implicitly generate library code.
Resolution
Perform either one of the approach to resolve the issue:
Make the versions below the required function ruleset version as "Not available"(or comment the older code which is causing the issue) to ensure that this right rule from the highest available ruleset version with correct code is picked during runtime.
The process to perform this step includes:
- Perform check-out of the rule as the rule availability change requires a Save of the rule.
- After making it "Not available".
- Stop the servers and clear the temp directory(which clears the PRGenJava folder) and then start the server.
- Now perform "test function compilation using the path: Regenerate function >Regenerate library.
(Or)
The second approach is to use a new library and function with different names with same configuration.
Published July 23, 2018 - 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.