Oracle Solution for Error ora-14462

Solution for Oracle Error ORA-14462

ORA-14462: cannot TRUNCATE temporary table in an autonomous transaction which is already in use by the parent transaction

What triggered the Error:

An attempt was made to TRUNCATE a temporary table in an autonomous transaction which is already in use by the parent transaction.

What should we do to fix it:

Make sure the temporary table is not being used by the parent transaction before trying to TRUNCATE in an autonomous transaction.