This document will explain about how to refresh files and documents widget in theme cosmos when attachments are added through flow actions and case processing.
Use case 1: Refreshing the widget when adding attachments using “pyAttachContent” control in a flow action without submitting the case
After adding the attachment and not submitting the case, the files and documents widget will not be refreshed as both the sections are present in different thread context.
To refresh the widget after the attachment before submitting the case, please follow the steps below:
Open the property panel of attach control and navigate to Actions tab
Add a click action and use “Run script”
Add the " pega.desktop.infinity.refreshCaseSections" and pass the section name “pyCaseRelatedContent”. The widget will be refreshed.
Use case 2: Refreshing the widget when adding attachments from flow action after submitting the case
When the attachment is being added from a flow action, the section gets rendered in the primary ajax container. After adding the attachment, the widget will be not refreshed as both the sections are in different thread context.
To refresh the widget, please follow the steps below
1. Navigate and open to pyCaseMainInner section of the case type
2. Navigate to utils region and open “Case Related content”
3 Add the property “.pxUpdateDateTime Changes” condition on the refresh condition and submit.
This will refresh the widget after the attachment case has been submitted.
For more refresh strategies in theme cosmos, please see refer this document for more information