cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to get global session values on login/logout/sessionexpired event

PP_10477715
7-Bedrock

How to get global session values on login/logout/sessionexpired event

How to get  global session values on login/logout/sessionexpired event of Security Monitor in Thinworx.

i have written a subscription that executes on login/logout/sessionexpired event and in that i am trying to get session values but the session is null here.

 

 

 

4 REPLIES 4

Hi @PP_10477715 

 

Session Values are temporary data that will be cleared when the user logs out or on session time out. So session data will be null when you try to access it from the server side. I think you need to look for other alternatives for your use case.

 

More about session parameters - Session Parameters (ptc.com)

 

/VR

 

Thanks @Velkumar  for your response but it is true for logout and session time out , but don't you think it shouldn't be null on login succeed event?

Hi @PP_10477715 

 

It does have value when the user login.

 

But it can be accessed by the user in Mashup Runtime it cannot be used by Timer/Subscription

 

May I know your use case to understand better

 

/VR

I am trying to track how much time users spend on thing Worx application, 

here I am trying to update logout time of the user  using logout and session time out event but the problem happens when we have two active session for one user, then how to update user logout time because we have 2 entries of a user,  

 

Steps 

1. User login in one browser and  left the browser idle (not logged out), 

2. Re-login in another browser and this time user click on logout button, this time we can update the logout time of user but we have two active session so for which we update the logout time.

 

to overcome this problem i am trying to generate a custom session id on login event and based on that session id i can update logout time for active session (when user clicks logout button or on session expired).

 

is there any other way of doing it, would be appreciated.

Thanks

 

Top Tags