<?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 Problem deleting node with rules in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282312#M235442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a new question. I passed most of my day on this problem and I'm out of solution. It's a little bit complexe but I will try to explain simply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I had a node with rules. Rules are create programmaticaly when a specific association is create by a custom behavior. Those rules are not add on the folder associated but on a parent folder and are use to move content in the subfolder depending on a property. It's like a dispatch, we say if subfolder has this association then move all content from parent folder in this subfolder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the other hand I equally had my behavior whose delate my rules if association is deleted. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This behaviour and rule work correctly (or I think so) and are not the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem is when I want to delete the parent folder (the one with the rule) then I have a error and nothing append:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception from executeScript - redirecting to status template error: Node does not exist: workspace://SpacesStore/94261b21-70d7-4dc6-9e18-4cb5672876a0(Status[id=98929changeTxnId=383e90d6-0cdb-4568-ade1-2eb6040e30f8, dbTxnId=3819, deleted=true])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/94261b21-70d7-4dc6-9e18-4cb5672876a0(Status[id=98929changeTxnId=383e90d6-0cdb-4568-ade1-2eb6040e30f8, dbTxnId=3819, deleted=true])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I delete rules or if I delete the subfolder, then I could delete my parent folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I absolutely not understand where this error come from. Can anybody help me please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Apr 2014 17:43:26 GMT</pubDate>
    <dc:creator>guiguik</dc:creator>
    <dc:date>2014-04-02T17:43:26Z</dc:date>
    <item>
      <title>Problem deleting node with rules</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282312#M235442</link>
      <description>Hi guys,I have a new question. I passed most of my day on this problem and I'm out of solution. It's a little bit complexe but I will try to explain simply.So I had a node with rules. Rules are create programmaticaly when a specific association is create by a custom behavior. Those rules are not add</description>
      <pubDate>Wed, 02 Apr 2014 17:43:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282312#M235442</guid>
      <dc:creator>guiguik</dc:creator>
      <dc:date>2014-04-02T17:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem deleting node with rules</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282313#M235443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Which webscript api are you using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;org/alfresco/cmis/descendants.delete //this one will just delete the node and it's descendant without any check operations&lt;BR /&gt;org/alfresco/cmis/tree.delete&amp;nbsp; // this one will do some check before deleting folder an its descendant, it may cause your error(I guess you are using this one).&lt;BR /&gt;org/alfresco/cmis/item.delete&amp;nbsp;&amp;nbsp; //this one just delete empty folder&amp;nbsp; if it has&amp;nbsp; more than one child,it cann't be deleted.&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 03:29:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282313#M235443</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-04-03T03:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem deleting node with rules</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282314#M235444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm using none of them, it's through share interface. I don't customize the delete action. And I add my rule and my behaviour on alfresco side with java api. But it's the same if I use the NodeService.delete() .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 06:36:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282314#M235444</guid>
      <dc:creator>guiguik</dc:creator>
      <dc:date>2014-04-03T06:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem deleting node with rules</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282315#M235445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In share delete a node(file and folder) will call one of following webscript api &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;DELETE /alfresco/service/slingshot/doclib/action/file/site/{site}/{container}/{path}&lt;BR /&gt;DELETE /alfresco/service/slingshot/doclib/action/folder/site/{site}/{container}/{path}&lt;BR /&gt;DELETE /alfresco/service/slingshot/doclib/action/file/node/{store_type}/{store_id}/{id}&lt;BR /&gt;DELETE /alfresco/service/slingshot/doclib/action/folder/node/{store_type}/{store_id}/{id}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;which will call ScriptNode.remove() method and eventually call&amp;nbsp; NodeService.delete() .So techinally delete the folder through share interface and NodeService.delete() will give you same result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In NodeService.delete(),the specified node's all descendants,associations will be deleted in same transaction.Since rules applied to a folder are saved as it's descendants，and you may create associations between node and other nodes. I guess it may cause a close loop or someting that make it impossible to delete all descendants,associations in one transaction.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 16:53:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282315#M235445</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-04-03T16:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem deleting node with rules</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282316#M235446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot kaynezhang for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yesterday I come to the same conclusion that it's a transaction problem and I think it come from my behavior. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have absolutely no idea how to correct that problem. I think I have to manage transaction in my behavior.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you help me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 08:54:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-deleting-node-with-rules/m-p/282316#M235446</guid>
      <dc:creator>guiguik</dc:creator>
      <dc:date>2014-04-04T08:54:30Z</dc:date>
    </item>
  </channel>
</rss>

