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.
Solved! Go to Solution.
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,
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,
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.
<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.
Thanks a lot
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.