Auditor Class


Author
Message
Aaron Young
Aaron Young
StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi,

Is anyone using the Auditor class?

I have added the following code to the BeforeSave and AfterSave business object events but nothing happens:-

Auditor.InsertAuditRecords(this);

I have enabled auditing for both the business object and the current user but the following returns false:-

Auditor.ShouldAuditDataChanges(this);

I think I am having another dumb moment but I can't see what is wrong.

Thanks,

Aaron

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I haven't used the BO part of auditing (played around with other auditing functions), but this post seems to have gotten lost....bump.
Aaron Young
Aaron Young
StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Can I bump again please Smile

Just interested to know if it is worth trying to get it to work or if it is work in progress and better left untouched.

Aaron

Aaron Young
Aaron Young
StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi,



Can I bump this please? Smile



Can't seem to get it to work so just want to know if this class hasn't been implemented.



Thanks,



Aaron
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
It is possible for you to package up a quick sample for me to look at.  I was playing around with this and it seems to be working.

First things first, though.  Do you have the following tables deployed?

Also, have you tried turning on the DataSource debugger to see if any traffic is going to the server?

MicroFour.StrataFrame.Data.DataBasics.DataSources[""].SetDebugOn(...)

This might confirm whether data is actually trying to be saved or if your data source connections are setup properly.

Aaron Young
Aaron Young
StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi Trent,



Sorry, I only just noticed your reply.



The auditing tables do exist and I am able to programmatically add records to the event table by code such as:-



MicroFour.StrataFrame.Security.Auditor.InsertAuditEvent("xxxx", "Audit event message...", SerializedBO)



However, what doesn't happen is if I call the following code from the BeforeSave or AfterSave BO events nothing happens:-



Auditor.InsertAuditRecords(this);



I have enabled auditing on both the BO and the user but the following code returns false which appears to indicate auditing is disabled:-



Auditor.ShouldAuditDataChanges(this);



Should I be using "Auditor.InsertAuditRecords(this);" in the BeforeSave or AfterSave events and is my problem that "Auditor.ShouldAuditDataChanges(this);" returns false?



Thanks,



Aaron



Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, that is where I would go next, yes. I really need to try and set this up to see if I can reproduce your results before I can tell you for sure what is going on.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search