cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture the document access count.

vvm
Champ in-the-making
Champ in-the-making
How can we capture the  count of number of times an artifact uploaded has been accessed.

Please let me know, as in the  system there is no physical location where the document is getting stored up.
7 REPLIES 7

mabayona
Champ on-the-rise
Champ on-the-rise
there are two ways you can do it:

1) using the audit service

or

2) with a custom behavior that increments a counter each time the document is accessed

the easier way is using the audit service.

vvm
Champ in-the-making
Champ in-the-making
Thanks for the reply.

Will try that out and let u know.

vvm
Champ in-the-making
Champ in-the-making
Kindly let us know how to enable audit service…..

Please let me know …..

mabayona
Champ on-the-rise
Champ on-the-rise

alexander
Champ in-the-making
Champ in-the-making
I did found that read audit is not working on latest head (first week of July) as well on Enterprise 2.2 with Oracle. I saw similar bug for Postgres.

If I turn on debugging I get:

12:48:22,109 DEBUG [repo.audit.AuditComponentImpl] Auditing - ContentService.getReader
12:48:22,109 DEBUG [repo.audit.PublicServiceIdentifierImpl] Cached look up for ContentService.getReader
12:48:22,109 DEBUG [audit.model.MethodAuditEntry] Evaluating if method is audited …ContentService.getReader
12:48:22,109 DEBUG [audit.model.AbstractAuditEntry] … …  audit mode is = ALL
12:48:22,109 DEBUG [audit.model.AbstractAuditEntry] … Effective audit mode is = ALL
12:48:22,109 DEBUG [repo.audit.PublicServiceIdentifierImpl] Cached look up for ContentService.getReader
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl arg2 is of length 1024
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl arg1 is of length 1024
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl clientInetAddress is of length 1024
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl exception is of length 1024
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl hostInetAddress is of length 1024
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl message is of length 1024
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl nodeUUID is of length 36
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl path is of length 512
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl returnValue is of length 1024
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl sessionId is of length 56
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl storeId is of length 100
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl storeProtocol is of length 50
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl transactionId is of length 56
12:48:22,109 DEBUG [audit.hibernate.HibernateAuditDAO] org.alfresco.repo.audit.hibernate.AuditFactImpl userId is of length 255

but nothing is written in alf_AuditFact table.

Alexander

vvm
Champ in-the-making
Champ in-the-making
we are able to populate alf_audit_fact table using alfresco1.4 version anb mysql………..

Can you  please let us know if the there any way by which reports can be generated for getting the access counts  for documents or we need to fire queries?

mabayona
Champ on-the-rise
Champ on-the-rise
You can get this information via a custom reports (e.g. using a *.ftl script or running a JS script). a sample one can be found in:

/Data Dictionary/Presentation Templates/show_audit.ftl