Audit
Last updated
Last updated
Data audit consists of listening to data writing (insert, update and delete operations) defined per table. Once activated that listening for a specified set of tables, Platform automatically record any change internally. After that, you can access to these records through the functionality Administration -> Audit.
The data audit is defined at table level: you can activate it through the object definition: here you can find the “Audit” subfolder.
The activation of the corresponding table audit is started by pressing the “Active” button. You can deactivate it through the “Remove definition” button.
More precisely, Platform will listen to data changes for:
insert/update/delete operations generated when the end user is working on grids or detail forms and he is using the
standard writing operations
(insert/edit button + save button or delete button on the toolbar)
server-side javascript actions including calls to utils.
insertObject/updateObject/deleteObject
Once you have activated the listening to changes on a specific object, you will see the whole list of object fields. For each one it is possible to enable/disable its listening and change then name linked to it, in case you want to customize the description associated to data changes.
In case you have definedrelationships among objects, the window described above will report also all linked objects, but only fields belonging to the current object have been enabled. You can easily enable fields for linked objects by clicking on the Edit button and then select the fields you are interested in (you can use the right click with the mouse to select all fields at once).
All changes to records under analysis will be recorded, in order to make it possible to see the changes.
The results of the data audit can be searched and shown through the Administration -> Audit functionality.
Through the “Find data logs” window you can monitor the changes applied to your database.
The first step is choosing one of theobjectsfor which the data audit has been enabled.
The results list on the right will report changes only for one record at a time. As a consequence, you have to select which record for that object you what to focus on. For that reason, you have to select one record: this is possible through the second input control available in this window, the “Selector” combo-box. This combobox reports all the selectors previously defined for the object under monitoring.
You have first to define one or more selectors for the object. These selectors must be dynamic comboboxes, working with business components linked to the current object. Once defined at least one of these selectors, you have to open the object detail, go to “Audit” folder and then to “Selectors” subfolder: here you have to include as many selectors as you want, related to that object.
Only when you have defined at least one of these selectors, you can choose one of them in the “Find data logs” window.
The last step before search for results is choosing a record: the third input field allows you to choose a record from the corresponding table. That input field is filled with the selector content defined at the previous step.
You can press “Search” button to show the results.
In case of objects having relationships defined between them, additional detail grids will be shown, as in the example above. Each grid always reports:
the current record in the database
all changes applied, from the most recent to the last recent
For each row, all data previously checked in the Audit folder is reported.
Moreover, the operation type (insert, update, delete) and change date-time is reported for each row.
Optionally, you can include additional filters: these are not applied to the record selected through the third input field, since you always choose a single record, so additional filters would be useless. These optional filters are applied to the additional detail grids described above, in order to limit the rows to report, to the only ones matching the filtering conditions.
Supported filtering conditions are:
User – choose a specific user, in interested to show only changes generated by that user
From date – set a date-time value to show only results next to the time
Operation type – use it to show only insert/update/delete operations
Field – use it to filter the results to the only ones matching for that field, the specified value