Alfresco is a very strong Open Source CMS currently in the market and it has proven its worth and solidified its position through various innovative concepts like hybrid architecture and adaptation of CMIS from starting. So, there is no doubt about its capability as CMS. It provides a very strong set of features which should be present in any good CMS. But I always come across one requirement, or rather, I say complaint, from customers that Alfresco does not provide any reporting feature out of box. Although it provide auditing feature though which you can enable auditing and log all activities of alfresco like login, logout, upload, download etc… It does not provide any feature though which different type of reports can be generated after analysis of repository.
Now the obvious question which pops up in anybody’s mind will be if Alfresco is so well weathered in providing all other advance features, why are they not providing this reporting feature? Actually problem is that they do not consider it as standard ECMS use-case they want to keep it open and allow customer to integrate with their favorite reporting tool with alfresco like pentaho.
One such integration is alfresco and pentaho. Alfresco Audit Analysis and Reporting (A.A.A.R.) solution integrates the Pentaho Suite (http://www.pentaho.com) which is most important Open Source Business Intelligence platform with Alfresco. This solution extract, store and query audit data together with the document/folder information at a very detailed level, with the goal to be useful to the end-user in a very easy way. To reach that goal, to make the data friendlier for the end-user, the data are published in reports in well-known formats (pdf, Microsoft Excel, csv, etc.) and stored directly in Alfresco as static documents organized in folders, versioned, authorized and published.
Let’s do this exciting Integration although you need to be patient and spend little bit of your time and energy for this I promise results will be really worthy.
- Pentaho Data Integration 5 (pdi-ce-5.0.1-stable.zip, please follow this tutorial).
- Pentaho Report Designer (pdi-ce-5.0.1-stable.zip) You will get all the assistance to install it over here
- Alfresco 4.X
Setting up environment
1) Install the right driver depending on your MySql Server version(mysql support jar), into the folders listed below:
- <DataIntegrationHome>/lib’ folder.
- <Pentaho_Home>/WEBINF/lib’ folder.
2) Try to run Kitchen.bat file to make sure it is running properly from data-integration installation directory.
3) Enable auditing in alfresco by following steps
Open <ALF_HOME>/shared/classes/alfresco-global.properties file
Add following entry to it.
# Alfresco Audit service
### FTP Server Configuration ###
Start server and hit following url
More details regarding auditing you can find here
Installation of AAAR
Download AAAR.zip file and extract it in one of your folder.
Extract it in one of the folder and run AAAR_Install.bar or .sh based on your environment. Following screen will appear you just need to click enter and check screen or logs for error during run.
Working with AAAR
Import data in AAAR data mart.
First we need to import all the audit data of alfresco from alfresco database into the pentaho datamart so that it could be processed by data mart for generation of report. It is fairly simple process
Just go to Folder where you had extracted AAAR and run AAAR_Import.bat file
During run you need to give answer to various question related to environment which are fairly simple and you know it all for sure.
Now that AAAR Data Mart is filled with the data, you can execute your first export of reports executing the ‘AAAR_Export’ script.
Go to AAAR folder and run ‘AAAR_Export.bat’
Check Pentaho database for exported results
The exported reports are listed in a database table you can manage to add, change or remove some reports from the process. To do this, simply update ‘dm_reports’ table with your target settings. Each row of the table represents one created report as described below.
If you find data available there that’s it you are done.
Login to alfresco share
Go to repository you will be able to see all reports generated in pdf format as shown below.
When you login to Alfresco share with Admin credentials and navigate to Repository Main Space you will see all generated documents.
Each of the reports image are as shown below.
Summary : We have seen how could we leverage Alfresco reporting by integrating Alfresco with AAAR which basically uses is Pentaho Reporting tool underneath. It successfully gives all reporting capabilities to Alfresco. This tool is basically created by Francesco Corti.