AnsweredAssumed Answered

Audit Trail - Alfresco Multitenant

Question asked by ediez on May 13, 2009
Hi all,

Has anyone used the audit trail in an Alfresco multi-tenant environment?

Here's my situation:

I'm trying to build an audit trail report. It will retrieve info about the files within a specific tenant, let's say t1. I'm doing this by calling the getAuditTrail method but every time I invoke it I get null as result. If I perform the same operation on the 'original' tenant It works fine. I'm wondering how I could get the audit trail information from tenant 1. Here's the code snippet :


for ( ChildAssociationRef ref: this.nodeService.getChildAssocs(roSpace) ) {
            NodeRef month = ref.getChildRef();
            String monthName = (String)this.nodeService.getProperty(month, ContentModel.PROP_NAME);

            for ( ChildAssociationRef ref2: this.nodeService.getChildAssocs(month) ) {
                  NodeRef file = ref2.getChildRef(); //file is each one of the PDFs
                  String fileName = (String)this.nodeService.getProperty(file, ContentModel.PROP_NAME);

                  List<AuditInfo> oCAuditInfo = auditService.getAuditTrail(file); [b]//Error: This list is always empty for tenant t1, but it works fine for default tenant!!!!![/b]

                   for(AuditInfo auditInfo: oCAuditInfo){
                         if(auditInfo.getAuditMethod().equals("getReader")  || auditInfo.getAuditMethod().equals("list") )
                         {
                              //Generate Report
                         }
                   }
             }
       }


Any hints about this?

Thank you,

Outcomes