Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Screen flow hangs when attachment is downloaded

SA-101569

Summary



When using the 'pega.ui.HarnessActions.doAttachmentSingleClick' script to download attachments that are present within a screen flow, the system stops processing. This occurs in the Case Worker portal.


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a screen flow.
  2. Create an assignment with a section within the screen flow.
  3. Add a button to the assignment's section that invokes the 'pega.ui.HarnessActions.doAttachmentSingleClick' script upon a click.
  4. Execute the screen flow.
  5. Navigate the flow to the point where the button with the script was added.
  6. Click the button.
  7. Click 'Continue' or 'Finish' in the flow.


Root Cause



When an attachment is downloaded using the pega.ui.HarnessActions.doAttachmentSingleClick() script function, internally the ATTACHMENT-DATA iFrame is used. When iFrames are involved, the ChangeTracker is invoked to communicate the data between different iFrames.
The Case Worker portal is a single-thread model; while the Manager or the Admin portal are multi-threaded. In the Manager or the Admin portal, the ChangeTracker is invoked on the top level frame. As a result, the system works correctly.
However, for the Case Worker portal, the ChangeTracker is invoked on a dummy iFrame that is created for download (that is, ATTACHMENT-DATA). Since this is a dummy iFrame, the  ChangeTrackerMap object is not present. Hence, the script fails in the trackXThreadChanges script function and the screen freezes.


Resolution



Perform the following local-change:
  1. Modify the DisplayAttachment HTML rule where the ChangeTrackerMap is built for the dummy iFrame.
  2. Add the below line of code in the HTML Rule,

    pega.ui.ChangeTrackerMap = {"getTracker":function(){}};
Suggest Edit

Published August 5, 2020 - Updated December 2, 2021

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us