Hi
I want to assign human task to users dynamically. I write this code in where I create the process instance:
Map<String, Object> params = new HashMap<String, Object>();
params.put("assignee", "Jasem");
ProcessInstance processInstance = ksession.startProcess("myBpmn", params);
And in bpmn definition, in the user task node:
ActorId=#{assignee}
I logged the assignee variable in On Entry Actions of that node like this:
System.out.println("------------ kcontext.getVariable(assignee) : " + kcontext.getVariable("assignee") +" ---------------");
And it prints :
------------ kcontext.getVariable(assignee) : Jasem ---------------
"Jasem" is registered as a user in and I checked it out in table "OrganizationalEntity". So it looks like everything is ok. But when I want to list the tasks assigned to "Jasem" , it gives me back an empty list.
For other tasks that assigned to user inside bpmn definition, something like : ActorId=SomeRegisteredUser, everything is alright and this task is shown in "SomeRegisteredUser" task list. Any idea?
Thanks for reading.