Posted: 20 Mar 2018 18:14 EDT Last activity: 10 Oct 2018 4:17 EDT
Automatically open work item in perform harness
Hi, we have number of places in our application where a pega review mashup is loaded with only case ID. This allows only to open the work object in 'review harness/mode' in mashup. But we have a business requirement to automatically open the "assignment" directly, allowing operator to progress it. Business do not want to open in 'review mode' and then click to jump to 'assignment mode'.
essentially we want to achieve (1) open the work object with case ID (2) get the details of the open assignment, as all our user journeys will have only one open assignment and not multiple for now (3) automatically open the assignment in 'perform' mode without the user realizing any flicker of UI when the transition happens to perform mode.
Observation: The "Work-.Open" Pega activity is invoked by default from portal activities like "pyActivity=Embed-PortalLayout.RedirectAndRun" and "doUIAction". Calling activities have a parameter "Action", that will drive whether case to be opened in Perform mode or Review mode.
If the case is assigned to the same user and set the action parameter as "Perform", then the case will be opened in the perform mode. Trace of the session will help on identifying the portal activity to find and pass the parameter as "Perform".
You can open an assignment in perform mode directly using its key OOTB. If you only know the key of the work object (i.e. it's pzInsKey) you can derive the assignment's key from it but only if there is only one assignment on it. Of course, if it has multiple ones assigned to multiple users even, you need some kind of logic to decide which one to open. That might not that straightforward, and you need to implement some custom logic to tackle it there is no OOTB offerings for it as far as I know.
Did you make any script to call an activity for this logic ?.
We have a grid to display the multiple records and customer can open multiple objects .(like Dynamic Container view)
For testing purpose ,i just configured the the work-.Open activity from Action using Run Activity and after click on the link ,neither object is opening in tab nor error is occured in tracer and Work-.Open activity gets called successfully including show-harness step as well .
Passed the Inskey as pzInsKey and Purpose and Action parameters are Perform .
I can build custom activity to have a logic when to open the item in perform mode and review mode but how to open the object in new tab .
Seems , we need to make script and configure it in JS to call it from Action using Run Script . Any thoughts to avoid custom JS file would be great.