cancel
Showing results for 
Search instead for 
Did you mean: 

Assign Task To User or Group at Runtime

hari
Star Contributor
Star Contributor
Hi All,

I was able to successfully assign a task either to a user or a group when I know whom to assign it upfront. Now I am having difficulties in assigning a task at runtime. Scenario below.

I will let the end user select whom they want to assign the task to, if they select user, I will show them the list of users and they will select one among them and proceed. If they select group, I will show them the list of groups and the user selects one and proceeds. Now while designing the BPM, I would not know if the user would select a user or a group. I tried by setting the Assignee as ${selectedUser} and Candidate Group as ${selectedGroup} and have passed value to selectedGroup and an empty string to selectedUser while starting the BPM. but It was neither assigned to group nor to user(which is obvious as I passed empty string for user). 

Any help is greatly appreciated. Thanks!

Hari.
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

could you create jUnit test?
https://forums.activiti.org/content/sticky-how-write-unit-test

Regards
Martin

irenailievska1
Champ in-the-making
Champ in-the-making
Maybe you can just put two fields for the user? One for searching people, other for groups