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="http://www.alfresco.org/model/audit/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

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

<bean id="auditConfiguration" class="org.alfresco.repo.audit.AuditConfigurationImpl">
<property name="config">
<value>alfresco/extension/auditConfig.xml</value>
</property>
</bean>
</beans>
--------------------------------------------------------------------------------------------------

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

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

log4j.logger.org.alfresco.repo.audit.model=DEBUG


also you can enable alfresco-global.properties 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>

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


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

33 comments:

  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?

    Thanks!

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

    just check out these links may helpful to you.

    http://forums.alfresco.com/en/viewtopic.php?f=19&t=19014

    http://wiki.alfresco.com/wiki/Auditing_(Up_to_V3.2)#MYSQL_samples

    ReplyDelete
  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!

    ReplyDelete
  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.

    thanks.

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

    ReplyDelete
  6. thanq spam. it will work for 3.3 also, other wise once add the below code in
    alfresco-global.properties

    audit.useNewConfig=true ,


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

    good luck.

    ReplyDelete
  7. I still had problems using that code. My answer was found on this link: http://issues.alfresco.com/jira/browse/ALF-2222?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel

    It just requires overwritting the auditConfig.xml and adding:
    # Audit configuration
    audit.enabled=true
    audit.useNewConfig=false

    to tomcat\shared\classes\alfresco-global.properties file.

    Open it helps.

    ReplyDelete
  8. 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.
    Regards

    ReplyDelete
  9. 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.

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


    alfresco workflow

    ReplyDelete
  11. Nice Blog,I feel like all your ideas are incredible! Great job!!!
    I have some information about:

    Prestige High Fields
    Prestige Tranquil
    Pbel City

    ReplyDelete
  12. The Maxi-Shutter Roller Shutters Doors, Roller Garage Doors, Roll Up Doors And Roller Doors offer security to all residential, industrial, premises: (Leading South Africa And Africa) This includes Residential, Commercial, Industrial Premises, Garage Doors, Roll Up Doors or Roller Doors.

    Roller Shutters

    ReplyDelete
  13. Nice article thanks for sharing with us...& I have some information about Urbanrise Talk of Hyderabad is a new project located in Bachupally, Miyapur. It provides 2,3 & 4 BHK Luxury residences available for sale in affordable prices.

    Urbanrise Talk Of Hyderabad
    Urbanrise Talk Of Hyderabad Bachupally
    Urbanrise Talk Of Hyderabad Miyapur

    ReplyDelete
  14. Real Estate, Property Portal in Bangalore and Hyderabad Helping customers on which property best suits their individual and family needs.
    Location is in Hyderabd
    Plot No: 56, Flat No: 201,
    Siddhartha Residency, Kavuri Hills,
    Beside Jubilee Ridge Hotel, Madhapur, Hyderabad- 500033.
    Phone No: 040-65300003,65400004.

    ReplyDelete
  15. SNR The Elite is developed by SNR Avenue, Located in Gopanpally, Hyderabad.
    SNR Avenues is India’s speedy developing assets improvement company. Our attention is at the improvement of top rate residential & business properties, which deal with the necessities of our clientele.
    It is provides 2 & 3 bhk luxury flats available for sale in Affordable prices.
    Call +91-7070707098

    ReplyDelete
  16. vasavi atlantis is a new under construction project Narsingi near Gachibowli, Hyderabad. One of the top most leading company in India "Vasavi Constructions LLP" comes with their new project Vasavi Atlantis in Narsingi.Vasavi Constructions LLP mainly focuses on design and quality. This project is constructed very careful manner with latest technologies and modern designs. This project is situated in Narsingi, one of the fast growing areas in Hyderabad. Narsingi is considered as one of the prestigious location in Hyderabad. It has good road connectivity to all the major locations.

    ReplyDelete
  17. SMR Vinay Iconia in Kondapur , Hyderabad is a residential complex that has 2 bhk , 3 bhk,& 4 bhk apartments for sale. SMR HOLDINGS is currently working on this project with 22 acre residential community and units ranging in size from 1245 to 2950 sqft. SMR Vinay Iconia is available in very affordable prices and was released in august 2019 with December 2022 possession date. It has the most up-to-date technology and is luxury gated community project connecting to the express highway. This project has 2550 Units with G+ 35 floors. It has easy access to major facilties such as hospitals, shopping malls, restaurants, educational institutes, hotels etc.

    ReplyDelete
  18. Buy Wholesale Beauty Products.Online shopping destination to shop based on your persona. Buy beauty products online at best prices.

    ReplyDelete
  19. Thank you for this blog this is really nice about real estate and I am also share some information with you about SNR The Elite is developed by SNR Avenue, Located in Gopanpally, Hyderabad. SNR Avenues is India’s speedy developing assets Improvement Company. SNR Avenues attention is at the improvement of top rate residential & business properties, which deal with the necessities of our clientele. It is provides 2 & 3 bhk luxury flats available for sale in Affordable prices. Call +91-7070707098

    ReplyDelete
  20. Nice Blog, I feel like all your ideas are incredible! Great job!!! Aim also share some information with you about SNR The Elite is developed by SNR Avenue, Located in Gopanpally, Hyderabad. SNR Avenues is India’s speedy developing assets Improvement Company. SNR Avenues' attention is on the improvement of top-rate residential & business properties, which deal with the necessities of our clientele. It provides 2 & 3 bhk luxury flats available for sale at affordable prices. Call +91-7070707098

    ReplyDelete
  21. Top 10 best luxury & Most expensive hotels in USA 2022

    USA is the dream destination for most of the people for different reasons. Most people want to live in United States of America. Many want to migrate to this powerful nation hoping for a better life, better education, better living and so on. Even if someone is don’t want to settle in America but they at-least want to visit USA as a tourist and experience the beauty of the country. It is considered as USA as one of the most powerful as well as wealthiest country and cost of living is expensive too.

    ReplyDelete