<?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: How can I execute loop action with nuxeo-shell ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-execute-loop-action-with-nuxeo-shell/m-p/326218#M13219</link>
    <description>&lt;P&gt;Using groovy, you'll need to use nuxeo-core java api:
May be this can help you: &lt;A href="http://doc.nuxeo.com/x/VIdH" target="test_blank"&gt;http://doc.nuxeo.com/x/VIdH&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;doc = Session.createDocumentModel("/default-domain/workspaces","myWS,"Workspace");
doc.setPropertyValue("dc:title", "my WS");
Session.createDocument(doc);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 May 2012 17:10:20 GMT</pubDate>
    <dc:creator>Sun_Seng_David_</dc:creator>
    <dc:date>2012-05-23T17:10:20Z</dc:date>
    <item>
      <title>How can I execute loop action with nuxeo-shell ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-execute-loop-action-with-nuxeo-shell/m-p/326217#M13218</link>
      <description>&lt;P&gt;I would like to create about 100 workspaces with nuxeo-shell.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I tryed from the command line using -f my_batch_file&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;with my_batch_file :&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;connect -u Administrator -p Administrator &lt;A href="http://localhost:8080/nuxeo/site/automation" target="test_blank"&gt;http://localhost:8080/nuxeo/site/automation&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;cd /default-domain/workspaces&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;mkdir -title W1 Workspace path_W1&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;OK to create W1 but how loop to create W2, W3... (and their paths) ?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I tryed with groovy (easyer for the loop)... But How create a Workspace with groovy ?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 23 May 2012 16:50:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-execute-loop-action-with-nuxeo-shell/m-p/326217#M13218</guid>
      <dc:creator>ftorchet_</dc:creator>
      <dc:date>2012-05-23T16:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I execute loop action with nuxeo-shell ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-execute-loop-action-with-nuxeo-shell/m-p/326218#M13219</link>
      <description>&lt;P&gt;Using groovy, you'll need to use nuxeo-core java api:
May be this can help you: &lt;A href="http://doc.nuxeo.com/x/VIdH" target="test_blank"&gt;http://doc.nuxeo.com/x/VIdH&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;doc = Session.createDocumentModel("/default-domain/workspaces","myWS,"Workspace");
doc.setPropertyValue("dc:title", "my WS");
Session.createDocument(doc);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 May 2012 17:10:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-execute-loop-action-with-nuxeo-shell/m-p/326218#M13219</guid>
      <dc:creator>Sun_Seng_David_</dc:creator>
      <dc:date>2012-05-23T17:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I execute loop action with nuxeo-shell ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-execute-loop-action-with-nuxeo-shell/m-p/326219#M13220</link>
      <description>&lt;P&gt;perfect ! it works !&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2012 17:33:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-execute-loop-action-with-nuxeo-shell/m-p/326219#M13220</guid>
      <dc:creator>ftorchet_</dc:creator>
      <dc:date>2012-05-23T17:33:09Z</dc:date>
    </item>
  </channel>
</rss>

