cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign asignee dynamically

sherlock
Champ in-the-making
Champ in-the-making
Hi,

I am creating a simple activiti project . In my activiti diagram i want to assignee dynamically from selectOneMenu in jsf.
but how to assign the chosen user as a assignee. what is the expression to write in assignee property.



please help me…..

Regards
Sherlock
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
You should use an expression in your user task, e.g.:


<userTask activiti:assignee="${selectedAssignee}" id="task" />

In the code that starts your process, you pass in a map of variables:


variables.put("selectedAssignee", selectedAssignee);
runtimeService.startProcessInstanceByKey("myprocess", variables);