Question

Remove Thread Level Data Page during Switch Application - Not working

Dear All,

In Pega 7.2.2, when I switch between applications, the thread level data pages are not getting removed. (just OOTB functionality, no customized code involved).

I tried customizing ApplicationFreeClipboard activity and manually removed all Data Pages, still it doesn't work.

I am using below Java code in this activity

pega.getDeclarativePageUtils().deleteAllInstancesOfDeclarativePage("D_XXXXXXX");

Please let me know how to remove thread level data pages while switching application.

Thank you for your great support!

Regards

Guhan

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
August 30, 2017 - 6:05am

Dear All,

I fixed this issue by doing the below steps.

1. Remove the PS1_ threads by using the java code mentioned here (https://pdn.pega.com/support-articles/dynamic-container-not-loading-when-switch-interaction-portal)

2. Using the Activity pzFlushDataPage by passing data page name and FlushAllInstances as true (this is for the data pages with parameters)

3. Using the syntax "tools.removeDataPage("DataPageName");" (this is for data pages without parameters)

I did the above 3 steps in ApplicationFreeClipBoard Activity. (I specialized this is framework layer)

Thank You all for your great support!

Regards

Guhan

Comments

Keep up to date on this post and subscribe to comments

Pega
August 25, 2017 - 10:23am

Ideally, this method should work. Can you make sure by looking at the time of Data page if it was getting removed and not getting reloaded again by some reference?

August 29, 2017 - 7:35am
Response to rawap

Thank You for your reply!

The code removes the data pages under user pages but it is not removing data page(thread) under data pages - thread. Please refer attachment.

 

 

August 26, 2017 - 2:09am

Hi,

You can also try the steps mentioned below to achieve your requirement:

1. Do a Page-Remove of data page

2. Call OOTB FlushDeclarativePage activity with page name just D_<Name>

If you are having parameters for the data page, then you can  Page-Remove and passing the full data page description with parameters inside e.g. DataPageName[Param1:Value,..].

Regards,

Vikash

August 29, 2017 - 7:36am
Response to Vikash Karn

Thank You for your reply!

The code removes the data pages under user pages but it is not removing data page(thread) under data pages - thread. Please refer attachment.

August 29, 2017 - 11:06pm
Response to Guhanathan

Can you try using one either of the below functions as a java step in your activity and check if it removes the thread level data page.

pega_rules_declarepages.ExpireDeclarativePage(tools,"DeclarePagename");

or

pega.getDeclarativePageUtils().flushPage("Declarepagename");
 

August 30, 2017 - 5:11am
Response to Vikash Karn

Thank You for your reply.

This code removes the data page only from Standard/Open Portal thread. It is not removing the data page from PS1_TABTHREAD1/PS2_TABTHREAD2. Please find attachment.

is there any code which removes thread level data page from all the available threads?

Thank You!

Pega
August 30, 2017 - 3:31am

Hi,

Can you try with using  below function in Call-Function method .

@(Pega-RULES:DeclarePages).pzDeleteAllInstancesOfDeclarativePage(tools, "DeclarePageName")

Thanks,

Santhosh

August 30, 2017 - 5:12am
Response to bagas

Thank You for your reply.

This code removes the data page only from Standard/Open Portal thread. It is not removing the data page from PS1_TABTHREAD1/PS2_TABTHREAD2. Please find attachment.

is there any code which removes thread level data page from all the available threads?

Thank You!

August 30, 2017 - 6:05am

Dear All,

I fixed this issue by doing the below steps.

1. Remove the PS1_ threads by using the java code mentioned here (https://pdn.pega.com/support-articles/dynamic-container-not-loading-when-switch-interaction-portal)

2. Using the Activity pzFlushDataPage by passing data page name and FlushAllInstances as true (this is for the data pages with parameters)

3. Using the syntax "tools.removeDataPage("DataPageName");" (this is for data pages without parameters)

I did the above 3 steps in ApplicationFreeClipBoard Activity. (I specialized this is framework layer)

Thank You all for your great support!

Regards

Guhan