JBPM - Get the list of all the tasks
I'm trying to fetch the list of all the开发者_JAVA百科 tasks within the JBPM database. I'm using the following code :
List<Task> liste = taskService.createTaskQuery().list();
But it gives me a list of the first task of each workflow... How could I get the other tasks?
Regards,
To retrieve all task instances
JbpmConfiguration conf = JbpmConfiguration.parseResource("jbpm.cfg.xml");
JbpmContext context = conf.createJbpmContext();
List<TaskInstance> taskList = context.getTaskList();
To retrieve task instances using actor
JbpmConfiguration conf = JbpmConfiguration.parseResource("jbpm.cfg.xml");
JbpmContext context = conf.createJbpmContext();
List<TaskInstance> taskList = context.getTaskList("Head of Department");
精彩评论