JBPM - get a list of all tasks

I am trying to get a list of all the tasks in a JBPM database. I am using the following code:

 List<Task> liste = taskService.createTaskQuery().list();

But he gives me a list of the first tasks of each workflow ... How do I get other tasks?

Hi,

+3
source share
1 answer

To get all instances of tasks

    JbpmConfiguration conf = JbpmConfiguration.parseResource("jbpm.cfg.xml");
    JbpmContext context = conf.createJbpmContext();
    List<TaskInstance> taskList = context.getTaskList();

To get task instances using actor

    JbpmConfiguration conf = JbpmConfiguration.parseResource("jbpm.cfg.xml");
    JbpmContext context = conf.createJbpmContext();
    List<TaskInstance> taskList = context.getTaskList("Head of Department");
+1
source

Source: https://habr.com/ru/post/1774133/


All Articles