cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict user from invoking workflow

cjimenez2581
Champ in-the-making
Champ in-the-making
hello,
I want to know if it is a way to restrict groups or users some workflow…

Example: I dont want group_reviewers can invoke ad_hoc workflow…
5 REPLIES 5

vinaxwater
Champ in-the-making
Champ in-the-making
Dear cjimenez2581,
You can define file WorkflowPermision.xml with content:

<workflows>
<workflow name="INTERNAL MEMO">
<group>reviews</group>
</workflow>
</workflows>
Add file into space your alfresco and mount it into disk (ex: /opt/myconfig) Then open StartWorkflowWizard.java find method getStartableWorkflows() read file WorkflowPermision.xml with path /opt/myconfig and customize it.

Thanks and Regards.

cjimenez2581
Champ in-the-making
Champ in-the-making
ok thanks vinaxwater ! I got the idea, but tomorrow I'll try because Im not at work xD

cjimenez2581
Champ in-the-making
Champ in-the-making
hello vinaxwater, Im some kind of new in Alfresco so I dont know somethings about it.

so could you please tell me how can I read WorkflowPermision.xml using method getStartableWorkflows() on StartWorkflowWizard class?

Thank you!

vinaxwater
Champ in-the-making
Champ in-the-making
Dear cjimenez2581,
You must research CIFS, in StartWorkflowWizard.java with method getStartableWorkflows() get all workflow define for user select when start workflow. I will customize it for list workflows show with permision of current user.
Ex: i have file WorkflowPermision.xml defined. i add content into /company_home/CONFIGURATION/ by Alfresco Explorer  :mrgreen:
I being use linux for server Alfresco.
I create dir: [root@alfresco ~] mkdir /system/local/CONFIGURATION
I haven got dir then I will mount space from alfresco to disk for read file: [root@alfresco ~]mount -t cifs -o user=***,pass=*** //ip address/company_home/CONFIGURATION /system/local/CONFIGURATION/
When I list disk I see file WorkflowPermision.xml [root@alfresco ~]ls -la /system/local/CONFIGURATION/
Now everything easy  :mrgreen: You can research read file xml with java code for customize with your requirement .

Goodluck.

cjimenez2581
Champ in-the-making
Champ in-the-making
ok thanks for the explanation… but I cant try it because I've been assigned to other task for the moment Smiley Tongue

But in a close future I'll do  😎