In this article of Oracle HRMS Overview, I am going to share API to rollback a self service transaction. This will purge the data from self service transaction main tables and its relevant PQH history tables.
This API is used normally when any transaction gets hanged due to session hang or any workflow error and we want to remove this transaction at all from the system. As a result of this API, transaction will be completely removed from the system.
–Rollback a Self Service Transaction
sshr_transaction_id number := 23456787;
p_item_key varchar2(10) := ‘123456’
–It aborts the workflow of the transactions
wf_engine.abortprocess (p_item_type, p_item_key);
–It deleted the data of transaction from HR_API_TRANSACTIONS tables but data in PQH tables still remains in database for history purpose.
( p_transaction_id => sshr_transaction_id ,
p_validate => false );
dbms_output.put_line(‘Transaction Rolled back’);
exception when others then