Page 1 of 1
JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?
Posted: Mon Sep 13, 2021 1:33 pm
by dlightfoot
Hi All,
I'm looking in the Jade Journals for updates by a specific user.
When the record type is JadeAuditAccess.Jaa_Type_BeginTransaction, we can call JadeAuditAccess.getUserData(pUserName, pIndex);
However, there is no documentation in the white papers or the online Jade Help on what to do with pIndex to get the object it relates to, which I assume would be a Process !?
Can anyone help explain it please?
Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?
Posted: Mon Sep 13, 2021 3:24 pm
by BeeJay
I haven't written code to use the JAA classes myself so I can't answer your immediate question, but hopefully someone else who has used the classes will see your post.
However, I thought if you haven't already seen the white paper it may be worth your time reading the
Jade Audit Access Whitepaper for some additional background on using the Jade Audit Access classes.
Cheers,
BeeJay.
Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?
Posted: Wed Sep 15, 2021 8:29 am
by GerardO'Brien
The information is for you to maintain association structures relating transactions to users.
The index is the database user table index for the user with that name. You get the index and user name from the sign on, sign off, and change user records, and you get the index from begin transaction, commit transaction and abort transaction control records.
Using that user information, and the tranID of the begin/commit/abort, and the tranIDs of the creates/updates/deletes, you can determine and report what one or more users were up to.
cheers
Gerard
Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?
Posted: Wed Sep 15, 2021 1:11 pm
by dlightfoot
Thanks Gerard,
The relationship between UserIndex and TxnId make sense.
However, for SignOns, getUserData(pUserName, pIndex) is always <null> for pUserName, so I can not apply an initial link for UserName to UserIndex
It doesn't matter whether I start an app through the IDE, or a shortcut, it's always null (under Jade2018)
Any thoughts ?
Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?
Posted: Wed Sep 15, 2021 4:15 pm
by GerardO'Brien
Yes, you need to find the change user that is logged by the kernel.
see snippet
Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?
Posted: Wed Sep 15, 2021 4:29 pm
by dlightfoot
Many Thanks !!!