Audit. Administer Tools

Content:

Audit settings

Viewing Audit data

Audit settings

XafariBCAuditCfgModule provides administer the Audit at runtime. There are 2 strategies for the use of this module:

  • Add module to the business application. In this case, the administration function will be available in the target application.
  • The target business application is developed based on the use of a separate administration tool - Xafari Applications Support (XAS). In this case XafariBCAuditCfgModule should be added to XAS.

This module adds Audit group to the Navigation Items. Administer tools are provided by the XafariAuditedType_ListView. It displays a list of all the types for which an Audit is available (i.e. types that implement the IAuditSupport interface). If DataAccessMode field of the XafariAuditedType_ListView is "Client", then the administrator can group the elements of the list, set filters.

audit_2

There are a number of the special Actions on the View:

  • Apply audit settings: apply current settings for types.
  • Refresh Audit Settings: refresh the settings, update the structure of the audited types and add new ones, if such appeared.
  • Disable Audit: delete all Audit triggers from the database.
  • Enable Audit For Types: mark selected types (and all aggregated in them) to be enabled for Auditing, but does not apply the settings.

audit_5

Invoke Detail View to customize certain type.

audit_3

Audited type Detail View displays the following fields:

  • Full Name: full system name of the audited type.
  • Audit Enabled: completely enable (disable) Audit for type. Tis setting has the highest priority, i.e. if you enable Audit of all properties and set Audit Enabled to false, then Audit will be disabled.
  • Type: gets type program name.
  • Audit Mode: full or light. Light Audit fixes only the fact of changing the value. Full Audit logs all changed values.
  • Audited Actions. There are three types of events available for auditing: Creation, Modification and Deletion. You can set any combination.
  • Properties lists all properties of type. It allows check (uncheck) Audit for each property separately. List displaws visible and persistent properties, persistent collections. Non persistent collections will be visible only if they are implemented with  Weak References mechanism. Furthermore, collection objects must implement IAuditSupport interface. If the flag DIsAggregated == true, then the object is audited as an aggregated.

Application can not only audit types, but some of the events in the system. Management of these features are available in the administrator settings, see Settings|Audit settings node.

audit_4

Node provides the following flags:

  • AuditActions: register (or not) all execution of Actions by the user, it applies to both context-dependent and non context Actions.
  • AuditBusinessOperations: register (or not) all starts (or rollbacks) of Business Operations by the user, it applies to both context-dependent and non context Business Operations. In the case of context-dependent Operations, all records refers to the context object (objects).
  • AuditLogIn: register all successful user LogIn.
  • AuditLogOut: register all successful user LogOut.
  • AuditReportsCreation: register (or not) all generation of Reports by the user.
  • UseSafeTriggers: use (or not) safe triggers when works with Xafari.BC.Audit.Triggers module.

NumberReturningObjects property specifies a count of objects which will be dispalyed when viewing Audit data.

Viewing Audit data

There are 2 scenarios viewing Audit data:

  • Focus certain object and examine it's history.
  • Inspect common Audit data.

All types that implement IAuditSupport, supports Audit. List View and Detail View of such objects contains a special "Show Audit Data" Action.

audit_6

The image below shows Audit Data Viewer for certain object.

audit_7

View history of changes of the current object is available as administrator and user.

Top of the form displays editor that allows you to go to the Detail View of the inspected object.

Below is placed a list of operations with the object. Records for the object is retrieved from the general log. Each record contains the date of the event registration, the name of the operation (what happened to the object), the user who made the operation.

Below is yet another list, it displays audited properties, it contains 3 columns: field name, old value and new value. If the object was just modified, the list is displayed with a filter that selects only the modified fields. If object was created, then the list will only display the new value fields, and if deleted - it is only the old. If you specify a light Audit mode for the type, the second list will not be displayed.

audit_8

Dynamic Properties and collections allows to inspect all included objects. Dynamic Properties and collections are displayed as links, click link and invoke new View which displays Audit data about elements in collection. In order to distinguish Dynamic Properties and collections of ordinary fields, Dynamic Properties stand braces and collection are distinguished by angle brackets.

Common Audit data allows you to see changes in all of the audited objects in system. This feature is intended primarily for system administrators.

audit_10

There are to lists within View: list of operations on objects, and a list of fields of the selected object. List of operations provides following columns:

Date specifies the date of the event registration the name of the operation (what happened to the object);

Operation specifies the name of the operation (what happened to the object);

User Name: specifies the user who made the operation;

Type: specifies the type of the object that initiated the recording to log;

Object: specifies the object that initiated the recording to log;

The rest of the behavior of View is the same as when viewing Audit for the object. Also on both View for persistent values it is possible to invoke Detail View of the persistent object.