2 Messages
•
5 Points
assign a user to a task in workflow designer
I am using workflow designer and I have a task to select a user and I want to assign that selected user to the next task. I have a script task in between tasks to get and set the variable and I have that new variable in my candidate role in the next task but I keep getting an error.
Here is my script task:
task setStewardVariable() {
// Get the previously chosen user from the variable
def steward = execution.getVariable(“selectedSteward”);
// Set the value of the 'businessSteward' variable
execution.setVariable("steward", steward);
}
I am defining the candidate user as ${businessSteward} in the next task.
Some error I am getting are the user expression is invalid and I don’t think the script task is working at all
stefan_busch
91 Messages
•
905 Points
1 year ago
Hello,
there are two things that may be off:
execution.setVariable(“businessSteward”, steward);
user(${businessSteward})
In my experience it uses the user name of the user (and not the UUID), but I can’t see what value you use here.
0
0
venkatareddy_padala
18 Messages
•
2.1K Points
1 year ago
Hi Silina,
In the candidate user expression you should set as user(${steward}) in your case.
Since user expression supports multiple assignment types such as assigning to role you should specify whether the candidate user is a single user/ role/ group/role for a specific resource.
Eg:
You can specify candidate users by using candidate user expressions, such as
role(Business Steward)
,user(John)
, orgroup(Data Custodians)
or role(‘Business Steward’, ‘YourCommunityName’)0
0