AnsweredAssumed Answered

set groupAssignee as contributor

Question asked by e-no91 on Jun 8, 2014
Latest reply on Jun 9, 2014 by e-no91
In my javascript file I pass the groupAssignee as

workflow.parameters["bpm:groupAssignee"]="GROUP_A";


In the workflow, I wanted to assign the groupAssignee as a coordinator of the document, so in the workflow I want to add


bpm_package.children[0].setPermission("Coordinator",bpm_groupAssignee);


but this returns error.
I've replaced bpm_groupAssignee with bpm_groupAssignee.properties["cm:name"], this returns some node,
and replacing with
people.getGroup(bpm_groupAssignee) gives null.

How is the syntax for me to get string "GROUP_A" from the workflow?
Thanks in advance!

EDIT:
using
bpm_groupAssignee.get(0).properties["cm:name"]
also gives error..

My mistake, the resolution I posted below only works in javascript, not in workflow xml.

EDIT SOLVED:
I'm not sure if there is a correct way to do it. but so far I got what I wanted by:

javascript


workflow.parameters["bpm:assignTo"]="GROUP_A";



processdefinition.xml


bpm_package.children[0].setPermission("Coordinator",bpm_assignTo);

Outcomes