<?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 Integrity Violations in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/integrity-violations/m-p/150365#M105248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been reading a book about Alfresco Enterprise Content Management by Munwar Shariff. In this book a scripting example is given:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;——————————————————————————————&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;var stagingFolder = companyhome.childByNamePath("Intranet/Marketing&lt;BR /&gt;Communications/Website Documents/Staging");&lt;BR /&gt;var productionFolder = companyhome.childByNamePath("Intranet/Marketing&lt;BR /&gt;Communications/Website Documents/Production");&lt;BR /&gt;if(stagingFolder != null)&lt;BR /&gt;{&lt;BR /&gt;var i=0;&lt;BR /&gt;var today = new Date();&lt;BR /&gt;stagingChildren = stagingFolder.children;&lt;BR /&gt;stagingTotal = stagingChildren.length;&lt;BR /&gt;for(i=0; i&amp;lt;stagingTotal;i++)&lt;BR /&gt;{&lt;BR /&gt;child = stagingChildren&lt;EM&gt;;&lt;BR /&gt;if(child.properties["cm:from"] &amp;lt;= today)&lt;BR /&gt;{&lt;BR /&gt;child.move(productionFolder);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;——————————————————————————————&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when I try to implement this script I get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;——————————————————————————————&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Failed to run Actions due to error: Found 1 integrity violations: The association parent multiplicity has been violated: Target Node: workspace://SpacesStore/b5b0189a-1487-11dd-b98a-a3150a38c112 Association: Association[ class=ClassDef[name={&lt;A href="http://www.alfresco.org/model/rule/1.0}rules" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/rule/1.0}rules&lt;/A&gt;], name={&lt;A href="http://www.alfresco.org/model/rule/1.0}ruleFolder" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/rule/1.0}ruleFolder&lt;/A&gt;, target class={&lt;A href="http://www.alfresco.org/model/content/1.0}systemfolder" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}systemfolder&lt;/A&gt;, source role=null, target role=null] Required parent Multiplicity: 1..1 Actual parent Multiplicity: 0&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;——————————————————————————————&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What's the problem here. How can this be solved?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yusuf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Apr 2008 13:41:43 GMT</pubDate>
    <dc:creator>yusuf</dc:creator>
    <dc:date>2008-04-28T13:41:43Z</dc:date>
    <item>
      <title>Integrity Violations</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/integrity-violations/m-p/150365#M105248</link>
      <description>Hi all,I've been reading a book about Alfresco Enterprise Content Management by Munwar Shariff. In this book a scripting example is given:——————————————————————————————var stagingFolder = companyhome.childByNamePath("Intranet/MarketingCommunications/Website Documents/Staging");var productionFolder =</description>
      <pubDate>Mon, 28 Apr 2008 13:41:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/integrity-violations/m-p/150365#M105248</guid>
      <dc:creator>yusuf</dc:creator>
      <dc:date>2008-04-28T13:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Integrity Violations</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/integrity-violations/m-p/150366#M105249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem is that the script tries to moves the rules system folder attached to the staging folder, which is not permitted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You should add a condition on the children to move.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In example :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;…&lt;BR /&gt;if(child.isDocument &amp;amp;&amp;amp; child.properties["cm:from"] &amp;lt;= today)&lt;BR /&gt;{&lt;BR /&gt;child.move(productionFolder);&lt;BR /&gt;}&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;Denis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 10:16:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/integrity-violations/m-p/150366#M105249</guid>
      <dc:creator>dgenard</dc:creator>
      <dc:date>2008-04-29T10:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Integrity Violations</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/integrity-violations/m-p/150367#M105250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Denis,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the solution. It worked great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Been using scripting from version 1.4 and i geuss they have changed a lot in version 2.1&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 12:02:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/integrity-violations/m-p/150367#M105250</guid>
      <dc:creator>yusuf</dc:creator>
      <dc:date>2008-05-02T12:02:56Z</dc:date>
    </item>
  </channel>
</rss>

