Detecting Client Changes

Is there a way to properly detect and run a jython script when a client is disconnected/connected from the gateway or when clients are updated or when user login changes?

I can think of a few ways to do this like running a background script that updates periodically and looks for major changes but is a big kludge and probably unreliable. The user login just requires finding all code that can do that and wrapping it in more logic (maybe).

To expand why, we are running 7.7.7 and have some issues with templates and template repeaters updating incorrectly. It appears that some bound properties are not working correctly everytime after switching user accounts or machines being hibernated/thawed or downloading updates after projects are published.

Anyway this is the design forum so not going too far into the bug now but its related. I plan to try and workaround the bugs until we can update to newer version and test if its still an issue but its confused a few users by showing incorrect status which concerns me.

I think that the best way to get this information is to configure client-scoped expression tags which read tags from the ‘System’ tag provider. These tags give you access to information about the client and the gateway such as logged in user, and number of sessions.

On each of these client expression tags, you can add a script to the Value Changed event, which always listens for changes in these values.