AnsweredAssumed Answered

Conditional Auditing

Question asked by esheehan on Sep 10, 2010
Is it possible to configure an audit (http://wiki.alfresco.com/wiki/Auditing_%28from_V3.2r%29) that only runs under certain conditions in Alfresco Enterprise 3.3?

We would like to keep track of changes made to the cm:categories property of nodes that have the cm:generalclassifiable aspect applied to them. Additionally we only care about categories below a specific cm:generalclassifiable sub-category. As far as I can tell from the wiki, the audit configurations packaged with Alfresco, and reading the audit code it's only possible to record all setProperty events or none. Is that correct?

It appears that each DataExtractor is run separately on the individual arguments for the auditable method, so we can't really use the isSupported method on the DataExtractors to filter our audit the way we'd like. For example: we could write a DataExtractor that gets applied to /alfresco-api/pre/NodeService/setProperty/args/qname, the isSupported method of this DataExtractor would return true only if the qname was cm:categories. But the DataExtractor we applied to the args/nodeRef audit path would have no knowledge of the qname or whether or not the qname DataExtractor was going to record a value for this particular event, so it would have no way of knowing whether or not it should record the nodeRef.


-Evan

Outcomes