Reputation: 1
I make new jBPM Process with "a more advanced process including human tasks and persistence". Then run the process ,everything is fine. But if I change the actor of user task,for example, I change “mary” to “may” on Task 2
,a error will happen,the list’s size is 0.
// let john execute Task 1
List<TaskSummary> list = taskService.getTasksAssignedAsPotentialOwner("john", "en-UK");
TaskSummary task = list.get(0);
System.out.println("John is executing task " + task.getName());
taskService.start(task.getId(), "john");
taskService.complete(task.getId(), "john", null);
assertNodeTriggered(processInstance.getId(), "Task 2");
// let mary execute Task 2
list = taskService.getTasksAssignedAsPotentialOwner("may", "en-UK");
System.out.println("list.size:"+list.size());
task = list.get(0);
System.out.println("May is executing task " + task.getName());
taskService.start(task.getId(), "may");
taskService.complete(task.getId(), "may", null);
then a error will happen,the console shows that the list's size is 0. Can anyone help me?
Upvotes: 0
Views: 1368
Reputation: 11
Cause this are the users in userinfo.properties https://github.com/droolsjbpm/jbpm/blob/master/jbpm-human-task/jbpm-human-task-core/src/test/resources/userinfo.properties
Upvotes: 1
Reputation: 4143
That's the expected behaviour.. if your processes create tasks for Mary but you query the tasks for May, it will return 0 tasks for May. Then the rest of the lines will fail.
Upvotes: 0