In the Cosmos UI, the main case is usually opened as a 'Review' harness (e.g. read only), where the assignment processing is opened inside an Ajax container using the 'Perform' harness. This is different from UI-Kit where the whole case page was opened inside a Perform harness when processing an assignment.
This configuration provides the following benefits:
the case is opened in read only (Review) which does not take a lock on the case object
opening an assignment only renders the assignment UI and does not reload the whole page which improve the page load time when processing assignments
Because the assignment processing runs inside an Ajax container, the UI is running inside a separate thread that is managed by the Ajax container. As such there is complete isolation of the UI between the review and the perform harnesses even when presented on the same page. For example reloading a section inside the Perform harness will only reload sections that are inside the Ajax container and will not reload the sections present in the dynamic container
In some cases, you want to provide a widget or update the information on the summary panel while making some edits as part of the assignment processing. This document covers how to enable such functionality.
For this document, we will take the example of an Expense case type where we want to show the total cost and a doughnut chart of the different categories. The data can easily be updated if they are inside the same flow action using a refresh section auto-generated action, but if we want to move them to the summary panel, the refresh will no longer work
In order to refresh the section in the summary panel you need to
1/ Edit the UserPortal portal channel using the 'Channels and interfaces' landing page
=> this will resave the UserPortal portal rule, UserPortal harness and UserPortal section inside your application rule
The function will find the first section that has the name passed as parameter in the document and will reload it from the data that are in the pyWorkPage present inside the Ajax container thread.
3/ Add the JS file to the list of script files
4/ In your action, perform a runscript to reload the section.
To update the summary panel, reload the 'CaseDetails' section
the OTB action called 'refresh Other section' will refresh ALL the sections with the same name independently of the classname, as long as the sections are in the same harness context.
the example of function provided in this document (reloadMySection) is just an example and could be extended. It is purposely very simple and use querySelector to retrieve the first section present in the DOM - it could be improved to do more error checking or reload all the sections with the same name using pega.u.d.reloadSections.
@goyac1 In theme Cosmos, cases are all open using the Review harness. The actions menu will render any local action defined in the case as case-wide or stage specific local actions. Local actions are independent of the fact that an assignment is opened or not. A better approach would be to provide an 'action' menu inside the main assignment section pyCaseActionArea that would offer some additional actions to the user.
But having another Actions menu in the pyCaseActionArea will result in two Action menus and not a good user experience.
I tried using "pyWorkActionsIsPerform" when rule which checks for the newAssignPage existence, which should exist in Perform harness only. This seems to be working sometimes but sometimes the same screen are not having "newAssignPage" on the clipboard.
This doesn't seems to work as per your comment on the below post:
@goyac1 pyWorkActionsIsPerform will not work since the summary panel is always in review. If the actions that the user is performing is contextual to the assignment currently opened, then the actions should be inside the flow action. The actions menu is intended to be used for any case related actions and should not be dependent of the assignment currently opened.
if you really want to keep using the actions menu, one option is to make the section that contains the actions button a parametrized section. The section can have 2 buttons with visibility condition depending of the parameter value; each button has a different navigation rule. When the assignment is opened, you can refresh this section in the summary by setting the correct parameter value in a pre-activity to show the other button - pega.u.d.reloadSection can accept an activity and activityparams.
@RichardMarsot Little deviation from primary topic - How did you manage to get New Harness as we do not have Skip Create option in 8.5 onwards, also i see its not Create stage that popped up as its not listed in chevron view.
Posted: 2 weeks ago
Posted: 13 Jan 2022 14:46 EST
Richard Marsot (RichardMarsot)
Director, Front-end Development
I have a requirement, where i am displaying count in case information area. when ever i open assignment that count will be calculated and populating in DCSPA_userportal thread. I was unable to access that updated value in case information area(Case ID thread), since, these were in two different threads. can you please suggest me a way to access the updated value from case ID thread.
I have gone through below links, none of them helped
@SivakumarS3537 is count a declare expression? If you use the article above, you can do a refresh section on change of the input fields. You will need to apply that action for every input field - which version of the Theme-Cosmos are you using and which version of the Pega Platform including the patch version?