# Theme-Cosmos: Configure URL Mapping

**URL:** <https://forums.pega.com/t/theme-cosmos-configure-url-mapping/3759>\
**Category:** General\
**Tags:** theme-cosmos, 8-5-1, pega-delivery-leader, pega-platform\
**Created:** [January 9, 2023, 10:25am UTC](https://forums.pega.com/t/theme-cosmos-configure-url-mapping/3759 "2023-01-09T10:25:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SakthiVickraman](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sakthivickraman/32/1646_2.png) [@SakthiVickraman](https://forums.pega.com/u/SakthiVickraman)\
**Post date:** [January 9, 2023, 10:25am UTC](https://forums.pega.com/t/theme-cosmos-configure-url-mapping/3759/1 "2023-01-09T10:25:41Z")

</div>

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

 ![Url Mapping configuration.png](https://pega1.discourse-cdn.com/pega/original/2X/9/9f9935bfff19346ffde7ae9d850ea8f5e1396c23.png)

- Click **Next**

 ![Url Mapping config.png](https://pega1.discourse-cdn.com/pega/original/2X/7/7e8ac6212d3528df8e20b06260217a6513b8649d.png)

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 :**

 ![Property set .png](https://pega1.discourse-cdn.com/pega/original/2X/f/f5bee45430b9545616372bcb1719ecca65a1de98.png)

1. **Property set :**

 ![Property set .png](https://pega1.discourse-cdn.com/pega/original/2X/8/8ff7f50a91f7ce9160d4f0dc893b4c3a9b22196b.png)

1. **Call pxOpenWorkItemNewTab**

 ![Call pxOpenWorkItemNewTab.png](https://pega1.discourse-cdn.com/pega/original/2X/7/7dbfa753f320e9439a655cb969b686b440591f99.png)

1. **Security Configurations**

 ![configure privileage.png](https://pega1.discourse-cdn.com/pega/original/2X/7/7cb2cd3aba2bc1453011cb7b1dd6b303a56485ec.png)

## 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.

---

<div class="post-metadata">

**Author:** ![Rachit\_Agarwal](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rachit_agarwal/32/1393_2.png) [@Rachit\_Agarwal](https://forums.pega.com/u/Rachit_Agarwal)\
**Post date:** [August 14, 2024, 1:55pm UTC](https://forums.pega.com/t/theme-cosmos-configure-url-mapping/3759/2 "2024-08-14T13:55:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rachit\_Agarwal](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rachit_agarwal/32/1393_2.png) [@Rachit\_Agarwal](https://forums.pega.com/u/Rachit_Agarwal)\
**Post date:** [August 28, 2024, 6:22pm UTC](https://forums.pega.com/t/theme-cosmos-configure-url-mapping/3759/3 "2024-08-28T18:22:50Z")

</div>

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](https://URL:8443/prweb/URLMappingIdentifier) - \> This is incorrect.

[https://URL:8443/prweb/app/app-name/URLMappingIdentifier](https://URL:8443/prweb/app/app-name/URLMappingIdentifier) - \> This is correct.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Vignesh\_Amarnathan](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vignesh\_Amarnathan](https://forums.pega.com/u/Vignesh_Amarnathan)\
**Post date:** [June 25, 2025, 5:51pm UTC](https://forums.pega.com/t/theme-cosmos-configure-url-mapping/3759/4 "2025-06-25T17:51:57Z")

</div>

@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.
