JBoss Community

Re: how to get the taskId in "candidate-groups" sicenario?

created by stree jang in jBPM - View the full discussion

Hi Helal,

 

Before the execution of this sample process, I do have created a "market" group, a user "test1", and created the membership.

When this process is executed until this task, I wonder the way to acquire the current running task's taskId.

 

It was mentioned through this way, we can get a taskList, then further to get specific taskId. However this taskList.size() always be 0. I don't understand...

----

List<Task> taskList = taskService.findGroupTasks("test1");

System.out.println(taskList.size());

----

 

Besides I tried your way, also get the 0 result...

List<Task> taskList2 = taskService.createTaskQuery().candidate("test1").list();

System.out.println("taskList2.size(): " + taskList2.size());

Reply to this message by going to Community

Start a new discussion in jBPM at Community