3 Replies Latest reply on Oct 6, 2009 5:42 PM by Ronald van Kuijk

    JBPM 4.1 : Task Count



      I am developing an application embedding JBPM 4.1.

      In the front end, I need to get the list of pending tasks for a given user (and page it), as well as the total number of pending tasks ( in order, for example, to determine the number of pages).

      I am currently using the TaskQuery interface for that. (this one http://docs.jboss.com/jbpm/v4/javadocs/org/jbpm/api/TaskQuery.html )

      It is working perfectly, but I am a bit confused by the way I am counting tasks, and suspecting there is a better way to do it.

      Once the different filters are set (user, activity, status ...), there is a method to get all the Tasks, but none to just count them.

      So what I am doing for now is get the size of the list, but I am a bit afraid of what will happen if a few million records are sent back. Not mentioning the performances.

      Is there a "better" way to have access to this information through the standard JBPM 4.1 API ?

      (topic copied / pasted from this one http://www.jboss.org/index.html?module=bb&op=viewtopic&t=162113, posted on the wrong forum)