Posted: 22 May 2019 13:20 EDT Last activity: 31 May 2019 10:49 EDT
Create a new case and display it in a new tab when Portal loads
Just wanted to know if there are any general suggestions on how to create a case automatically when a specific portal loads. I'm using the Interaction Portal from Customer Service framework, so I have done the following development:
Copied @baseclass.preDisplayHarness activity to the business layer.
Added an activity on step 1 to create a case. This step is conditioned to be executed only when Param.harnessName=="CPMInteractionPortal".
This creates a case every time this particular portal loads. To accomplish my requirement, I will add other conditions to the execution of my activity inside preDisplayHarness, so there is no need to worry about too many cases getting created just by loading the portal.
So, this is the issue:
Even if I can create a case using @baseclass.doUIAction activity, this doesn't open the case on a different tab. This conversation is related to this other post, but I wanted to ask in this post if there is any other way apart from using doUIAction activity in order to create a case when portal loads, and then display it.
Once again, thank you so much!
***Edited by Moderator: Lochan to update platform capability tags***
Thank you so much for your reply. I was able to find the pyAddRecentListItem data transform, but I see it is withdrawn:
I created a Phone Call interaction via the OOTB navigation menu in the top of the screen and traced, and I see the two pyAddRecentListItem data transforms that get executed are:
I copied the one in the Work- class to my application class, and executed the following tests:
Created a work object and executed the data transform alone with pyWorkPage as the context.
Added the pyAddRecentListItem data transform at the end of my activity using doUIAction activity.
There was no tab for both tests, but I noticed this. The data page D_CPMPortalRecents is ALWAYS empty, there are no pxResults inside of it.
As you can see in the screenshot, there is a case already created, but the C_CPMPortalRecents data page has no items inside besides the pySourcePage. This also happens if I have multiple cases, and also if I advance the case until I reach the Composite.
This also happens in our sample Pega application, is this behavior normal?
I'm using Pega 8.1.0 with Customer Service Framework.
Sorry,I have suggested the above solution with out knowing your CS version. Recents architecture has been changed in 8.1 CS . We are not using D_CPMPortalRecents data page now(till 7.4 this data page had been used).
I will check regarding your requirement at my end and get back to you.
Hi Israel, sorry for coming late to the conversation. "Hijacking" the portal load activities to invoke creation of a case is never a good idea. When a case is created using the CreateNewWork APIs, there are a number of processes that happen at the desktop prior the doUIAction activity getting invoked. If you do it in this manner, it will lead to issues later on. Even if you get the case to get created, trying to move between home tab and the case will likely be broken. The Interaction portal is not meant to be used like this, which sounds more like Mashup. The portal is built in a way that is supports creating of cases in an interaction context. The Data Transforms that are mentioned are very specifically built to handle these use cases.
What exactly are you trying to achieve ? Perhaps there is a better way to achieve your business use case than the method you are trying here.