cancel
Showing results for 
Search instead for 
Did you mean: 

How do I assign the workflow to a specific user?

roseta
Champ in-the-making
Champ in-the-making
I need help with this, please!

I just want to know how to assing the workflow to a specific user (MIKE), I already know how to assign it to a specific group:

<pooledactors>#{people.getGroup('GROUP_RRHH')}</pooledactors>
(where RRHH is the name of the group)

I cannot find this information in Alfresco wiki…. I think it should be something like: people.getUser('USER_MIKE'), but I've tryed a lot of options, and none works.

THANKS IN ADVANCE!
4 REPLIES 4

hsohaib
Champ on-the-rise
Champ on-the-rise
people.getPerson('userName');

roseta
Champ in-the-making
Champ in-the-making
Hello hsohaib, thank you! But, with de ";" at the end of your help… I guess you are giving me Java code… sorry, but I forgot to mention that I'm starting with Alfresco and I just use xml processdefinitions by now…. Can anyone help me with this expresion, please?

I just know thats for choosing an user while the workflow runs:
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
            <actor>#{bpm_assignee}</actor>      
        </assignment>   

But how about if I want my workflow always to go to the user called mike?

That doesn't work:
#{people.getUser('mike')}

Kind regards,
Roseta 😃

hsohaib
Champ on-the-rise
Champ on-the-rise
the ";" is jut a java habit Smiley Happy
use :
#{people.getPerson('mike')}

instead of

#{people.getUser('mike')}

bennym
Champ in-the-making
Champ in-the-making
Use this script to assign a task to a specific person:

             var mail = actions.create("mail");
             mail.parameters.to = "email address of the assignee";
             mail.parameters.subject = "Subject";
             mail.parameters.from = "Assigner's email";
             mail.parameters.text = "body";
             mail.execute(bpm_package);