<?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: save in folder process in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/save-in-folder-process/m-p/95824#M28181</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be achieved by doing following steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI style="text-indent: -.25in;"&gt;&amp;nbsp; &amp;nbsp; Setup a folder with read permission:&lt;/LI&gt;&lt;LI style="text-indent: -.25in; margin: 0in 0in .0001pt 1.0in;"&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Create a folder, make sure you determine the space based on your use base. By default, all users get "EVERYONE" group access which gives read only permission to browse the files and folders. If you want to provide read only access to a limited set of users, you need to setup a custom group and add those users to that group.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="text-indent: -.25in; margin: 0in 0in .0001pt 1.0in;"&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Go to manage permissions and break the inheritance on the newly created folder.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="text-indent: -.25in; margin: 0in 0in .0001pt 1.0in;"&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Add the group to the folder and select role as "Consumer"&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI style="text-indent: -.25in;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Create a task listener which can listen to “Complete” event. As soon as your document gets approved. You can execute a script from the listener and call an Action class (run asynchronously) which will move the node to the read only folder which you recently setup.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;userTask id="reviseDocUsertask" name="Revise Document"&lt;BR /&gt; activiti:assignee="${initiator.properties.userName}" activiti:formKey="cmsWorkflow:activitiRevise"&amp;gt;&lt;BR /&gt; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;activiti:taskListener &lt;STRONG&gt;event="complete"&lt;/STRONG&gt; class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"&amp;gt;&lt;BR /&gt; &amp;lt;activiti:field name="script"&amp;gt;&lt;BR /&gt; &amp;lt;activiti:string&amp;gt;&lt;BR /&gt; &amp;lt;![CDATA[&lt;BR /&gt; &lt;EM&gt;&lt;STRONG&gt;var initiatorUser = initiator.properties.userName;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; logger.log("Workflow approved for: "+initiatorUser);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; var moveAction = actions.create("move-doc");&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; moveAction.parameters["initiatorUser"] = initiatorUser;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; for (var eachItem = 0; eachItem &amp;lt; bpm_package.children.length; eachItem++) {&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; var eachNode = bpm_package.children[eachItem];&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; var nodeReference = eachNode.nodeRef;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; logger.log("Moving node: " + nodeReference+", initiatorUser: "+initiatorUser);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; moveAction.execute(eachNode);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt; ]]&amp;gt;&lt;BR /&gt; &amp;lt;/activiti:string&amp;gt;&lt;BR /&gt; &amp;lt;/activiti:field&amp;gt;&lt;BR /&gt; &amp;lt;/activiti:taskListener&amp;gt;&lt;BR /&gt; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;/userTask&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Jun 2019 12:55:48 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2019-06-28T12:55:48Z</dc:date>
    <item>
      <title>save in folder process</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/save-in-folder-process/m-p/95822#M28179</link>
      <description>Dear All,I need to launch the revision process of a document, and once it has been completed by all revisor, I need to store such an aproved document into a specific folder. Nobody has write permision to this folder except the system. The purpose is to avoid any overwrite, delete, etc. of the docume</description>
      <pubDate>Wed, 26 Jun 2019 17:45:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/save-in-folder-process/m-p/95822#M28179</guid>
      <dc:creator>ivanperino</dc:creator>
      <dc:date>2019-06-26T17:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: save in folder process</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/save-in-folder-process/m-p/95823#M28180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can do something like this. After document approved by revision process you can put document to specific folder and change the permission to 'Role Consumer' on that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prachi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2019 05:43:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/save-in-folder-process/m-p/95823#M28180</guid>
      <dc:creator>prachi_shah_c2</dc:creator>
      <dc:date>2019-06-28T05:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: save in folder process</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/save-in-folder-process/m-p/95824#M28181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be achieved by doing following steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI style="text-indent: -.25in;"&gt;&amp;nbsp; &amp;nbsp; Setup a folder with read permission:&lt;/LI&gt;&lt;LI style="text-indent: -.25in; margin: 0in 0in .0001pt 1.0in;"&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Create a folder, make sure you determine the space based on your use base. By default, all users get "EVERYONE" group access which gives read only permission to browse the files and folders. If you want to provide read only access to a limited set of users, you need to setup a custom group and add those users to that group.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="text-indent: -.25in; margin: 0in 0in .0001pt 1.0in;"&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Go to manage permissions and break the inheritance on the newly created folder.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="text-indent: -.25in; margin: 0in 0in .0001pt 1.0in;"&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Add the group to the folder and select role as "Consumer"&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI style="text-indent: -.25in;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Create a task listener which can listen to “Complete” event. As soon as your document gets approved. You can execute a script from the listener and call an Action class (run asynchronously) which will move the node to the read only folder which you recently setup.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;userTask id="reviseDocUsertask" name="Revise Document"&lt;BR /&gt; activiti:assignee="${initiator.properties.userName}" activiti:formKey="cmsWorkflow:activitiRevise"&amp;gt;&lt;BR /&gt; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;activiti:taskListener &lt;STRONG&gt;event="complete"&lt;/STRONG&gt; class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"&amp;gt;&lt;BR /&gt; &amp;lt;activiti:field name="script"&amp;gt;&lt;BR /&gt; &amp;lt;activiti:string&amp;gt;&lt;BR /&gt; &amp;lt;![CDATA[&lt;BR /&gt; &lt;EM&gt;&lt;STRONG&gt;var initiatorUser = initiator.properties.userName;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; logger.log("Workflow approved for: "+initiatorUser);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; var moveAction = actions.create("move-doc");&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; moveAction.parameters["initiatorUser"] = initiatorUser;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; for (var eachItem = 0; eachItem &amp;lt; bpm_package.children.length; eachItem++) {&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; var eachNode = bpm_package.children[eachItem];&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; var nodeReference = eachNode.nodeRef;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; logger.log("Moving node: " + nodeReference+", initiatorUser: "+initiatorUser);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; moveAction.execute(eachNode);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt; ]]&amp;gt;&lt;BR /&gt; &amp;lt;/activiti:string&amp;gt;&lt;BR /&gt; &amp;lt;/activiti:field&amp;gt;&lt;BR /&gt; &amp;lt;/activiti:taskListener&amp;gt;&lt;BR /&gt; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;/userTask&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2019 12:55:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/save-in-folder-process/m-p/95824#M28181</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2019-06-28T12:55:48Z</dc:date>
    </item>
  </channel>
</rss>

