558:
559: delete from wf_activity_attributes
560: where ACTIVITY_ITEM_TYPE = p_item_type;
561:
562: delete from wf_activities_tl ACTL
563: where ACTL.ITEM_TYPE = p_item_type
564: and not exists(select 'X' from wf_process_activities PAC
565: where PAC.ACTIVITY_ITEM_TYPE='WFSTD'
566: and PAC.ACTIVITY_ITEM_TYPE=p_item_type
565: where PAC.ACTIVITY_ITEM_TYPE='WFSTD'
566: and PAC.ACTIVITY_ITEM_TYPE=p_item_type
567: and PAC.ACTIVITY_NAME = ACTL.NAME);
568:
569: delete from wf_activities ACT
570: where ACT.ITEM_TYPE = p_item_type
571: and not exists(select 'X' from wf_process_activities PAC
572: where PAC.ACTIVITY_ITEM_TYPE='WFSTD'
573: and PAC.ACTIVITY_ITEM_TYPE=p_item_type