<?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: Update date in automation chain in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318028#M5029</link>
    <description>&lt;P&gt;Hello Delphine,&lt;/P&gt;
&lt;P&gt;&lt;A href="http://answers.nuxeo.com/questions/321/condition-in-an-automation-chain" target="test_blank"&gt;http://answers.nuxeo.com/questions/321/condition-in-an-automation-chain&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jan 2013 14:36:08 GMT</pubDate>
    <dc:creator>Antoine_Cordier</dc:creator>
    <dc:date>2013-01-17T14:36:08Z</dc:date>
    <item>
      <title>Update date in automation chain</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318027#M5028</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I need update a date when I created and updated a doc. For that, we make &lt;A href="http://doc.nuxeo.com/display/Studio/Fetch+documents+with+a+query+on+date+parameters"&gt;this automation chain&lt;/A&gt; :&lt;BR /&gt;/&amp;gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Fetch &amp;gt; Context Document
Document &amp;gt; Update Property (value: @{Document["mydocumenttype:expiring_date"].clone()}; xpath: mydocumenttype:recall_expiring_data; save: true)
Scripting &amp;gt; Run Script (Document[ 'mydocumenttype:recall_expiring_data'].add(2,-Document["mydocumenttype:duree_preavis"]);)
Document &amp;gt; Save
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It's ok for created a document but if I use this automation chain when document updated, it loop !&lt;/P&gt;
&lt;P&gt;So I  want create an other automation chain when document updated which :&lt;BR /&gt;/&amp;gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;test if
Document['mydocumenttype:recall_expiring_data']
!=
Document['mydocumenttype:expiring_data'].add(2,-Document["mydocumenttype:duree_preavis"]&lt;/LI&gt;
&lt;LI&gt;if different then I update "recall_expiring_data" with Document[ 'mydocumenttype:recall_expiring_data'] = Document['mydocumenttype:expiring_data'].add(2,-Document["mydocumenttype:duree_preavis"]);)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;What is the syntax for this test ?&lt;/P&gt;
&lt;P&gt;Thanks in advance !&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2013 15:42:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318027#M5028</guid>
      <dc:creator>delphine_</dc:creator>
      <dc:date>2013-01-14T15:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Update date in automation chain</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318028#M5029</link>
      <description>&lt;P&gt;Hello Delphine,&lt;/P&gt;
&lt;P&gt;&lt;A href="http://answers.nuxeo.com/questions/321/condition-in-an-automation-chain" target="test_blank"&gt;http://answers.nuxeo.com/questions/321/condition-in-an-automation-chain&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2013 14:36:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318028#M5029</guid>
      <dc:creator>Antoine_Cordier</dc:creator>
      <dc:date>2013-01-17T14:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update date in automation chain</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318029#M5030</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2013 11:44:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318029#M5030</guid>
      <dc:creator>delphine_</dc:creator>
      <dc:date>2013-01-18T11:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Update date in automation chain</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318030#M5031</link>
      <description>&lt;P&gt;Hello Delphine, you're right, this operation is not provided anymore but as you can see there's a Run Chain operation. Maybe you can use separated chains and call one or the other with the ternary operator ?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2013 12:03:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318030#M5031</guid>
      <dc:creator>Antoine_Cordier</dc:creator>
      <dc:date>2013-01-18T12:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Update date in automation chain</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318031#M5032</link>
      <description>&lt;P&gt;Thank you !!!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2013 13:15:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/update-date-in-automation-chain/m-p/318031#M5032</guid>
      <dc:creator>delphine_</dc:creator>
      <dc:date>2013-01-18T13:15:49Z</dc:date>
    </item>
  </channel>
</rss>

