Lesson 3: K2BAudit Advanced Features

Selecting what attributes to audit

Some attributes may not need to be audited as, for example, when their values are usually assigned by rules or code, not by the application user. Besides, some attributes may not be relevant to auditors.

All attributes of an audited Transaction have the Audit Attribute property. Setting this property lets you control what attributes must be audited.

  1. Go to Genexus and open the transaction "Product".
  2. Select "ProductDetailedDescription" and change the property "Audit Attribute" to "False".
    K2BAuditAuditAttribute
    Audit Attribute

  3. Click on K2BAudit option "Impact Audit Triggers".
    K2BAuditAuditImpactAuditTriggers
    Impact Audit Triggers

  4. Now the attribute "ProductDetailedDescription" is no longer audited.

Selecting what operations to audit

Developers can decide whether an operation (insert, update or delete) is audited for a given Transaction by setting the corresponding Audit insert property, Audit update property or Audit delete property.

  1. Go to Genexus and open the transaction "Customer".
  2. Inside "Customer" transaction properties, go to "K2BAudit" section and change "Audit Delete" condition to "False".
    K2BAuditAuditDelete
    Audit Delete

  3. Click on K2BAudit option "Impact Audit Triggers".
    K2BAuditAuditImpactAuditTriggers
    Impact Audit Triggers

  4. Now all the deletions done to "Customer" are no longer audited.

Selecting what changes to audit

In order to improve the quality of audited data and/or decrease the size of the audit database, some complex scenarios may require selecting what changes are audited.

For this purpose, K2B Audit lets the developer specify conditions that are evaluated when an audit record is going to be generated. If the condition evaluates to true, the audit record is generated. If it evaluates to false, it is not.

  1. Go to Genexus and open the transaction "Product".
  2. Inside "Product" transaction properties, go to "K2BAudit" section and inside "Audit Update Condition" place the following condition:
    K2BAuditAuditUpdateCondition
    Update Condition

  3. Click on K2BAudit option "Impact Audit Triggers".
    K2BAuditAuditImpactAuditTriggers
    Impact Audit Triggers

  4. Now the updates that modify the product price will be the only ones audited.