<?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: Accessing 'Folder' form field in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13210#M5839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I know this part of the documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It says it's a JSON, e.g.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"path":{"id":"47cb278d-c775-444f-a23e-b9f2d92390da","title":"documentLibrary &amp;gt; my-folder","folderTree":[{"id":"ec5eb0ec-76a0-4175-adbf-dcf3842ed00c","title":"documentLibrary","simpleType":"folder","folder":true},{"id":"47cb278d-c775-444f-a23e-b9f2d92390da","title":"my-folder","simpleType":"folder","folder":true}]},"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Taking this example, what are the values for path and id in your script?&lt;/P&gt;&lt;P&gt;path: '&lt;EM&gt;documentLibrary &amp;gt; my-folder'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;id: '&lt;EM&gt;47cb278d-c775-444f-a23e-b9f2d92390da'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jun 2017 14:01:19 GMT</pubDate>
    <dc:creator>mrahn</dc:creator>
    <dc:date>2017-06-09T14:01:19Z</dc:date>
    <item>
      <title>Accessing 'Folder' form field</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13205#M5834</link>
      <description>How do you access the entry for the Upload Folder form field in Activiti Process Services in a Script Task?&amp;nbsp;You can do this for a file with :&amp;nbsp;import com.activiti.service.runtime.RelatedContentService;import com.activiti.service.runtime.RelatedContentStreamProvider;import com.activiti.domain.runtime.</description>
      <pubDate>Wed, 07 Jun 2017 19:56:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13205#M5834</guid>
      <dc:creator>jvaidya</dc:creator>
      <dc:date>2017-06-07T19:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing 'Folder' form field</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13206#M5835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The folder information is stored as JSON String. Please check the last section of&amp;nbsp;&lt;A class="link-titled" href="http://docs.alfresco.com/process-services1.6/tasks/ps-config-folder-entity-parent.html" title="http://docs.alfresco.com/process-services1.6/tasks/ps-config-folder-entity-parent.html" rel="nofollow noopener noreferrer"&gt;Configuring the folder entity parent | Alfresco Documentation&lt;/A&gt;&amp;nbsp;for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 20:04:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13206#M5835</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-06-07T20:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing 'Folder' form field</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13207#M5836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tested it and found that it is actually stored as a HashMap instead of a JSON String.&amp;nbsp;Did you notice that too?&lt;/P&gt;&lt;P&gt;I can print&amp;nbsp;the selected Folder ID using the following groovy script in a script bpmn component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(execution.getVariable('variablename'))&lt;BR /&gt;println execution.getVariable('variablename')['path']['id']&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please raise a defect with the documentation where it says the data is stored as JSON String which is not quite correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 21:03:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13207#M5836</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-06-07T21:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing 'Folder' form field</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13208#M5837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ciju.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried working with the JSON too and failed.&lt;/P&gt;&lt;P&gt;What were valid values for 'path' and 'id' in your script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 13:25:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13208#M5837</guid>
      <dc:creator>mrahn</dc:creator>
      <dc:date>2017-06-09T13:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing 'Folder' form field</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13209#M5838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's part of the folder value which is stored as a Map&amp;lt;String, Map&amp;gt;. Please refer&amp;nbsp;&lt;A class="link-titled" href="http://docs.alfresco.com/process-services1.6/tasks/ps-config-folder-entity-parent.html" title="http://docs.alfresco.com/process-services1.6/tasks/ps-config-folder-entity-parent.html" rel="nofollow noopener noreferrer"&gt;Configuring the folder entity parent | Alfresco Documentation&lt;/A&gt;&amp;nbsp; for more details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 13:51:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13209#M5838</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-06-09T13:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing 'Folder' form field</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13210#M5839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I know this part of the documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It says it's a JSON, e.g.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"path":{"id":"47cb278d-c775-444f-a23e-b9f2d92390da","title":"documentLibrary &amp;gt; my-folder","folderTree":[{"id":"ec5eb0ec-76a0-4175-adbf-dcf3842ed00c","title":"documentLibrary","simpleType":"folder","folder":true},{"id":"47cb278d-c775-444f-a23e-b9f2d92390da","title":"my-folder","simpleType":"folder","folder":true}]},"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Taking this example, what are the values for path and id in your script?&lt;/P&gt;&lt;P&gt;path: '&lt;EM&gt;documentLibrary &amp;gt; my-folder'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;id: '&lt;EM&gt;47cb278d-c775-444f-a23e-b9f2d92390da'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 14:01:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13210#M5839</guid>
      <dc:creator>mrahn</dc:creator>
      <dc:date>2017-06-09T14:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing 'Folder' form field</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13211#M5840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Map['path']['id'] is a groovy way of navigating&amp;nbsp;into&amp;nbsp;the&amp;nbsp;java.util.LinkedHashMap and fetching the &lt;STRONG&gt;id&lt;/STRONG&gt; from the &lt;STRONG&gt;Map&lt;/STRONG&gt; which is a value of &lt;STRONG&gt;Key&lt;/STRONG&gt; named &lt;STRONG&gt;path&lt;/STRONG&gt;... I beautified the JSON as shown below&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;{&lt;BR /&gt;"path": {&lt;BR /&gt;"id": "47cb278d-c775-444f-a23e-b9f2d92390da",&lt;BR /&gt;"title": "documentLibrary &amp;gt; my-folder",&lt;BR /&gt;"folderTree": [{&lt;BR /&gt;"id": "ec5eb0ec-76a0-4175-adbf-dcf3842ed00c",&lt;BR /&gt;"title": "documentLibrary",&lt;BR /&gt;"simpleType": "folder",&lt;BR /&gt;"folder": true&lt;BR /&gt;}, {&lt;BR /&gt;"id": "47cb278d-c775-444f-a23e-b9f2d92390da",&lt;BR /&gt;"title": "my-folder",&lt;BR /&gt;"simpleType": "folder",&lt;BR /&gt;"folder": true&lt;BR /&gt;}]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 14:12:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13211#M5840</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-06-09T14:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing 'Folder' form field</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13212#M5841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, understood.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was looking for a way to define the parent programatically&amp;nbsp;when creating a folder using the Store Entity Task.&lt;/P&gt;&lt;P&gt;We found that one could use&amp;nbsp;a hash map like the one above&amp;nbsp;or just the uuid of the parent folder. So we went for the uuid and it works fine.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/alfresco/14348_set parent folder.jpg" style="width: 620px; height: 508px;" /&gt;&lt;/P&gt;&lt;P&gt;Thank you for your support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2017 13:22:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/accessing-folder-form-field/m-p/13212#M5841</guid>
      <dc:creator>mrahn</dc:creator>
      <dc:date>2017-06-12T13:22:15Z</dc:date>
    </item>
  </channel>
</rss>

