cancel
Showing results for 
Search instead for 
Did you mean: 

Document permissions in workflow

robin
Champ in-the-making
Champ in-the-making
Hi All,

I am interested in setting permissions in workflow dynamically. Say, you started a workflow on a resource "A". And a user "U" does not have permission to read "A". But if a task is assigned to the user "U", I would like to make the resource "A" readable to the user "U" while the user "U" doing his task.

Please help !!!

Regards,
Robin
3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator
Look at the "Permission and Security API" on the JavaScript API wiki page. That will allow you to run a piece of JavaScript that adds the user with read access to the document. Because JavaScript running in a workflow runs with the user's permission by default, you will need to use "runas" to run this script as the system user.

If you need to know how to add JavaScript to a workflow, you might take a look at the advanced workflow tutorial. The first edition covers jBPM and the second edition covers Activiti.

Jeff

robin
Champ in-the-making
Champ in-the-making
Many thanks Jeff,
I will do the same and get back.

Regards,
Robin

Did you solve this problem? I have the same problem and I am a beginner so I have no idea how to do this. I just started with workflows and am still bit confused so if possible please share your solution .
Thanks in advance Smiley Happy
Irena