1 Reply Latest reply on Jul 29, 2007 4:07 PM by Ronald van Kuijk

    4N queries for task assignment list

    davidintx Newbie


      In the seam 2.0.0.Beta 1 dvdstore example, which uses jbpm, one of the admin pages lists all the tasks assigned to the group of the admin, allowing the admin to assign one of the tasks to him or herself. In this page, a task represents an order placed in the store.

      Each time a new order is placed in the store, the number of tasks on that admin page goes up by one, as would be expected. However, the number of queries used render the page of tasks goes up by 4 each time a new order is placed.

      This seems bad. I asked about this in the seam forum, and got this back from Gavin:

      AFAIK, this is a jBPM question, not a Seam question, unless you have evidence otherwise.

      The specific bit of code in the seam bpm libs that is being called is :

      return ManagedJbpmContext.instance()
      .getGroupTaskList( new ArrayList( Actor.instance().getGroupActorIds() ) );

      which is basically just calling getGroupTaskList on an org.jbpm.JbpmContext instance.

      So, is this something that is a known issue with the getGroupTaskList method? Is there a better way to get the same information without 4N queries?

      Reference to the post in the seam forum: