782: IS
783: ct_running number := 0;
784: BEGIN
785: select count(*) into ct_running
786: from fnd_concurrent_worker_requests r
787: where queue_application_id = p_queue_application_id
788: and concurrent_queue_name = p_concurrent_queue_name
789: and status_code = 'R';
790:
809: ct_pending number := 0;
810: BEGIN
811: --sql suggested by mike.
812: select count(*) into ct_pending
813: from fnd_concurrent_worker_requests r
814: where queue_application_id = p_queue_application_id
815: and concurrent_queue_name = p_concurrent_queue_name
816: and status_code = 'I' and hold_flag <> 'Y'
817: and requested_start_date <= sysdate;