DECLARE
CURSOR c1
IS
SELECT item_type, item_key, process_name
FROM hr_api_transactions hat
WHERE status
= 'Y'
AND process_name = 'HR_GENERIC_APPROVAL_PRC'
AND item_key = '254954';
BEGIN
FOR i IN c1
LOOP
BEGIN
wf_engine.
suspendprocess (itemtype =>
i.item_type,
itemkey =>
i.item_key,
process =>
i.process_name);
COMMIT;
DBMS_OUTPUT.put_line ('Item Key has been Suspended: ' || i.item_key);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.
put_line ('Inner Exception: ' || SQLERRM || ' - ' || i.item_key);
END;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);
END;
No comments:
Post a Comment