73: *If the systems to which the icc is published contain the system defined in susbcription paramter 'PUB_SYSTEM',
74: *start workflow process 'WF_PUB_ICC_NOTIFICATION' to send notification.
75: */
76: FUNCTION SEND_NOTIFICATION(p_subscription in RAW,
77: p_event in out NOCOPY WF_EVENT_T)return varchar2
78: IS
79: l_rule VARCHAR2(20);
80: l_batch_id NUMBER;
81: l_mail_to VARCHAR2(320);
91: *Get subscription parameters
92: */
93: select parameters
94: into l_subparams
95: from wf_event_subscriptions
96: where guid = p_subscription;
97:
98: if l_subparams is not null then
99: l_mail_to := wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'MAIL_TO') ;
95: from wf_event_subscriptions
96: where guid = p_subscription;
97:
98: if l_subparams is not null then
99: l_mail_to := wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'MAIL_TO') ;
100: l_wf_admin := wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'WF_ADMINISTRATOR') ;
101: l_system :=wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'PUB_SYSTEM') ;
102: l_wf_admin := CONVERT_PERFORMER(l_wf_admin);
103: if l_wf_admin is null then
96: where guid = p_subscription;
97:
98: if l_subparams is not null then
99: l_mail_to := wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'MAIL_TO') ;
100: l_wf_admin := wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'WF_ADMINISTRATOR') ;
101: l_system :=wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'PUB_SYSTEM') ;
102: l_wf_admin := CONVERT_PERFORMER(l_wf_admin);
103: if l_wf_admin is null then
104: l_wf_admin :=WF_DEFAULT_ADMIN;
97:
98: if l_subparams is not null then
99: l_mail_to := wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'MAIL_TO') ;
100: l_wf_admin := wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'WF_ADMINISTRATOR') ;
101: l_system :=wf_event_functions_pkg.subscriptionparameters(p_string=>l_subparams,p_key=> 'PUB_SYSTEM') ;
102: l_wf_admin := CONVERT_PERFORMER(l_wf_admin);
103: if l_wf_admin is null then
104: l_wf_admin :=WF_DEFAULT_ADMIN;
105: end if;
123: 'SEND_NOTIFICATION',
124: p_event.geteventname(),
125: p_subscription,
126: SQLERRM);
127: wf_event.seterrorinfo(p_event, 'ERROR');
128: RETURN 'ERROR';
129: END SEND_NOTIFICATION;
130:
131: