How to get taskId from active tasks

Hi people,
I would like to ask you if you know how to get tasks Ids from active tasks passing Process Instance Id as parameter.
Can I use any pub service? or a query to Data Base using an adapter?

Thanks in advanced,

Marcelo

There is a service in WmTaskClient for searching tasks. One of possible search criteria is the instanceId.

Hi fml2! We tried it but it is too slow, do you know how to do it using directly a query to the database?

Thanks!

I think, in the process audit DB, in the table where step info is stored (PRA_PROCESS_STEP?), there is a column which holds the task id. It is filled only for the steps of type ‘user task’.

I think there are few tables by name T_task and T_task_inbox and you can provide task_id or may be status and search for the tasks.

Regards,
Syed Ahmed