Support Article
Error when saving case type to a new ruleset
SA-16510
Summary
A Case Type has 79 Covered Work Types.
A error occurs when either attempting to save the Case Type to a new Ruleset or attempting to add a new Covered Work Type.
Error Messages
com.pega.pegarules.pub.generator.FirstUseAssemblerException: Failed to compile generated Java com.pegarules.generated.casetype.ra_action_pydefault_b4f4ae8582ced9954f7758a9eb733c96: ----------
1. ERROR in /com/pegarules/generated/casetype/ra_action_pydefault_b4f4ae8582ced9954f7758a9eb733c96.java (at line 40)
public void perform() {
^^^^^^^^^
The code of method perform() is exceeding the 65535 bytes limit
----------
1 problem (1 error)
Compile failed.
Steps to Reproduce
Attempt to add a new Covered Work Type.
OR
Attempt to re-save the existing Case Type to a new Ruleset.
Root Cause
The reason for the exception is due to the number of covered work types the user has that are being auto-instantiated, each auto-instantiations adds code to the generated method which eventually results in the Java method limit exception
"The code of method perform() is exceeding the 65535 bytes limit"
Resolution
Ensure to auto-instantiate only the ones that are to be used straight away in the code. By removing the auto-instantiation option from the covered work type, the issue resolves.
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.