Monday, July 11, 2016

How to delete Business Event and Subscription




Declare
   Cursor c_event_cur
   Is
     Select we.guid event_guid
           ,wes.guid subscription_guid
     From wf_events we
           ,wf_event_subscriptions wes
     Where we.name = 'sat.oracle.apps.xxpm.generateProposal'  -- your custom event name
     And wes.event_filter_guid = we.guid;  
Begin
   For i in c_event_cur
   Loop
      wf_events_pkg.delete_row(i.event_guid);
      wf_event_subscriptions_pkg.delete_row(i.subscription_guid);
   End Loop;
   commit;
Exception  
   When Others Then
      dbms_output.put_line(sqlerrm);
End;