Question

Remove a Thread

Is there any Java code to remove a thread from clipboard ?

My Webchat thread remains in the clipboard till the session gets closed, but within that time if the operator clicks the chat, he can able to see the history which i don't want.

If can remove the thread, a new case will be created and the history won't show.

***Edited by Moderator: Lochan to update platform capability tags***

Correct Answer
May 28, 2019 - 2:10am

Hi sarath,

 

U can use the following  code to remove thread in Pega

if (!sCurrentThreadName.equals(sThreadName) )
 ((com.pega.pegarules.priv.context.PegaRequestor)tools.getThread().getRequestor()).removeInactiveThread(sThreadName);

 

sThreadName is the name of the thread. 

Comments

Keep up to date on this post and subscribe to comments

Pega
May 28, 2019 - 2:10am

Hi sarath,

 

U can use the following  code to remove thread in Pega

if (!sCurrentThreadName.equals(sThreadName) )
 ((com.pega.pegarules.priv.context.PegaRequestor)tools.getThread().getRequestor()).removeInactiveThread(sThreadName);

 

sThreadName is the name of the thread. 

May 28, 2019 - 3:31am

Thanks. Now the thread gets removed. 

But when i click the chat again, the thread creates and the Interaction details and history are still there. 

May 31, 2019 - 12:59am

For a quick fix i have updated the Interaction time out to be 3 mins, Once the it crosses the timeout the session gets removed

Pega
May 31, 2019 - 10:54am

Hi Sarath, why would you want to prevent the agent from seeing the bot history ? Just to let you know, in 8.3 release of Customer Service, the agent chat and Bot conversation will be stored in the same interaction history. It will allow a live agent to come and go seamlessly during chat.