When store procedure is defined as AUTONOMOUS_TRANSACTION,even outer transaction has been roll back , it would not impact the transaction has been commit inside the sp.
Here is the example:
Lets create the simple test table:
create table employee (
insert into employee values( 1,'Bob');
insert into employee values( 2,'Tom');
Lets create the AUTONOMOUS_TRANSACTION sp.
create or replace procedure insert_emp
( in_id in number,
in_name in employee.name%TYPE)
insert into employee
values ( in_id, in_name);
Begin the transaction. The insert john has been roll back, so the data would not reflect in to the table.
Ted was updated inside the store procedure, therefore it is been commit.
insert into employee values ( 5, 'John');
insert_emp ( 100,'Ted');