<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DataGenerators not working in my Audit applications in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/datagenerators-not-working-in-my-audit-applications/m-p/120193#M33040</link>
    <description>&lt;P&gt;As far as I can remember from the last time I wrote an audit application, generators are only triggered if a key-value entry is contained in the inbound value map that exactly matches the path of the enclosing AuditPath element. It does not suffice if a value exists that matches a the path of a RecordValue in the same AuditPath. You can see this in the default alfresco-access audit application. There they map /alfresco-api/pre/ticketComponent/invalidateTicketById/args - which is the full map of named arguments (they are not split into separate paths each) - to /alfresco-access/logout which is an AuditPath that contains a GenerateValue element.&lt;/P&gt;
&lt;P&gt;One could say this is a rather "stupid" / naiive implementation by Alfresco, or even a hack, but you have to keep in mind that auditing was never really developed to be extensible / used for anything else than the defaults that Alfresco provides (admitted that way to me by an Alfresco engineer at a DevCon / Summit conference), so as long as it worked for them, they were fine and did not consider other uses.&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 08:09:20 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2021-05-21T08:09:20Z</dc:date>
    <item>
      <title>DataGenerators not working in my Audit applications</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/datagenerators-not-working-in-my-audit-applications/m-p/120192#M33039</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;For example, imagine I have this audit application :&lt;/P&gt;&lt;PRE&gt;&amp;lt;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"
&amp;gt;
    &amp;lt;DataExtractors&amp;gt;
        &amp;lt;DataExtractor name="simpleValue" registeredName="auditModel.extractor.simpleValue" /&amp;gt;
    &amp;lt;/DataExtractors&amp;gt;
    &amp;lt;DataGenerators&amp;gt;
       &amp;lt;DataGenerator name="personFullName" class="org.alfresco.repo.audit.generator.AuthenticatedPersonDataGenerator"/&amp;gt;
    &amp;lt;/DataGenerators&amp;gt;
    &amp;lt;PathMappings&amp;gt;
        &amp;lt;PathMap source="/alfresco-access" target="/acme" /&amp;gt; 
    &amp;lt;/PathMappings&amp;gt;
    &amp;lt;Application name="acme" key="acme"&amp;gt;
        &amp;lt;GenerateValue key="fullname" dataGenerator="personFullName" /&amp;gt;
        &amp;lt;AuditPath key="transaction"&amp;gt;
            &amp;lt;RecordValue key="node" dataExtractor="simpleValue" dataSource="/acme/transaction/node"
                dataTrigger="/acme/transaction/node" /&amp;gt;
            &amp;lt;GenerateValue key="fullname" dataGenerator="personFullName" /&amp;gt;
            &amp;lt;GenerateValue key="action" dataGenerator="personFullName" /&amp;gt;
        &amp;lt;/AuditPath&amp;gt;
    &amp;lt;/Application&amp;gt;
&amp;lt;/Audit&amp;gt;&lt;/PRE&gt;&lt;P&gt;I would expect to have in the generated audit trace values a map of entrys like:&lt;/P&gt;&lt;PRE&gt;/acme/fullname: "Administrator"
/acme/transaction/node: "workspace://SpacesStore/what-ever"
/acme/transaction/fullname: "Administrator"
/acme/transaction/action: "Administrator"&lt;/PRE&gt;&lt;P&gt;But I just get:&lt;/P&gt;&lt;PRE&gt;/acme/transaction/node: "workspace://SpacesStore/what-ever"&lt;/PRE&gt;&lt;P&gt;I can't make any sense of it.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Shouldn't it just generate a value for the specified key and that's all? What am I missing ?&lt;/P&gt;&lt;P&gt;Has anyone ever used DataGenerators succesfully?&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 09:42:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/datagenerators-not-working-in-my-audit-applications/m-p/120192#M33039</guid>
      <dc:creator>iblanco</dc:creator>
      <dc:date>2021-05-20T09:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: DataGenerators not working in my Audit applications</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/datagenerators-not-working-in-my-audit-applications/m-p/120193#M33040</link>
      <description>&lt;P&gt;As far as I can remember from the last time I wrote an audit application, generators are only triggered if a key-value entry is contained in the inbound value map that exactly matches the path of the enclosing AuditPath element. It does not suffice if a value exists that matches a the path of a RecordValue in the same AuditPath. You can see this in the default alfresco-access audit application. There they map /alfresco-api/pre/ticketComponent/invalidateTicketById/args - which is the full map of named arguments (they are not split into separate paths each) - to /alfresco-access/logout which is an AuditPath that contains a GenerateValue element.&lt;/P&gt;
&lt;P&gt;One could say this is a rather "stupid" / naiive implementation by Alfresco, or even a hack, but you have to keep in mind that auditing was never really developed to be extensible / used for anything else than the defaults that Alfresco provides (admitted that way to me by an Alfresco engineer at a DevCon / Summit conference), so as long as it worked for them, they were fine and did not consider other uses.&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 08:09:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/datagenerators-not-working-in-my-audit-applications/m-p/120193#M33040</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-05-21T08:09:20Z</dc:date>
    </item>
  </channel>
</rss>

