Thursday, December 10, 2009

Audit Configuration in Alfresco

Auditing is disabled by default, To enable auditing, some changes we need to made.
 here i explained in detailed where we need to change different audit related files.

go to auditConfig.xml, U can find this file in tomcat\webapps\alfresco\WEB-INF\classes\alfresco folder
change the value of enabled to true in place of false.

<Audit xmlns="" xmlns:xsi="" enabled="true" auditInternal="false" mode="all">
**and copy this file into extension folder.

Next go to extension folder in alfresco root i.e.,\tomcat\shared\classes\alfresco\extension\

create a new file, name it as a custom-audit-services-context.xml and add this below code
<?xml version='1.0' encoding='UTF-8'?>

<!-- The configuration of the audit model -->

<bean id="auditConfiguration" class="org.alfresco.repo.audit.AuditConfigurationImpl">
<property name="config">

to turn on debug for audit information change which is located in

\tomcat\webapps\alfresco\WEB-INF\classes      uncomment the line  which is shown below...

also you can enable which is located in \tomcat\shared\classes
#Audit Configuration
   audit.enabled = true

Also Enable file service and folder service in auditConfig.xml

<!-- The File/Folder Service -->

<Service name="FileFolderService" mode="none">
<Method name="rename" mode="all"/>
<Method name="move" mode="all"/>
<Method name="copy" mode="all" auditInternal="true"/>
<Method name="create" mode="all"/>
<Method name="delete" mode="all"/>
<Method name="makeFolders" mode="all"/>
<Method name="getWriter" mode="all"/>
<Method name="getReader" mode="all"/>

<Service name="ContentService" mode="none">
<Method name="getWriter" mode="all"/>
<Method name="transform" mode="all"/>
<Method name="getReader" mode="all"/>

Restart the server  you will find tomcat screen like shown below

and add some documents to alfresco change some properties for that  documents like opening,editing, and set permissions to that documents
Next go to ViewDetails on that document you have edited, click preview in template and select show_audit.ftl from the dropdown menu. you should be able to see all of the actions you just carried out on that document.
you will find the screen as shown below.

Bookmark and Share


  1. Hello Chandu. Thank you for writing this post.

    I have enabled auditing and I think it is working. We have setup some simple workflows that enable users to "approve" or "reject" a document (which moves into 4 possible document spaces). For a given document I would like to see all users who have "approved" the document. Any ideas how I can construct a query?


  2. use mysql quires to get the data as per our requirement.

    just check out these links may helpful to you.

  3. Hi,

    I just tried the way u mentioned in your blog but not able to get details in view details page.

    Any idea on it?Also can you please let me know on how i can use Java API to get list of content uploaded by a user in alfresco.

    Thanks a lot!

  4. Hey thanq, i am new to java., i know only js API, i will try to use java API. soon i will do it. will give reply after i done with that work.


  5. Nice tutorial, but i cant get it to work on version 3.3. Is the configuration that different?
    Best regards.

  6. thanq spam. it will work for 3.3 also, other wise once add the below code in

    audit.useNewConfig=true ,

    this is for new implementation of audit has been introduced into 3.2r n updated versions.

    good luck.

  7. I still had problems using that code. My answer was found on this link:

    It just requires overwritting the auditConfig.xml and adding:
    # Audit configuration

    to tomcat\shared\classes\ file.

    Open it helps.

  8. Thanks for the information, we will add this story to our blog, as we have a audience in this sector that loves reading like this” cms services

  9. Hi!
    Excelent article, but…Do you have information about auditing in Alfresco 3.4.b ? The file auditConfig.xml just doesnt exist :S... I’ll appreciate any help, info, examples about that.

  10. Thanks, its very well explained.
    Just one thing, for 3.3, in custom audit content services, add string in values tag as classpath:alfresco/extension/auditConfig.xml.

  11. Business users can easily complete form-driven processes through automated notifications and a web-based interface.

    alfresco workflow