JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?

For questions and postings not covered by the other forums
dlightfoot
Posts: 5
Joined: Mon Aug 30, 2021 8:42 am

JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?

Postby dlightfoot » Mon Sep 13, 2021 1:33 pm

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?

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?

Postby BeeJay » Mon Sep 13, 2021 3:24 pm

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.

GerardO'Brien
Posts: 12
Joined: Tue Jul 07, 2009 9:49 am

Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?

Postby GerardO'Brien » Wed Sep 15, 2021 8:29 am

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

dlightfoot
Posts: 5
Joined: Mon Aug 30, 2021 8:42 am

Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?

Postby dlightfoot » Wed Sep 15, 2021 1:11 pm

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 ?

GerardO'Brien
Posts: 12
Joined: Tue Jul 07, 2009 9:49 am

Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?

Postby GerardO'Brien » Wed Sep 15, 2021 4:15 pm

Yes, you need to find the change user that is logged by the kernel.

see snippet
snippet.txt
(567 Bytes) Downloaded 534 times

dlightfoot
Posts: 5
Joined: Mon Aug 30, 2021 8:42 am

Re: JadeAuditAccess.getUserData(pUserName, pIndex); How is pIndex used?

Postby dlightfoot » Wed Sep 15, 2021 4:29 pm

Many Thanks !!!


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 11 guests