<?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: Auditing search queries in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/auditing-search-queries/m-p/306504#M259634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks kaynezhang! Your comment reassured me that I wasn't doing anything wrong, so I continued investigating.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After debugging down the code through Eclipse, it turns out that the particular query() function being called is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public abstract org.alfresco.service.cmr.search.ResultSet org.alfresco.service.cmr.search.SearchService.query(org.alfresco.service.cmr.search.SearchParameters)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Audit subsystem, in this case the method getInvocationArguments from the AuditMethodInterceptor, tries to record the SearchParameters by calling getRecordableValue, but as it happens the class SearchParameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Is not Serializable, so we can't just save it as Serializable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Does not have a converter to String defined in DefaultTypeConverter, so we can't save it as String&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After these two options are exhausted, getRecordableValue gives up and tells us that the value is not auditable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, possible solutions would be…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Add a SearchParameters -&amp;gt; String converter, but that would need to be an Alfresco core change. Extending the DefaultConverter is not currently possible (cf. "TODO: Support for dynamically managing conversions" in DefaultTypeConverter.java)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Make SearchParameters Serializable, but it probably would be more work than needed for this particular issue&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In any case, there's no easy drop-in solution at this point I'm afraid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: I reported this issue in JIRA as &amp;lt;a href="&lt;/SPAN&gt;&lt;A href="https://issues.alfresco.com/jira/browse/ALF-21135" rel="nofollow noopener noreferrer"&gt;https://issues.alfresco.com/jira/browse/ALF-21135&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;ALF-21135&amp;lt;/a&amp;gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Oct 2014 04:10:02 GMT</pubDate>
    <dc:creator>florentdelannoy</dc:creator>
    <dc:date>2014-10-15T04:10:02Z</dc:date>
    <item>
      <title>Auditing search queries</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/auditing-search-queries/m-p/306502#M259632</link>
      <description>Hi,As part of a project, I need to be able to audit searches performed by users in Alfresco (running 4.2.f from the maven archetype).I've set up the Auditing subsystem, which works as advertised, but the SearchService is not part of the default alfresco-access application so I set out to create my o</description>
      <pubDate>Fri, 10 Oct 2014 02:57:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/auditing-search-queries/m-p/306502#M259632</guid>
      <dc:creator>florentdelannoy</dc:creator>
      <dc:date>2014-10-10T02:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Auditing search queries</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/auditing-search-queries/m-p/306503#M259633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems alfresco didn't extract invocation arguments correctly.it has nothing to do with your audit application,even if there is something wrong with&amp;nbsp; your audit application ,Alfresco should still can extract invocation arguments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm afraid there is something wrong with your alfresco environment.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 08:04:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/auditing-search-queries/m-p/306503#M259633</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-10-11T08:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Auditing search queries</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/auditing-search-queries/m-p/306504#M259634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks kaynezhang! Your comment reassured me that I wasn't doing anything wrong, so I continued investigating.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After debugging down the code through Eclipse, it turns out that the particular query() function being called is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public abstract org.alfresco.service.cmr.search.ResultSet org.alfresco.service.cmr.search.SearchService.query(org.alfresco.service.cmr.search.SearchParameters)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Audit subsystem, in this case the method getInvocationArguments from the AuditMethodInterceptor, tries to record the SearchParameters by calling getRecordableValue, but as it happens the class SearchParameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Is not Serializable, so we can't just save it as Serializable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Does not have a converter to String defined in DefaultTypeConverter, so we can't save it as String&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After these two options are exhausted, getRecordableValue gives up and tells us that the value is not auditable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, possible solutions would be…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Add a SearchParameters -&amp;gt; String converter, but that would need to be an Alfresco core change. Extending the DefaultConverter is not currently possible (cf. "TODO: Support for dynamically managing conversions" in DefaultTypeConverter.java)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Make SearchParameters Serializable, but it probably would be more work than needed for this particular issue&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In any case, there's no easy drop-in solution at this point I'm afraid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: I reported this issue in JIRA as &amp;lt;a href="&lt;/SPAN&gt;&lt;A href="https://issues.alfresco.com/jira/browse/ALF-21135" rel="nofollow noopener noreferrer"&gt;https://issues.alfresco.com/jira/browse/ALF-21135&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;ALF-21135&amp;lt;/a&amp;gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 04:10:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/auditing-search-queries/m-p/306504#M259634</guid>
      <dc:creator>florentdelannoy</dc:creator>
      <dc:date>2014-10-15T04:10:02Z</dc:date>
    </item>
  </channel>
</rss>

