The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure update_item_attr_vals(p_matches t_matches)
is
begin
forall k in 1..p_matches.id.COUNT
update wf_item_attribute_values SAVE_EXCEPTIONS
set text_value = p_matches.url(k)
where rowid = p_matches.id(k);
procedure update_ntf_attrs(p_matches t_matches)
is
begin
--use SAVE_EXCEPTIONS here
forall k in 1..p_matches.id.COUNT
update wf_notification_attributes SAVE_EXCEPTIONS
set text_value = p_matches.url(k)
where rowid = p_matches.id(k);
function getUpdatedUrl(
p_oldUrl in varchar2) return varchar2
is
l_newUrl varchar2(4000);
wf_monitor.updateToFwkMonitorUrl(
oldUrl => p_oldUrl,
newUrl => l_newUrl,
errorCode => l_retcode);
wf_event_html.updateToFwkEvtDataUrl(
oldUrl => p_oldUrl,
newUrl => l_newUrl,
errorCode => l_retcode);
wf_event_html.updateToFwkEvtSubscriptionUrl(
oldUrl => p_oldUrl,
newUrl => l_newUrl,
errorCode => l_retcode);
procedure update_ntf_attr
is
--using FOR UPDATE OF, as there is some pl/sql processing before the update
cursor url_c is
select /*+ PARALLEL(wf_notifications, wf_notification_attributes) */
wfna.rowid,
wfna.text_value
from wf_notifications wfn,
wf_notification_attributes wfna
where wfn.notification_id = wfna.notification_id
and wfn.status = 'OPEN'
and (UPPER(wfna.text_value) like 'HTTP%PLS%WF_MONITOR.BUILDMONITOR%'
or UPPER(wfna.text_value) like 'HTTP%PLS%WF_EVENT_HTML.EVENTDATA%'
or UPPER(wfna.text_value) like 'HTTP%PLS%WF_EVENT_HTML.EVENTSUBS%');
l_nta_matches.url(i) := getUpdatedUrl(l_nta_matches.url(i));
update_ntf_attrs(l_nta_matches);
procedure update_item_attr_val
is
cursor url_c is
select /*+ PARALLEL(wf_items, wf_item_attribute_values) */
wfiav.rowid,
wfiav.text_value
from wf_items wfi,
wf_item_attribute_values wfiav
where wfi.item_type = wfiav.item_type
and wfi.item_key = wfiav.item_key
and wfi.end_date is null
and (UPPER(wfiav.text_value) like 'HTTP%PLS%WF_MONITOR.BUILDMONITOR%'
or UPPER(wfiav.text_value) like 'HTTP%PLS%WF_EVENT_HTML.EVENTDATA%'
or UPPER(wfiav.text_value) like 'HTTP%PLS%WF_EVENT_HTML.EVENTSUBS%');
l_iav_matches.url(i) := getUpdatedUrl(l_iav_matches.url(i));
update_item_attr_vals(l_iav_matches);
procedure update_wf_attrs
(
errbuf out NOCOPY varchar2,
retcode out NOCOPY varchar2)
is
begin
update_ntf_attr();
update_item_attr_val();