<?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: Rule (and its script) not working as expected in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/rule-and-its-script-not-working-as-expected/m-p/279165#M232295</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How did you define this property in your data model? That is probably your issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or try passing the parseInt(maxContractNumber + 1) to the property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, as a suggestion, you can make a property, or even a simple file or something on the data dictionary. Keep the max contract Id there. That way your script will run fast even when there are thousands of contracts already (as you're now looping them all).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So basically you have a file and it's property (could be anything, even in a page title.). Then in this script just go, fetch that number, increment it by 1, and assign it to the next contract. As an added value, you can even manually change the max contract number from there, or 'rewind' the counter if needed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Aug 2013 20:55:39 GMT</pubDate>
    <dc:creator>zladuric</dc:creator>
    <dc:date>2013-08-20T20:55:39Z</dc:date>
    <item>
      <title>Rule (and its script) not working as expected</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rule-and-its-script-not-working-as-expected/m-p/279162#M232292</link>
      <description>I have created a folder and a rule for this folder which will, upon file creation:- change the node to a new content type (which is a child of cm:content); and- execute a little script which is meant to populate two of its properties:var results=search.luceneSearch("+PATH:\"/app:company_home/st:site</description>
      <pubDate>Mon, 19 Aug 2013 20:52:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rule-and-its-script-not-working-as-expected/m-p/279162#M232292</guid>
      <dc:creator>srowsell</dc:creator>
      <dc:date>2013-08-19T20:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Rule (and its script) not working as expected</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rule-and-its-script-not-working-as-expected/m-p/279163#M232293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Add this line in the end&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;document.save();&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 05:19:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rule-and-its-script-not-working-as-expected/m-p/279163#M232293</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2013-08-20T05:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Rule (and its script) not working as expected</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rule-and-its-script-not-working-as-expected/m-p/279164#M232294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, that was it, thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another minor problem:&amp;nbsp; when I update that contractID property, I'm giving it an integer.&amp;nbsp; I even did this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;document.properties["contract:contractID"]=Math.round(maxContractNumber+1);&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;to make sure I was passing in an integer.&amp;nbsp; But the value I see in Alfresco is "3.0" or whatever.&amp;nbsp; Is there any way to make sure Alfresco takes an integer value, rather than a float/double/whatever?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 13:22:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rule-and-its-script-not-working-as-expected/m-p/279164#M232294</guid>
      <dc:creator>srowsell</dc:creator>
      <dc:date>2013-08-20T13:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rule (and its script) not working as expected</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rule-and-its-script-not-working-as-expected/m-p/279165#M232295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How did you define this property in your data model? That is probably your issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or try passing the parseInt(maxContractNumber + 1) to the property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, as a suggestion, you can make a property, or even a simple file or something on the data dictionary. Keep the max contract Id there. That way your script will run fast even when there are thousands of contracts already (as you're now looping them all).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So basically you have a file and it's property (could be anything, even in a page title.). Then in this script just go, fetch that number, increment it by 1, and assign it to the next contract. As an added value, you can even manually change the max contract number from there, or 'rewind' the counter if needed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 20:55:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rule-and-its-script-not-working-as-expected/m-p/279165#M232295</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2013-08-20T20:55:39Z</dc:date>
    </item>
  </channel>
</rss>

