Support Article
Interaction WO is getting closed even with Open Tasks in CPM
Summary
Users are able to close the interaction Work Object (Click on ‘X’) even with open associated service tasks.
User should not be able to close the interaction work object without closing associated service tasks. User should be presented an error message to close the service tasks first before closing interaction.
Error Messages
No Error Messages
Steps to Reproduce
- Login to CPM Interaction portal.
- Create an interaction.
- Member 360 is displayed, Select a service task from add tasks buttons.
- Close the interaction case by clicking the “X” button on phone tab.
Root Cause
Out Of The Box Pega Customer Service does not support this use case.
Resolution
Perform the following local-change:
Configured when conditions on close button (‘X’) such that if service case exist for that interaction then an alert if thrown.
Below are the changes need to be included in the application in order to achieve the requested use case.
- Add the below function to pega_cpm_IP_EventManager text file.
pega.cpm.IP.showInFlightAlert = function()
{
alert("Please complete the inflight service processes before proceeding");
}
- Create 4 when rules as mentioned in the above screenshot. When rules should be created in System-User-Recents class. Below are the screen shots of 4 when rules.
- CMPIntWithNoSC
- CMPIntWithSC
- CMPInactiveIntWithSC
- CMPInactiveIntWithNoSC
Condition of string A is
@LengthOfPageList(D_CPMServiceCaseRecents[Primary.pyRecordID].pxResults)
- Below are the changes need to be done in CPMPortalRecent section.
Dynamic Layout (Tabs)- 1:
Layout properties: Visibility condition(When rule): CPMIntWithNoSc
‘X’ icon properties: No changes in the action tab.
Dynamic Layout (Tabs)- 2:
Layout properties: Visibility condition(When rule): CPMIntWithSc
‘X’ icon properties: Add an action Run Script and the value for function name is "pega.cpm.IP.showInFlightAlert"
Dynamic Layout (Tabs)- 3:
Layout properties: Condition(expression): .IsSelected == true && ((.FocussedRecent.pyContentID != ''))
‘X’ icon properties: Add an action Run Script and the value for function name is "pega.cpm.IP.showInFlightAlert"
Dynamic Layout (Tabs)- 4.1:
Layout properties: Visibility condition(When rule): CPMInactiveIntWithNoSc
‘X’ icon properties: No changes in the action tab.
Dynamic Layout (Tabs)- 4.2:
Layout properties: Visibility condition(When rule): CPMInactiveIntWithSc
‘X’ icon properties: Actions- Invoke action and Run script as shown below.
Dynamic Layout (Tabs)- 4.3:
Layout properties: Condition(expression): .IsSelected != true && !(.FocussedRecent.pyContentID == '')
‘X’ icon properties: Actions- Invoke action and Run script as shown below.
Dynamic Layout (Tabs)- 5:
No Changes required.
After the changes CPMPortalRecent section looks as below
Published January 31, 2016 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.