AnsweredAssumed Answered

Issue with audit 3.4

Question asked by andersonm on Aug 25, 2011
Latest reply on Sep 7, 2011 by jneeve
Hi all,

Excuse me for my English.

I'm trying to use the new auditing 3.4. I want to persist the audit always that an user consult a document.
I'm able to do this, but not all consultations, only the first consult in each document. E.g., an user creates a document and download it, then it is audited, but if either the same or another user download the same document again, it isn't audited.

So far, I did this:

1  Enabled the audit in the

# Enable audit in general

# Enable the alfresco-access audit application

# Enable the auditing of sub-actions. Normally disabled as these values are
# not normally needed by audit configurations, but may be useful to
# developers

2 Created a file alfresco-audit-document.xml, placed it in <TOMCAT_HOME>/shared/classes/alfresco/extension/audit, and populated it with the follow code:

<?xml version='1.0' encoding='UTF-8'?>

    <!– Node Functions –>

        xsi:schemaLocation=" alfresco-audit-3.2.xsd"

      <DataExtractor name="simpleValue" registeredName="auditModel.extractor.simpleValue"/>
      <DataExtractor name="nodeName" registeredName="auditModel.extractor.nodeName"/>
      <DataExtractor name="nodeType" registeredName="auditModel.extractor.nodeType"/>

           <DataGenerator name="personFullName" registeredName="auditModel.generator.personFullName"/>
           <DataGenerator name="currentUser" registeredName="auditModel.generator.user"/>
           <DataGenerator name="systemTime" registeredName="auditModel.generator.time"/>

            <PathMap source="/alfresco-api/post/ContentService/getReader" target="/document/read"/>

        <Application name="AuditDocument" key="document">          
            <AuditPath key="read">
                <AuditPath key="no-error">
                    <RecordValue key="document" dataExtractor="nodeName" dataSource="/document/read/args/nodeRef"/>
                    <GenerateValue key="user" dataGenerator="personFullName"/>
                <AuditPath key="error">
                    <RecordValue key="document" dataExtractor="nodeName" dataSource="/document/read/args/nodeRef"/>
                    <GenerateValue key="user" dataGenerator="personFullName"/>

With this, I use the command "curl -u admin:admin "http://localhost:8080/alfresco/service/api/audit/query/AuditDocument?verbose=true"" and get a result like this:


It's ok, but have the problem described above.

I'm using alfresco commmunity 3.4.

Hope I could be clear.

Best regards.