Hello Aware IM,
I am the proud new owner of your product and have been having a great time developing web applications.
I have several apps that I would like to web enable. Many of these apps have code incorporated to capture the navigational movements of my administrators and the details of any changes.
The detail audit table has the following data:
Object Modified (Business Object)
Object Field Modified (Attribute)
Object Field Reference (ID, Name...etc)
Date/Time Modified
Type of Activity (Addition, Delete, Append, Update)
Original Data
Modified Data
User who Modified Record
From what I can tell this should be possible in Aware IM but since I am new at this I have not been able to make this work yet.
As you can imagine my audit tables have been very large in the past because it tracked everything that was added and deleted (as well as, updates to a record).
I hope that you can help me.
Thank you,
PEFS
Audit Records
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
Hello PEFS,
There are many ways to capture change history. I will describe a generic approach, which you can extend depending on the depth of information you want to record.
Object AuditTrail keeps a single change event and has the following attributes:
Name: MadeOn, Type: Timestamp, Initial value: CURRENT_TIMESTAMP
Name: MadeBy, Type: SystemUser
Name: ObjectID, Type: Number
Name: Description, Type: Text
To capture a change to a particular attribute, add a rule like the following to the object of interest (Person in this example):
If NOT(Person IS NEW) AND Person.DateOfBirth WAS CHANGED
Then CREATE AuditTrail WITH AuditTrail.MadeBy = LoggedInSystemUser, AuditTrail.ObjectID = Person.ID, AuditTrail.Description = 'Changed DateOfBirth on Person from <<OLD_VALUE(Person.DateOfBirth)>> to <<Person.DateOfBirth>>'
To capture creation of a new object, add a rule like this:
If Person IS NEW
Then CREATE AuditTrail WITH AuditTrail.MadeBy = LoggedInSystemUser, AuditTrail.ObjectID = Person.ID, AuditTrail.Description = 'Created new Person'
To capture deletion of an object, add a rule like this to the Rules When Object Is Deleted for the object:
CREATE AuditTrail WITH AuditTrail.MadeBy = LoggedInSystemUser, AuditTrail.ObjectID = Person.ID, AuditTrail.Description = 'Deleted Person'
You can also keep track of users logging in and out of the system. Please see sections Handling Login Events and Handling Logout Events in the Aware IM User Guide for details.
There are many ways to capture change history. I will describe a generic approach, which you can extend depending on the depth of information you want to record.
Object AuditTrail keeps a single change event and has the following attributes:
Name: MadeOn, Type: Timestamp, Initial value: CURRENT_TIMESTAMP
Name: MadeBy, Type: SystemUser
Name: ObjectID, Type: Number
Name: Description, Type: Text
To capture a change to a particular attribute, add a rule like the following to the object of interest (Person in this example):
If NOT(Person IS NEW) AND Person.DateOfBirth WAS CHANGED
Then CREATE AuditTrail WITH AuditTrail.MadeBy = LoggedInSystemUser, AuditTrail.ObjectID = Person.ID, AuditTrail.Description = 'Changed DateOfBirth on Person from <<OLD_VALUE(Person.DateOfBirth)>> to <<Person.DateOfBirth>>'
To capture creation of a new object, add a rule like this:
If Person IS NEW
Then CREATE AuditTrail WITH AuditTrail.MadeBy = LoggedInSystemUser, AuditTrail.ObjectID = Person.ID, AuditTrail.Description = 'Created new Person'
To capture deletion of an object, add a rule like this to the Rules When Object Is Deleted for the object:
CREATE AuditTrail WITH AuditTrail.MadeBy = LoggedInSystemUser, AuditTrail.ObjectID = Person.ID, AuditTrail.Description = 'Deleted Person'
You can also keep track of users logging in and out of the system. Please see sections Handling Login Events and Handling Logout Events in the Aware IM User Guide for details.
Aware IM Support Team
Thank you!
Great feedback and advice.
I was able to get it to work except for the deletion part. I am unsure of where to add the rule.
Is there something I have to add to the IF section of the rule?
Thanks again for you help.
I was able to get it to work except for the deletion part. I am unsure of where to add the rule.
Is there something I have to add to the IF section of the rule?
Thanks again for you help.
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
Unlike rules invoked when an object is created or changed, rules for object deletion are specified in a separate place. In the Configuration Tool tree on the left, expand the node for the object to which you are adding the rules. Right click "Rules (when object is deleted)" and click New. You do not need to add any conditions (the IF section) to the rule.
Aware IM Support Team
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
Rule Language Reference contains detailed definitions of all rule elements, How To has some tips on using rules, and there is a lot of information about rules in User Guide. All of these documents can be found in the DOCS directory under Aware IM installation directory. Specific examples of rules can also be found in this forum.
Aware IM Support Team
Clarification
Hi Support.
Am interested in implementing the approach suggested in this post;
Object AuditTrail keeps a single change event and has the following attributes:
Name: MadeOn, Type: Timestamp, Initial value: CURRENT_TIMESTAMP
Name: MadeBy, Type: SystemUser
Name: ObjectID, Type: Number
Name: Description, Type: Text
If the goal was to monitor changes to multiple BO's, the attribute ObjectID could still be used, irrespective of the business object? The AuditTrail Object would just require the business object ID as input?
If this is correct, then I assume that the ID's generated by AwareIM are unique to each Business Space version and increment with each instance created.
Am interested in implementing the approach suggested in this post;
Object AuditTrail keeps a single change event and has the following attributes:
Name: MadeOn, Type: Timestamp, Initial value: CURRENT_TIMESTAMP
Name: MadeBy, Type: SystemUser
Name: ObjectID, Type: Number
Name: Description, Type: Text
If the goal was to monitor changes to multiple BO's, the attribute ObjectID could still be used, irrespective of the business object? The AuditTrail Object would just require the business object ID as input?
If this is correct, then I assume that the ID's generated by AwareIM are unique to each Business Space version and increment with each instance created.
System Changes
Hi Support.
Another question in regards to the suggested 'AuditTrail' approach.
If an attribute was updated by a Schedule System process, would this approach still work?
Another question in regards to the suggested 'AuditTrail' approach.
If an attribute was updated by a Schedule System process, would this approach still work?
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact: