cancel
Showing results for 
Search instead for 
Did you mean: 

Assign task to a group from a document property

magarcia_sm
Star Contributor
Star Contributor
Hi All

We are launching the workflow from a file which has a type with a property called "Departament". The Departament value is the name of the alfresco Group the workflow needs to assign the task… so now dont know exactly how to specify the group dinamically so Alfresco assigns the task to the right group.

we have tried something like


<userTask id="iniciar" name="Revisar JefeDpto" activiti:candidateGroups="GROUP_test.children[0].properties["hula:department"]" activiti:formKey="wf:activitiReviewTask">


or something like


<userTask id="iniciar" name="Revisar JefeDpto" activiti:candidateGroups="GROUP_"+${test.children[0].properties["hula:department"]}+" activiti:formKey="wf:activitiReviewTask">


but it does not work.

Any sugestions about how could we get this property and use it to assign the task to the right group??

Thanks a lot!!
1 REPLY 1

darkredd
Star Contributor
Star Contributor
Hi,

You should consider having a variable that will hold the group authority name and pass it to the process definition file.
Like:


var tempGrp = "GROUP_" + test.children[0].properties["hula:department"];
var grp = people.getGroup(tempGrp);

And in your process definition you write something like:

activiti:candidateGroups="${grp.properties.authorityName}"


Hope this helps, if so Mark comment as useful.