Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

pxSessionTimer: Multiple modal dialogs display on timeout



SSO logoff timer is not working as per the implementation guide. User sees multiple timeout warning messages appearing in the SSO scenario.

Error Messages

No error messages

Steps to Reproduce

Login to user portal and keep the session idle for 15 minutes.

Root Cause

Placement of a pxSessionTimer is critical.

Needs to be in the portal header, pyPortalHeader section when using pyCaseManager portal for example.

Furthermore, add to the first dynamic layout as it takes no visible space.


For Pega 7.2.2 this is similar to

but no need to modify the ShowLogoffTimer activity and LogoffTimer HTML rules.

To use the Logoff Timer in Pega 7.2.1 or 7.2.2 follow the below steps:

1. Copy pxSessionTimer and rename to SessionTimer<ProjectName>.

2. Place the following script at the bottom of the existing <script> block just before the </script> tag.

function desktop_restartTimeoutWarningTimer(){

if (pega.desktop.TimeoutTime && pega.desktop.TimeoutTime > 0) {

var nTimeoutWarningTime= (pega.desktop.TimeoutTime - pega.desktop.TimeoutWarningWindow) * 60000;

if (nTimeoutWarningTime >= 0) {
pega.desktop.TimeoutWarningCountdown = self.setTimeout("desktop_showTimeoutLogoffDialogNew('"+pega.desktop.TimeoutWarningWindow+"')",nTimeoutWarningTime);

function desktop_showTimeoutLogoffDialogNew(strTime) {
var iTime = parseInt(strTime);
iTime = iTime * 60000;
var oSafeURL = new SafeURL("@baseclass.ShowLogoffTimer");

pega.openUrlInModal.showModalDialog(oSafeURL,iTime, 210, 620, function(ret){
if (ret == null || ret == "ok") {
} else {
pega.u.d.gDirtyOverride = false;
try {
} catch(e) {
pega.u.d.replace('pyActivity=LogOff&pzPrimaryPageName=pyDisplayHarness', null);
self.setTimeout(function(){clearTimeout(pega.desktop.TimeoutWarningCountdown);}, 5000);
Nice to have, if you have a popup window like a report that was opened via core PRPC UI actions this will close the window as part fo the logoff timeout

function closeAllPRPCChildWindows()
var currWin = null;
var app =;

while (null != (curWin = app.openedWindows.pop())) {

Published December 5, 2017 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us