StrataFrame Forum

Auditor Class

http://forum.strataframe.net/Topic25242.aspx

By Aaron Young - 11/18/2009

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

By Greg McGuffey - 12/7/2009

I haven't used the BO part of auditing (played around with other auditing functions), but this post seems to have gotten lost....bump.
By Aaron Young - 12/9/2009

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

By Aaron Young - 1/27/2010

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
By Trent L. Taylor - 1/30/2010

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.

By Aaron Young - 2/12/2010

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


By Trent L. Taylor - 2/12/2010

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.