Theme-Cosmos: Configure URL Mapping

Opening the work object in the theme cosmos full portal through URL Mapping is available from the Pega 8.5.1 release. This document explains the necessary steps to make the copy sharable link in the full portal.

  1. Configure the URL Mapping.
  2. Configure the supportive activity.
  3. Override the pyIsAutoGenThread when rule.

1. Configuring the URL Mapping :

  • It is mandatory to configure the simple URL so that the URL looks like a simple path.
  • Configure URL Mappings
    • Save as the Default rule in the application ruleset if needed.
    • URL Mappings will be available in Dev Studio - > Records → Technical → URL Mappings
    • Add the URL alias

  • Click Next

  1. Configuring the support activity:
  • Create the new activity OpenItem(Can be any name, make sure the same is reflected in the URL Mapping) in an application ruleset and Work- class

Parameters :



Name



Data type



Required



WorkID



String



No



WorkPool



String



No

Pages and Classes :



Page Name



Class



pxThread



Code-Pega-Thread



newTabTempPage



Work-

Steps :

  1. Property set :

  1. Property set :

  1. Call pxOpenWorkItemNewTab

  1. Security Configurations

3. Override the pyIsAutoGenThread

This is an important step to make the copy sharable link to open in portal and works correctly. Override the pyIsAutoGenThread in an application ruleset and class should be @baseclass always.

If you’re using Pega version 24.1.3 or later (including 24.2.1 and the latest releases), apply the two conditions listed below. If you’re on an earlier version, only apply Condition A.

Conditions:

A: @String.contains(@toUpperCase(pxThread.pxThreadName), @toUpperCase(“autothread”))

B: @String.equals(@toUpperCase(pxThread.pzisRedirectedFromSimpleURL), @toUpperCase(“true”))

Use A OR B.

Note:

We have seen scenarios, where users uses URL Mapping to open/create workobject by directly activities New/Open Workobject. This is incorrect, as it does not load/paint the UserPortal. So, please note that while doing URL Mapping, it is important that we paint the UserPortal and then perform any operation. It will make sure that all the required resources(such as Harness, CSS, styles etc.) get loaded properly.

Regards, Rachit

Rachit

Principal Technical Support Engineer

Also, The URL formed should be formed using the URL from Application URL alias under Application definition, which would consist of the Appname,

Calling the URL directly without the app-name would produce incorrect results.

Eg:

https://URL:8443/prweb/URLMappingIdentifier - > This is incorrect.

https://URL:8443/prweb/app/app-name/URLMappingIdentifier - > This is correct.

Hope this helps.

@SakthiVickraman,

I have a similar use case to configure URL mapping to open a work object in user portal and I tried the same steps suggested above. We are using Pega 8.7 theme cosmos. Case is opening as expected in user portal but on clicking close button (Cancel event in UI), system hangs while closing the case. We are unable to do any further action. All other actions on case can be performed, but cancel event is not working when we open work object by using custom activity that references pxOpenWorkItemNewTab. Could you please assist?

Thanks,

Vignesh.