Pergunta

I'm trying to fetch the list of all the 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,

Foi útil?

Solução

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");
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top