Idle Monitor for WebUI applications
Dear Community,I wanted to share an example for which you can monitor if the user has been idle in AIMMS for a certain period.Why?You may want to check if your users are not leaving applications open while not using it for long periods , effectively occupying user licenses and compute power while blocking other users.There already is a timeout for WebUI applications, but this only happens if the browser tab is closed, is made idle by the browser, or the connection is lost - hence, if the user opens the app but simply forgets it open, it will not be automatically ended.How?To do this, I have two simple procedures:Procedure pr_checkIdle { Body: { if DataChangeMonitorHasChanged("idle_monitor") then sp_log += CurrentToString("%c%y-%m-%d %H:%M:%S") + " DataChangeMonitorHasChanged detected change\n"; DataChangeMonitorReset("idle_monitor",s_identifierToMonitor); empty p_howLongIdle; else sp_log += CurrentToString("%c%y-%m-%d %H:%M:%S") + " DataChangeMonitorHasChanged no