<?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 onContentUpdate behaviour throws internal error in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/oncontentupdate-behaviour-throws-internal-error/m-p/124475#M34027</link>
    <description>&lt;P&gt;Hi, I'm developing my own extension of Alfresco Community Service using the platform jar. I defined a custom behaviour for the `onContentUpdate` policy that does some logic whenever a node is updated (I need to make it work whenever I update it through a API request, the PUT /node{nodeId}/content using binary data) returning a boolean value. If that boolean is true, the method throws a `PermissionDeniedException`.&lt;/P&gt;&lt;P&gt;The problem is that, for some reason, this exception I throw is always wrapped on a 500 exception, thrown by the `ContentServiceImpl` class; to be precise, it is thrown a ContentIoException with the phrase `Failed to set content property on stream closure: ...`.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand what's going on here. It's like the property gets updated even if I don't want to. What could the problem be?&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2022 13:39:40 GMT</pubDate>
    <dc:creator>fsanna</dc:creator>
    <dc:date>2022-05-23T13:39:40Z</dc:date>
    <item>
      <title>onContentUpdate behaviour throws internal error</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/oncontentupdate-behaviour-throws-internal-error/m-p/124475#M34027</link>
      <description>&lt;P&gt;Hi, I'm developing my own extension of Alfresco Community Service using the platform jar. I defined a custom behaviour for the `onContentUpdate` policy that does some logic whenever a node is updated (I need to make it work whenever I update it through a API request, the PUT /node{nodeId}/content using binary data) returning a boolean value. If that boolean is true, the method throws a `PermissionDeniedException`.&lt;/P&gt;&lt;P&gt;The problem is that, for some reason, this exception I throw is always wrapped on a 500 exception, thrown by the `ContentServiceImpl` class; to be precise, it is thrown a ContentIoException with the phrase `Failed to set content property on stream closure: ...`.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand what's going on here. It's like the property gets updated even if I don't want to. What could the problem be?&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 13:39:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/oncontentupdate-behaviour-throws-internal-error/m-p/124475#M34027</guid>
      <dc:creator>fsanna</dc:creator>
      <dc:date>2022-05-23T13:39:40Z</dc:date>
    </item>
  </channel>
</rss>

