Hi,
Since I started working with Alfresco over 14 years ago I've read and reread Audit related documentation a ton of times and "more or less" I managed to make "some" sense of it. But one of the supposedly easiest parts of it still scape my understanding, DataGenerators.
For example, imagine I have this audit application :
<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>
<DataGenerators>
<DataGenerator name="personFullName" class="org.alfresco.repo.audit.generator.AuthenticatedPersonDataGenerator"/>
</DataGenerators>
<PathMappings>
<PathMap source="/alfresco-access" target="/acme" />
</PathMappings>
<Application name="acme" key="acme">
<GenerateValue key="fullname" dataGenerator="personFullName" />
<AuditPath key="transaction">
<RecordValue key="node" dataExtractor="simpleValue" dataSource="/acme/transaction/node"
dataTrigger="/acme/transaction/node" />
<GenerateValue key="fullname" dataGenerator="personFullName" />
<GenerateValue key="action" dataGenerator="personFullName" />
</AuditPath>
</Application>
</Audit>I would expect to have in the generated audit trace values a map of entrys like:
/acme/fullname: "Administrator"
/acme/transaction/node: "workspace://SpacesStore/what-ever"
/acme/transaction/fullname: "Administrator"
/acme/transaction/action: "Administrator"
But I just get:
/acme/transaction/node: "workspace://SpacesStore/what-ever"
I can't make any sense of it.
The doc says "data is produced when a data path is active," and in fact in the code I've seen that it is checking against the full keys of all mapped values, but I don't understand why and how this is supposed to be used. In fact my last attempt in the config where I am traying to map the full name to "action" tries to use a supposedly "activated path" but it doesn't work either.
Shouldn't it just generate a value for the specified key and that's all? What am I missing ?
Has anyone ever used DataGenerators succesfully?