This document describes usage examples of conditions written in either of the following properties. Using conditional audit is part of Fine tuning K2B Audit. Conditions syntax can is described in Audit conditions syntax rules.
An application works with Products and needs to audit only those identified as "sensitive". Sensitive products have the ProductIsSensitive attribute set to true. Conditions written in the corresponding property are:
- Audit Insert Condition: ProductIsSensitive;
- Audit Update Condition: old(ProductIsSensitive) or ProductIsSensitive;
The condition is true if the product was or become a sensitive one.
- Audit Delete Condition: ProductIsSensitive;
The idea is to keep track of (audit) changes to product prices. Only one condition is needed for this.
- Audit update condition: old(ProductPrice) <> new(ProductPrice);
|