09-20-2017 01:09 AM
Hello, I am using a review and approve workflow , but i am facing a problem.When i attach a file on the flow from a folder that the second user doesn't have access,then the second user can not see the attached file.
Can somebody help me, Thanks in advance.
11-27-2017 10:53 PM
Hi klotilda n,
You are facing this problem because another user may haven't permission to access that file.
So you may have to give the permission on that document to other user refer this Setting user permissions | Alfresco Documentation or if you don't wanted to give permission manually you can use Shared Folder to place your document in this place every user have permission to access the document available in it.
And another option you can create your own custom workflow and in workflow tasks have multiple event listeners are available to you can execute your script code to give the permission on the document if required then remove the permission if worklow get completed.
Thanks,
Kalpesh,
11-27-2017 10:53 PM
Hi klotilda n,
You are facing this problem because another user may haven't permission to access that file.
So you may have to give the permission on that document to other user refer this Setting user permissions | Alfresco Documentation or if you don't wanted to give permission manually you can use Shared Folder to place your document in this place every user have permission to access the document available in it.
And another option you can create your own custom workflow and in workflow tasks have multiple event listeners are available to you can execute your script code to give the permission on the document if required then remove the permission if worklow get completed.
Thanks,
Kalpesh,
11-28-2017 08:14 AM
Hi Kalpesh, thanks for the reply. I have been trying to create custom workflows to give permission on a file only for the duration of the workflow but haven't achieved it. Could you please help on the event listeners that i can use to give permission on a file only for the workflow. This would be very helpful.
11-28-2017 08:58 PM
<activiti:taskListener event="assignment" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[
var documents = bpm_package.children;
for (var i = 0; i < documents.length; i++) {
documents[i].setPermission("Your_Permission",task.assignee);
}
]]></activiti:string>
</activiti:field>
</activiti:taskListener>
Use the task listener assignment event or you can use any event listener, you can use script task or service task as well to execute your script.
11-29-2017 05:56 AM
Thanks a lot
Explore our Alfresco products with the links below. Use labels to filter content by product module.