Skip to content

Commit b74de58

Browse files
author
Augusto Passalaqua
authored
Add link to documentation
Merge pull request #16 from Adam-Dupaski/patch-1
2 parents d44dc39 + 4b53448 commit b74de58

1 file changed

Lines changed: 1 addition & 50 deletions

File tree

README.md

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1 @@
1-
# Audit Trail Module
2-
This module creates a log history for changes made to objects in your Mendix application.
3-
4-
## Typical Usage Scenario
5-
Keep track of when, by who, how much and what changes are made in your Mendix application.
6-
7-
## Features
8-
9-
* Keep track of objects that are created, changed or deleted.
10-
* Only saves changes made on an object that has the AuditTrail.AudittrailSuperClass as a superclass and where the commit is done with events (this could be a performance risk with to many entities or records.
11-
* Add a commit event which analysis and save the changes
12-
* Log the complete state of the entity (all attributes) or only the changed attributes bt modifying a constant
13-
14-
## Contributing
15-
For more information on contributing to this repository visit [Contributing to a GitHub repository](https://docs.mendix.com/howto/collaboration-project-management/contribute-to-a-github-repository)!
16-
17-
## Configuration
18-
19-
There are two possible ways of configuring the audi trail module.
20-
21-
1. Add events and an association
22-
2. Use a generalization for the entity to 'audit' and let the entity inherit from 'AuditTrail.AudittrailSuperClass'
23-
24-
Changing the audit behavior is easily done by altering the default values of the entity: Configuration
25-
26-
The following settings are configurable
27-
28-
* IncludeOnlyChangedAttributes [False]: Determines if the module should create a LogLine for every single Member every time it initiates the Audit, or should only the Changed Members be logged.
29-
* LogAllMembersOnCreate [True]: This property only effects the scenario when "IncludeOnlyChangedAttributes" = False. This indicates if the application will create a LogLine for all attributes when the record is created (regardless if the value changed).
30-
* IncludeCalculatedAttributes [False]: Should the module resolve calculated attributes and compare if the result has changed since the last commit.
31-
* CreateLogObjectWithoutMemberChanges [False]: If non of the Members have been changed do you want to have a Log record with only the fields changeddate and a changed by populated.
32-
* LogLineDateFormat [MM/dd/yyyy]: When auditing date fields the module will format the date as a string. This determines the notation for all the dates in the audit trail. This uses the same tokens as in microflow
33-
* LogServerTimeZoneDateNotation [True]: Should the date be audited in the 'Server Timezone'. If both the Session timezone and Server timezone are enabled you will see two dates in the audit overview.
34-
* ServerTimeZone [Etc/UTC]: The timezone in which the Server Timezone is printed. This will be a static timezone and should match the notation as used in Java. For example: "http://stackoverflow.com/questions/1694885/timezones-in-java"
35-
* LogSessionTimeZoneDateNotation [True]: Should the date be audited in the Session timezone of the user that makes the change. If both the session timezone and UTC timezone are enabled you will see two dates in the audit overview.
36-
37-
### Association & events:
38-
Add a reference set association from your entity to the 'AuditTrail.Log' entity or an association from the 'AuditTrail.Log' entity to the entity that needs to be audited.
39-
Add en After Create, Before Commit and Before Delete event to your entity identical to the events on the AudittrailSuperClass.
40-
The Java actions will automatically create the log item and all required loglines based on the changes
41-
Configure the constant: 'LogOnlyChangedAttributes' whether or not you want to log all attributes or just the changes
42-
- Add the snippet "LogOverviewSnippet' to a page in a custom module.
43-
44-
45-
### Inheritance:
46-
47-
All objects that you would like to log need to have the AuditTrail.AudittrailSuperClass as a superclass except the subclasses of the System.User object.
48-
The module automatically logs all changes on the create, commit and delete event.
49-
Configure the constant: 'LogOnlyChangedAttributes' whether or not you want to log all attributes or just the changes
50-
- Add the snippet "LogOverviewSnippet' to a page in a custom module.
1+
Please see [Audit Trail](https://docs.mendix.com/appstore/modules/audit-trail) in the Mendix documentation for details.

0 commit comments

Comments
 (0)