I try to catch the event when someone opens the designer and saves the user info in the database. I try to put my code in the change script event of session.props.id but it seems Ignition can't detect the changes of this property.
Also, Perspective > Session Events > Startup doesn't trigger when the designer is opened.
So, I am looking for a location to give me an event when the designer opens.
Calling system.perspective.getSessionInfo() periodically gives this information but the problem is not efficient and I need to poll the function.
What's going wrong exactly, what is the designer saving in user info you are trying to catch? Are you trying to prevent the designer from overwriting something for user info, or just log when the designer makes changes to it for record keeping?
I just want to track user activities on the designer. So I want when someone open the designer and close it I get event and save his/her info into my database.
info:
username
project
sessionId
usersource/idp
loginTime
logoutTime
The problem is each project may use a different audit database and it is hard to track developer work in different databases.
I need something centralized in one database. Also in the audit, there is no record of idp and sessionId( I need sessionId to match the pair of login/logout)
Maybe there is two user name in different idp(usersource)
an expression binding(with just a string in it or whatever) on a session.custom prop with a script transform attached to it seems to trigger once on launch. Might trigger extra on edits though
If the designer authentication uses an idp instead of 'Classic', would there still be a session id of sorts? Just not something that get's used in the log?
EDIT: I realize that's starting to go off into the weeds, but maybe something to look into for 8.3
The project accepts one audit profile and this profile is different for each project.
If you miss this setting nothing will log for user activities in desinger.
We want to create some sort of admin tool to visualize users' activities including both clients (operators) and developers. The problem is the user runtime activities log as Unauthenticated in the audit for both login/out.
Yes and no, as you mentioned the session startup and shutdown don't trigger the event change script. So even if I use binding in the custom part, I definitely lose the shutdown events in the designer.