View source | View content page | Page history | Printable version   

Projects:Audit Trail/Technical Documentation


DB Structure


The following additions are needed:


Generated trigger per each audited table will populate the audit trail table.

These triggers will be executed whenever a modification (insert, update or delete) happens in any of the audited table. The actions the trigger will do are:

Triggers will be named starting by AU_. AU will be register as part of the core DBPrefixes and DBSM will not take elements starting by this dbprefix as part of the actual model.

Generation process

These triggers will be automatically generated. The process for generating triggers should be executed whenever occurs one of the following events:

Depending on how long takes this process to finish, it could be invoked each time a compilation is done (in case the process is fast). If not it would be manually callable from menu, and it would be automatically called after database creation and update.

Tracking session actions

In order to be able to save the action the modification was done from (process, window, etc...), it would be necessary to keep track of session actions.

This would be done in org.openbravo.base.secureApp.HttpSecureAppServlet.service method for general servlets. There are two possible approach for this:

Because of the way org.openbravo.base.secureApp.HttpSecureAppServlet.service works (obtaining the information from the java class of the servlet that is being executed), it is not possible to determine there standard UI processes. Therefore for these processes a new method to set it manually should be created.

Passing session info to DB

Triggers must know some information (user, session id...) from the context session. This information will be saved in a database session temporary table whenever a connection to database is obtained. This will require to add this capability to all ConnectionProvider implementations, as well as to DAL's connection.

Retrieved from ""

This page has been accessed 5,962 times. This page was last modified on 8 June 2012, at 05:26. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.