Hello!
Does anyone know: is it possible to trigerr an action in Outsystems when user session ending by expiring timeout(default 20 minutes)
i want to understand is it possible to trigger an event on logging out action(witch calls automatically when time expired) to save all the data which user write.
Test case is look like this.
I fill out a form with a lot of data, they called me to a meeting, locked my computer, returned, and after logging in, I have to fill out everything again.
you can try following components.
https://www.outsystems.com/forge/component-overview/14662/user-session-timeout-o11
https://www.outsystems.com/forge/component-overview/10443/single-session-user-login-ideal-session-timeout-o11
https://www.outsystems.com/forge/component-overview/16431/user-session-timeout-js-o11
You can try another approach: using an object to handle all inputs in your form. Whenever the user changes any field in the form, save the entire object to the local database. When the user returns to the form, load the data from the local database. When user submit the form, you can clear local DB
Hi @Tima Abdrakhmanov,
You can handle this issue by using a timer that saves the data to the database. Set a time interval, like 2 to 3 minutes, to automatically save the form without user intervention. Even if the session expires, the saved data can be retrieved when the user logs in again. If the browser is closed or the session times out, the data will still be available. Additionally, you can alert the user before the session expires with a warning message.
Thanks,
Sriyamini J
Hi,
Please check the below link
https://www.outsystems.com/forums/discussion/72237/reactive-web-adding-a-custom-session-timeout-browser-close-event/
Hi Tima,
you can implement auto-save functionality that saves user input at regular intervals so your data will be saved even if you leave the system. You can use the below forge component for the same.
https://www.outsystems.com/forge/component-overview/10687/screen-timer-reactive-o11
Hope it helps.
Hi @Tima Abdrakhmanov ,
Try check this component. This will give the user a alert message when his session is going to expire.
This might give you a clear picture on how and when the session is getting ended.
Hope it helps.Thank You.
You can combine auto save and local storage recovery:
1. Auto save to database or local storage every few minutes or after user stops typing.
2. On screen load, you can check for existing draft and prompt to restore.
3. Set session timeout (in Service Center -> Applications -> Environment Config) longer if appropriate.
Additionally, you can track inactivity manually via JavaScript: You can reset a timer on mousemove, keydown, etc.
If 18 minutes pass without activity, then call SaveDraft() client action before the 20-minute session expires.
Hi @Tima Abdrakhmanov in layout onready you can use if condition if the client became empty or null, you can find and move to seesion timeout screen