2 Replies Latest reply on Apr 15, 2008 10:14 AM by Mauricio Salatino

    Query certain processes for tasks

    richard bradwell Newbie


      I need to be able to get all of the open tasks, assigned to users whos id's are supplied in a list list, for a number of specified processInstances. Therefore I will pass in a list of user ids and a list of processInstances.

      Does anyone know what the hibernate query for that will look like to do that? I'm not really familiar with hibernate. I did put the following query together, in my version of the hibernate.queries.hbm.xml file, to get all open tasks for a list of users. I just need to be able to do it for a number of processInstances. Can I do this in a single query?

      thanks in advance.

       <query name="TaskMgmtSession.findOpenTasksOfProcessInstanceByActorIds">
       select ti
       from org.jbpm.taskmgmt.exe.TaskInstance as ti
       where ti.actorId in ( :actorIds )
       and ti.isSuspended != true
       and ti.isOpen = true
       and ti.token.processInstance = :processInstance