Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:40 AM UTC

Uniface 9: kill interactive uniface appli

kill interactive uniface appli

Author: mps59@orange.fr (mpservices)

Hello How can I kill an uniface appli when the user is not using it after a few hours   Dominique

17 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:40 AM UTC

kill interactive uniface appli

Author: mps59@orange.fr (mpservices)

Hello How can I kill an uniface appli when the user is not using it after a few hours   Dominique

Hi Daniel, is there a Uniface-Function to get the time of inactivity? Uniface needs to know this value otherwise it could not fire the $timeout.   Norbert


Author: Lauterbach (norbert.lauterbach@infraserv.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:40 AM UTC

kill interactive uniface appli

Author: mps59@orange.fr (mpservices)

Hello How can I kill an uniface appli when the user is not using it after a few hours   Dominique

Hi Dominique, If you're using the UTIMER on the client side of an application then the URouter is not needed. Only when you want to use the UTIMER from a component that is running remotely in a UServer process then the URouter is required. The UServer does not have it's own message queue that could handle asynchronous messages. The queuing is down by the URouter. Hope this helps. Daniel


Author: diseli (daniel.iseli@uniface.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:40 AM UTC

kill interactive uniface appli

Author: mps59@orange.fr (mpservices)

Hello How can I kill an uniface appli when the user is not using it after a few hours   Dominique

Hi Dominique, I think you have misinterpreted the info from the helpfile as "exclusive server" is a special context.

The UTIMER can run in an exclusive server but it can only post messages to applications that are registered with the Uniface Router

I had no problem using UTIMER in C/S without any UROUTER running, Uli


Author: ulrich-merkel (ulrichmerkel@web.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:40 AM UTC

kill interactive uniface appli

Author: mps59@orange.fr (mpservices)

Hello How can I kill an uniface appli when the user is not using it after a few hours   Dominique

Thanks Knut But I saw in documentation that utimer needs urouter, which I'm not using So I think this solution doesn't suit to me Dominique


Author: mpservices (mps59@orange.fr)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:40 AM UTC

kill interactive uniface appli

Author: mps59@orange.fr (mpservices)

Hello How can I kill an uniface appli when the user is not using it after a few hours   Dominique

Hi Dominique, If I understand correctly, you'd like to 'force' the user off (logoff) after the offices close. I presume all offices close at a certain time (like 5pm)?

variables time vt_delay, vt_close endvariables activate "UTIMER".setmessage("yourcomponent", "", "LogMeOff") vt_close = "17:30:00" vt_delay = vt_close - $clock activate "UTIMER".start(vt_delay)

We have a 'master' component being run from the application startup shell. 'yourcomponent' above is that said master component - thus when the timer kicks in - we end up in the ASYNC trigger of 'yourcomponent'... Then, apexit rules the day. Good luck, Knut


Author: Knut (knut.dybendahl@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:40 AM UTC

kill interactive uniface appli

Author: mps59@orange.fr (mpservices)

Hello How can I kill an uniface appli when the user is not using it after a few hours   Dominique

Hi Dominique, if you use the timer only to invoke your check procedure but do not really care about users inactivity, I would recommend to activate this procedure based on UTIMER for the following reasons: - doesn't need any special ASN settings to enable the forced layout (no $TIMEOUT specified, no checks) - depending on a special keyword in the commandline, you can disable this forced logout in the startup shell - it allows intervals longer than 60 minutes Allover, much more flexibility with less demands on the ASN file used, Uli


Author: ulrich-merkel (ulrichmerkel@web.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:40 AM UTC

kill interactive uniface appli

Author: mps59@orange.fr (mpservices)

Hello How can I kill an uniface appli when the user is not using it after a few hours   Dominique

gianni said
Iain Sharp said ... If you were to design one, how would you reference it? From outside? Otherwise there would have to be activity on the client to check how long the client was inactive.  ... Iain  
An option could be into "Async trigger" scheduled from $timeout with today range limitation to go over 60 minutes. Gianni  

Oh yes, that's how you would use $timeout to do the job, but the O.P. was looking for a function to query how long the session was inactive, and I was pointing out that the query itself would be activity (as would the loop it was in) so within a client, the answer would always be 0.  With the urouter in place, you can use the UROUTMON signature to query client status, which will return an idle time, but the client doing the query is never idle...    Iain


Author: Iain Sharp (i.sharp@pcisystems.co.uk)