Support Article
ConcatenateEForms: PerformFieldFlattening does not work.
SA-8285
Summary
When Code-Pega-eForm | ConcatenateEForms is run with the parameter “PerformFieldFlattening” set to “true”, the fields fail to flatten (change to read-only).
Test Activity uses Code-Pega-eForm | GenerateEform to generate the input PDF document for ConcatenateEForms Activity.
GenerateEForm Activity generates the correct document in pyEForm property, and when you download that file you see that the properties have been merged with the placeholders in eForm PDF. However, when “ConcatenateEForms” is called to flatten the document, an empty Template is produced.
This issue is observed in Pega 7.1.5 and Pega 7.1.7.
Error Messages
Not Applicable
Steps to Reproduce
The following PDN document provides information about working with eForms within PRPC:
https://pdn.pega.com/documents/working-with-pdf-forms-and-documents-prpcv51
In summary, the following steps reproduce the issue:
1. Call GenerateEForm on eFormPage in a ‘wrapper’ activity.
2. Copy property from eFormPage.pyEForm to compositePage.pyEForms(1).
3. Call ConcatenateEForms on compositePage (with the Parameter “PerformFieldFlattening” set to “true”).
4. Run the ‘wrapper’ activity and then download the resultant PDF file.
Root Cause
The root cause of this problem is a defect in Pegasystems’ code/rules.
Resolution
The issue was resolved by a Local-change.
Replace the call to ‘ConcatenateEForms’ with a Java Step as follows:
byte[] input=(byte[]) pega.findPageWithException("eFormPage", "Code-Pega-eForm").getObject(".pyEForm");
byte[] output=tools.getEFormUtils().markAllEFormFieldsReadOnly(input);
ClipboardPage targetPage = tools.findPage("eFormPage");
ClipboardProperty targetProp = targetPage.getProperty("pyEForm");
targetProp.setValue(output);
Published June 12, 2015 - 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.