Auto-Save Before Logout
Submitted by EastsideVetEmerg on Fri, 19/09/2014 - 15:41
We were just wondering if it was possible to add an "auto-save before logout" feaure.
Currently our logout times are set to 10 minutes. This is to ensure if people walk away from a computer they are logged off and so any one else that logs in does so under their own name. This improves tracking (notes are entered under the correct name), billing (services are billed under the correct vet) and is generally we find a good feature.
The one disadvantage is on the occasion you are distracted mid-note and the system auto-logs out and you loose anything written and not saved ("applied").
Would it be possible to add a feature in that automatically "saved" or "applied" the current screen before exiting?
Thanks,
Adrian
Re: Auto-Save Before Logout
This is a tough one, I havent really looked at the session management of Tomcat but I think the problem here is that the session is managed by the Tomcat server outside the openvpms app. ie Openvpms has no real concept of a session timer that it can guess if you are about to get logged out and save you work for you.
The only option then is to implement a autosave feature generally - the problem of course being what happens when the attempted item cant be saved due to validation errors. I am not completely convinced on the reliability of the current job manager inside openvpms - currently it runs the Esci Inbox service, there is a plan to migrate the document import service inside the app as well. However I routinely need to manually update my esci inbox to retrieve deliveries . Almost like the service has stopped working?
We could create some sort of session based service that saves every 5minutes or so, I guess but then you will have a service running for every session....which means that a user could have more than 1 service running ie more than 1 window open - the overhead could slow a server maybe?
Tim A ? might have more to say
But I think the idea is good - just need to work out how to make it low cost
Ben
Re: Auto-Save Before Logout
I suspect that, if it is possible to implement, a more efficient approach is to have client side code press the Apply button if any input fields have changed and (say) 5 minutes have elapsed since the last Apply.
That is, the Autosave facility is only built into screens that have an apply button, and the apply button only gets auto-pressed if data has been entered and it has been more that the autosave time since the last save.
Googling 'javascript autosave' and 'sprint autosave' both return examples but I have no competence to assess whether this is possible with the spring framework that we use.
Regards, Tim G
Re: Auto-Save Before Logout
I think its doable, but I think it would be better to allow the user to log back in to the existing session. So instead of automatically logging out after 10 minutes, a Lock screen would be displayed. If you enter your password, you go back to where you were. If you click Switch User, the existing session is terminated, and the login page is displayed.
If the Lock screen is displayed for too long (e.g. 30 mins), then the session would terminate as is the case now.
Re: Auto-Save Before Logout
Hi,
The lock screen idea is a good one... it achieves similar outsomes with what sounds like less pain...
Can we get this costed?
Thanks,
Adrian
Re: Auto-Save Before Logout
See http://www.openvpms.org/project/screen-auto-lock