AnsweredAssumed Answered

Problems auditing nodes and own methods

Question asked by saruqui on Mar 8, 2012
Latest reply on Mar 20, 2012 by saruqui
Hi,

I have 2 questions about AuditService in Alfresco 4.
1. I don't have any problem auditing Alfresco's services but when I try to audit my own methods in my module I don't get any data about it.

My code is:
<?xml version='1.0' encoding='UTF-8'?>

<Audit xmlns="http://www.alfresco.org/repo/audit/model/3.2"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd">

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

        <PathMappings>
      <PathMap source="/alfresco-api/pre/ExtractorService/updateMetadata"  target="/Extractor" />
                <PathMap source="/alfresco-api/post/ExtractorService/updateMetadata"  target="/Extractor" />
        </PathMappings>

      <Application name="Extractor" key="Extractor">
      <AuditPath key="update">
            <AuditPath key="in">
                <RecordValue key="nodeRef" dataExtractor="simpleValue" dataSource="/Extractor/args/nodeRef" dataTrigger="/Extractor/no-error"/>                    
            </AuditPath>
            <AuditPath key="out">
                <RecordValue key="result" dataExtractor="simpleValue" dataSource="/Extractor/result" dataTrigger="/Extractor/no-error"/>            
            </AuditPath>         
   </AuditPath>      
    </Application>   
</Audit>



public interface ExtractorService {

   @Auditable(parameters={"nodeRef"})
   public ContentReader getContent(NodeRef nodeRef) throws ServiceException, IOException;
}

Any idea?


2. I have the following doubt. If I'm auditing nodeService, CheckoutCheckinService, permissionService, alfresco-access… and I want to know everything about a node. Are there any query,

service or anything for resolving it or do I need to create a query for everyone and then a merge about the results?

Thx in advance  :D

Outcomes