This SQL query will list the run IDs of all of the tasks in an active workflow.
select
EJPP_TaskIdnr
from EH,EJPP
where EH_AH_Idnr = EJPP.EJPP_AH_Idnr
and EH_AH_Idnr = ?
and EJPP_OType not in ('<START>','<XTRNL>','<IF>','<FE>','<END>')
order by EJPP_Lnr
Replace the bind parameter with the workflow run ID.