JBoss Community

Re: (User Tasks) How to get user tasks by process instance?

created by Mauricio Salatino in jBPM - View the full discussion

I know, that's the idea, but if you create a task list john will see all his tasks and he will be able to choose in which task to work. If you want to know from the history logs which process create each task you have the Task.TaskData.workItemId reference that helps you to find the process where that task instance was created. Notice that there is a named query defined for that reason:

<named-query name="TaskByWorkItemId">

          <query>

select

    t

from

    Task t

where

    t.taskData.workItemId = :workItemId

          </query>

          <!-- hint name="org.hibernate.timeout" value="200"/ -->

      </named-query>

 

Cheers

Reply to this message by going to Community

Start a new discussion in jBPM at Community