-----------------------------------------------------
- outgoing work list
-----------------------------------------------------
SELECT workx.*
FROM   rt_p_work workx,rt_p_case casex,rt_p_path pathx,rt_p_work workx2 
WHERE  workx.dat_dispatchTime IS NOT NULL 
AND    workx.vc_performer = ? 
AND    workx.vc_caseid = casex.vc_uuid 
AND    casex.int_state = 101
AND    pathx.vc_from = workx.vc_uuid
AND    pathx.vc_to = workx2.vc_uuid
AND    workx2.dat_acceptTime IS NULL

======================
= demo script
======================
SELECT workx.*
FROM   rt_p_work workx,rt_p_case casex,rt_p_path pathx,rt_p_work workx2 
WHERE  workx.dat_dispatchTime IS NOT NULL 
AND    workx.vc_performer = 'zosatapo' 
AND    workx.vc_caseid = casex.vc_uuid 
AND    casex.int_state = 101
AND    pathx.vc_from = workx.vc_uuid
AND    pathx.vc_to = workx2.vc_uuid
AND    workx2.dat_acceptTime IS NULL
