There are queries to check and delete the orphaned records -
The following query can provide a count of the orphans in the system.
*/
select count(*) from cmn_sec_assgnd_obj_perm
where object_instance_id IN (
select object_instance_id from cmn_sec_assgnd_obj_perm p
where p.object_ID = 50680
minus
select ID from BPM_RUN_PROCESSES);
/*
The following PLSQL block can batch the deletes for these orphans at 100,000 rows at a time if they are significant.
*/
-- BPM_RUN_PROCESSES CLEANUP
LOOP
Delete from cmn_sec_assgnd_obj_perm
where object_ID = 50680
and object_instance_id IN (
select object_instance_id from cmn_sec_assgnd_obj_perm p
where p.object_ID = 50680
minus
select ID from BPM_RUN_PROCESSES)
AND ROWNUM <= 100000;
EXIT WHEN SQL%ROWCOUNT = 0;
COMMIT;
END LOOP;
NJ