[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...

Gavin King gavin.king at jboss.com
Fri Jun 15 21:25:02 EDT 2007


  User: gavin   
  Date: 07/06/15 21:25:02

  Modified:    src/main/org/jboss/seam/core  TaskInstancePriorityList.java
  Log:
  fix prob where ended tasks showed in the list
  
  Revision  Changes    Path
  1.2       +7 -0      jboss-seam/src/main/org/jboss/seam/core/TaskInstancePriorityList.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TaskInstancePriorityList.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/TaskInstancePriorityList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- TaskInstancePriorityList.java	30 May 2007 23:13:49 -0000	1.1
  +++ TaskInstancePriorityList.java	16 Jun 2007 01:25:02 -0000	1.2
  @@ -27,6 +27,10 @@
   public class TaskInstancePriorityList
   {
      
  +   //TODO: we really need to cache the list in the event context,
  +   //      but then we would need some events to refresh it
  +   //      when tasks end, which is non-trivial to do....
  +   
      @Unwrap
      @Transactional
      public List<TaskInstance> getTaskInstanceList()
  @@ -41,7 +45,10 @@
         return ManagedJbpmContext.instance().getSession()
            .createCriteria(TaskInstance.class)
            .add( Restrictions.eq("actorId", actorId) )
  +         .add( Restrictions.eq("isOpen", true) )
  +         .add( Restrictions.ne("isSuspended", true) )
            .addOrder( Order.asc("priority") )
  +         .setCacheable(true)
            .list();
      }
      
  
  
  



More information about the jboss-cvs-commits mailing list