<?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: Programatically add entries to a document&amp;apos;s History tab in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/programatically-add-entries-to-a-document-apos-s-history-tab/m-p/313241#M242</link>
    <description>&lt;P&gt;You can also use the operation
&lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewOperation/Audit.Log" target="test_blank"&gt;http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewOperation/Audit.Log&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can use it from Studio, in an automation chain, or programmatically (calling the chain in java).&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2011 18:42:51 GMT</pubDate>
    <dc:creator>Alain_ESCAFFRE</dc:creator>
    <dc:date>2011-10-05T18:42:51Z</dc:date>
    <item>
      <title>Programatically add entries to a document&amp;apos;s History tab</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/programatically-add-entries-to-a-document-apos-s-history-tab/m-p/313239#M240</link>
      <description>&lt;P&gt;Is there a way to programatically add entries to a document's History tab, in a similar fashion to putting text into the Comment field at the bottom of the document's edit tab?&lt;/P&gt;
&lt;P&gt;I can see that these records end up in the nxp_logs table.  Is there an proper way to interact with this data?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2011 03:56:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/programatically-add-entries-to-a-document-apos-s-history-tab/m-p/313239#M240</guid>
      <dc:creator>mark_</dc:creator>
      <dc:date>2011-10-03T03:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically add entries to a document&amp;apos;s History tab</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/programatically-add-entries-to-a-document-apos-s-history-tab/m-p/313240#M241</link>
      <description>&lt;P&gt;We can first say, the Nuxeo audit system is simply implemented into database as a simple table that manage main fields audit entries (nxp_logs) and a second table that stores extended infos (nxp_logs_extinfo). Entries are simply manage by Hibernate framework.&lt;/P&gt;
&lt;P&gt;There is two ways to add an audit entry:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;throw custom event and ask to audit it. With this approach you can also attach listeners to your event.&lt;/LI&gt;
&lt;LI&gt;directly add the audit entry into the audit tables using hibernate.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For the first point, Nuxeo source code give examples of audit management. You can find these examples into unit tests &lt;A href="http://hg.nuxeo.org/nuxeo/nuxeo-features/file/18afe3bb83d7/nuxeo-platform-audit/nuxeo-platform-audit-core/src/test/java/org/nuxeo/ecm/platform/audit/TestNXAuditEventsService.java"&gt;here&lt;/A&gt;. You will find how to create events. To audit them (add a line into the audit table), you will just need to create a contribution that will ask to audit your type of events. see &lt;A href="http://hg.nuxeo.org/nuxeo/nuxeo-features/file/18afe3bb83d7/nuxeo-platform-audit/nuxeo-platform-audit-core/src/test/resources/test-audit-contrib.xml"&gt;here&lt;/A&gt;. If you need to add extended information you will find example, &lt;A href="http://hg.nuxeo.org/nuxeo/nuxeo-features/file/18afe3bb83d7/nuxeo-platform-audit/nuxeo-platform-audit-core/src/test/java/org/nuxeo/ecm/platform/audit/TestExtendedInfoEvaluation.java"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;For the second point, you will find example &lt;A href="http://hg.nuxeo.org/nuxeo/nuxeo-features/file/18afe3bb83d7/nuxeo-platform-audit/nuxeo-platform-audit-core/src/test/java/org/nuxeo/ecm/platform/audit/TestLogEntryProvider.java"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2011 16:18:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/programatically-add-entries-to-a-document-apos-s-history-tab/m-p/313240#M241</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2011-10-03T16:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically add entries to a document&amp;apos;s History tab</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/programatically-add-entries-to-a-document-apos-s-history-tab/m-p/313241#M242</link>
      <description>&lt;P&gt;You can also use the operation
&lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewOperation/Audit.Log" target="test_blank"&gt;http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewOperation/Audit.Log&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can use it from Studio, in an automation chain, or programmatically (calling the chain in java).&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2011 18:42:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/programatically-add-entries-to-a-document-apos-s-history-tab/m-p/313241#M242</guid>
      <dc:creator>Alain_ESCAFFRE</dc:creator>
      <dc:date>2011-10-05T18:42:51Z</dc:date>
    </item>
  </channel>
</rss>

