WesleyC6 Member since 2017 2 posts
Posted: 3 years ago
Last activity: 3 years 1 month ago

Infinite Loading Screen Caused By pega_rules_default.downloadFile() in 7.2.1


We're updating from 7.2 to 7.2.1 and have found an infinite loading issue when downloading generated Excel sheets.

We have an icon in the header of a repeat grid whose on-click event calls harness-reload and an activity to generate/download an xl sheet from the grid contents. Upon execution, the xl sheet is successfully generated and downloaded but the screen then displays the loading icon indefinitely. The rest of the application continues working and the tab can be refreshed/closed manually, but the loading screen remains frozen until manually closed/reloaded.

After some testing I think the issue is coming from the Java code pega_rules_default.downloadFile(xlFile.toString(), tools, true).

When commenting out this line, the rest of the activity completes successfully and the harness reloads. The activity works in 7.2 and has not been changed.

Is there any way to fix this, or a replacement for this function?

Thank you

Full Java step code below.

String xlFileName = tools.getParamValue("FSFileName");
PRFile xlFile = new PRFile(xlFileName); xlOS = null; tempIS = null;
byte[] tempBytes = null;
boolean projectSizingPresent = false;
String strWorkObjectRef = "";
ClipboardPage objRefPage = null;
java.util.ArrayList sizingList = new java.util.ArrayList();
try {

tempBytes = new"TemplateFile").getString("pyFileSource"));

tempIS = new;
java.util.Map xlZipEntryMap = null;

xlZipEntryMap = com.pegarules.generated.pega_appdefinition_excelintegration.DCOXLGenerateZipEntryMap(tempIS);

xlOS = new PROutputStream(xlFile);
com.pegarules.generated.pega_appdefinition_excelintegration.DCOzipEntryMapToStream(xlZipEntryMap, xlOS);
if (tools.getParamAsBoolean(PropertyInfo.TYPE_TRUEFALSE, "DownloadFile")) {
pega_rules_default.downloadFile(xlFile.toString(), tools, true);
catch (Exception e) {
oLog.error("Error in parsing Excel file " + xlFileName, e);
//throw new RuntimeException(e);
finally {
if (xlOS != null) try { xlOS.close(); } catch (Exception e) { }
if (tempIS != null) try { tempIS.close(); } catch (Exception e) { }

***Moderator Edit: Vidyaranjan | Updated Categories***

Data Integration Java and Activities User Interface
Moderation Team has archived post
Share this page LinkedIn