If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#53970 by Madimant
Sun May 24, 2020 3:15 pm
I'm trying to set up a user session log file.
I want to see when somebody logs onto the system and then leave again.

I created a StaffLog BO which I referenced to my Staff members. (StaffMember.om_StaffLogs)
When the staff member login I create a new StaffLog record in the business rules of the Notifier 'LoginNotification' using the Session_ID, timestamp and LoggedInStaffMember.
Then when the user logs off I find the StaffLog record with the correct Session_ID with a rule in the 'LogoutNotification' and update the logout time.
Up to here it all works as expected.

Now the problem comes where most users don't logoff... they just abandon the webpage and my StaffLog record sits open with no logout time.
Is there a way to overcome this and close the Record when the user becomes inactive?

I tried the session timeout on the user but cannot get that to work successfully?

Tj
#53971 by Jaymer
Sun May 24, 2020 4:29 pm
Madimant wrote:... and close the Record when the user becomes inactive?


I think the definition of that (inactive) is when they timeout.
If you were to monitor one of the output windows (probably Tomcat) or maybe the Logger window, you’ll see when the Logout Notification becomes active.

There’s no way for anyone to know the user isn’t sitting there looking at data. So unless they explicitly log off, Your log isn’t going to reflect that until their timeout comes around.
You’re on the right track.
Did you model your code after the CRM example?
The CRM example has a user status query that shows online/offline status.

And you say you tried timeout of the user. That only started maybe 2 years ago. Each user can Now have a timeout time. Set it to 1 or 2 minutes and watch the logs and try and do a refresh on a query (after your interval) and see if you get a session timeout msg. If not, then true, it’s not working.
#53972 by Madimant
Sun May 24, 2020 5:57 pm
Thanks Jaymar...

Yes I did model my app on the CRM LoginNotification and LogoutNotification.
There is already attributes that change value on login and logout... I just added my own rules.

I'm not too worried if the user is sitting staring at the screen... If after 10mins no action closes the session.

I getting stuck with the timeout numbers.

In the BASServer.props the Session Timeout was set at 1 800 000 which I presume is in millisecs (30 mins) - I changed it to 60 000 (10 mins)
in the webapp.props the Session Timeout was set at 1 800 and this would be in seconds (30mins)??? - Changed it to 600 (10 mins)
Reboot system...

What should be in the User SessionTimeout setting? Minutes, Seconds or millisecond.?

I set the Session Timeout in the StaffMember to 60 000 and nothing happens.. change it to 600 and nothing happens ....change it to 60 and nothing happens ....change it to 10 and it times out randomly after 15 to 30 secs idle.
Cannot get a handle on the number?

Ideally, I would prefer to have a 10min timeout with a response back to LogoutNotification.
Help is appreciated.

Tj
#53974 by Jaymer
Sun May 24, 2020 9:01 pm
You are close,
See this. https://www.awareim.com/forum/viewtopic.php?f=1&t=10911
Same issue been asked before.
And I’m not sure on the units used in RegUser. Not at my desk.

I’d set the user timeout to 60 (I’m thinking that one is in seconds) and wait over 2 mins, and see if you can Refresh a query.
An explicit timeout in a user table is supposed to override the setting in those other 2 locations.

Who is online

Users browsing this forum: No registered users and 15 guests