201: -- Here we only raise an event and leave the message as is.
202: -- oracle.apps.wf.notification.send.failure
203: parameterlist := wf_parameter_list_t();
204:
205: wf_event.AddParameterToList('NOTIFICATION_ID',nid,parameterlist);
206: wf_event.AddParameterToList('ROLE',l_role,parameterlist);
207: wf_event.AddParameterToList('STATUS',status,parameterlist);
208: wf_event.AddParameterToList('ERROR_NAME',error_name,
209: parameterlist);
202: -- oracle.apps.wf.notification.send.failure
203: parameterlist := wf_parameter_list_t();
204:
205: wf_event.AddParameterToList('NOTIFICATION_ID',nid,parameterlist);
206: wf_event.AddParameterToList('ROLE',l_role,parameterlist);
207: wf_event.AddParameterToList('STATUS',status,parameterlist);
208: wf_event.AddParameterToList('ERROR_NAME',error_name,
209: parameterlist);
210: wf_event.AddParameterToList('EXTERNAL_ERROR',external_error,
203: parameterlist := wf_parameter_list_t();
204:
205: wf_event.AddParameterToList('NOTIFICATION_ID',nid,parameterlist);
206: wf_event.AddParameterToList('ROLE',l_role,parameterlist);
207: wf_event.AddParameterToList('STATUS',status,parameterlist);
208: wf_event.AddParameterToList('ERROR_NAME',error_name,
209: parameterlist);
210: wf_event.AddParameterToList('EXTERNAL_ERROR',external_error,
211: parameterlist);
204:
205: wf_event.AddParameterToList('NOTIFICATION_ID',nid,parameterlist);
206: wf_event.AddParameterToList('ROLE',l_role,parameterlist);
207: wf_event.AddParameterToList('STATUS',status,parameterlist);
208: wf_event.AddParameterToList('ERROR_NAME',error_name,
209: parameterlist);
210: wf_event.AddParameterToList('EXTERNAL_ERROR',external_error,
211: parameterlist);
212: wf_event.addParameterToList('Q_CORRELATION_ID', l_mType || ':' || l_mName, parameterlist);
206: wf_event.AddParameterToList('ROLE',l_role,parameterlist);
207: wf_event.AddParameterToList('STATUS',status,parameterlist);
208: wf_event.AddParameterToList('ERROR_NAME',error_name,
209: parameterlist);
210: wf_event.AddParameterToList('EXTERNAL_ERROR',external_error,
211: parameterlist);
212: wf_event.addParameterToList('Q_CORRELATION_ID', l_mType || ':' || l_mName, parameterlist);
213:
214: --Raise the event
208: wf_event.AddParameterToList('ERROR_NAME',error_name,
209: parameterlist);
210: wf_event.AddParameterToList('EXTERNAL_ERROR',external_error,
211: parameterlist);
212: wf_event.addParameterToList('Q_CORRELATION_ID', l_mType || ':' || l_mName, parameterlist);
213:
214: --Raise the event
215: wf_event.Raise(p_event_name => 'oracle.apps.wf.notification.send.failure',
216: p_event_key => l_role,
211: parameterlist);
212: wf_event.addParameterToList('Q_CORRELATION_ID', l_mType || ':' || l_mName, parameterlist);
213:
214: --Raise the event
215: wf_event.Raise(p_event_name => 'oracle.apps.wf.notification.send.failure',
216: p_event_key => l_role,
217: p_parameters => parameterlist);
218:
219: elsif UpdateStatus2.status = 'UNAVAIL' then
223: -- that indicates that a recipient is not available to respond
224: -- to the notification.
225: parameterlist := wf_parameter_list_t();
226:
227: wf_event.AddParameterToList('NOTIFICATION_ID', UpdateStatus2.nid, parameterlist);
228: wf_event.AddParameterToList('STATUS', UpdateStatus2.status, parameterlist);
229:
230: -- Just for Future point of view. (...receive.unavail event).
231: wf_event.addParameterToList('Q_CORRELATION_ID', l_mType || ':' || l_mName, parameterlist);
224: -- to the notification.
225: parameterlist := wf_parameter_list_t();
226:
227: wf_event.AddParameterToList('NOTIFICATION_ID', UpdateStatus2.nid, parameterlist);
228: wf_event.AddParameterToList('STATUS', UpdateStatus2.status, parameterlist);
229:
230: -- Just for Future point of view. (...receive.unavail event).
231: wf_event.addParameterToList('Q_CORRELATION_ID', l_mType || ':' || l_mName, parameterlist);
232:
227: wf_event.AddParameterToList('NOTIFICATION_ID', UpdateStatus2.nid, parameterlist);
228: wf_event.AddParameterToList('STATUS', UpdateStatus2.status, parameterlist);
229:
230: -- Just for Future point of view. (...receive.unavail event).
231: wf_event.addParameterToList('Q_CORRELATION_ID', l_mType || ':' || l_mName, parameterlist);
232:
233: -- Raise the event
234: -- As of now there is NO subscription of this event with SOURCE_TYPE LOCAL.
235: -- So this is just for future point of view ....
232:
233: -- Raise the event
234: -- As of now there is NO subscription of this event with SOURCE_TYPE LOCAL.
235: -- So this is just for future point of view ....
236: wf_event.Raise(p_event_name=>'oracle.apps.wf.notification.receive.unavail',
237: p_event_key => to_char(nid),
238: p_parameters => parameterlist);
239:
240: elsif (UpdateStatus2.status = 'SENT') then
403: -- there has been a failure to deliver to their email address.
404: -- This function is triggered by the oracle.apps.wf.notification.send.failure
405: -- event.
406: function Disable_Recipient_Ntf_Pref(p_subscription_guid in raw,
407: p_event in out NOCOPY WF_EVENT_T) return varchar2
408: is
409:
410: role varchar2(320);
411: recipient varchar2(320);
456: 'BEGIN');
457: end if;
458: role := p_event.getEventKey();
459: params := p_event.getParameterList();
460: errorName := wf_event.getValueForParameter('ERROR_NAME', params);
461: externError := wf_event.getValueForParameter('EXTERNAL_ERROR', params);
462: nid := to_number(wf_event.getValueForParameter('NOTIFICATION_ID', params));
463:
464: if errorName = 'WFMLRSND_FAILED_UNDELIVERABLE' or
457: end if;
458: role := p_event.getEventKey();
459: params := p_event.getParameterList();
460: errorName := wf_event.getValueForParameter('ERROR_NAME', params);
461: externError := wf_event.getValueForParameter('EXTERNAL_ERROR', params);
462: nid := to_number(wf_event.getValueForParameter('NOTIFICATION_ID', params));
463:
464: if errorName = 'WFMLRSND_FAILED_UNDELIVERABLE' or
465: errorName = 'WFMLRSND_FAILED_DELIVERY' then
458: role := p_event.getEventKey();
459: params := p_event.getParameterList();
460: errorName := wf_event.getValueForParameter('ERROR_NAME', params);
461: externError := wf_event.getValueForParameter('EXTERNAL_ERROR', params);
462: nid := to_number(wf_event.getValueForParameter('NOTIFICATION_ID', params));
463:
464: if errorName = 'WFMLRSND_FAILED_UNDELIVERABLE' or
465: errorName = 'WFMLRSND_FAILED_DELIVERY' then
466:
604: else
605:
606: paramList.DELETE;
607:
608: wf_event.AddParameterToList('USER_NAME', tokens(tk),
609: paramList);
610: wf_event.AddParameterToList('ORCLWORKFLOWNOTIFICATIONPREF',
611: 'DISABLED', paramList);
612:
606: paramList.DELETE;
607:
608: wf_event.AddParameterToList('USER_NAME', tokens(tk),
609: paramList);
610: wf_event.AddParameterToList('ORCLWORKFLOWNOTIFICATIONPREF',
611: 'DISABLED', paramList);
612:
613: wf_event.AddParameterToList('RAISEERRORS',
614: 'TRUE', paramList);
609: paramList);
610: wf_event.AddParameterToList('ORCLWORKFLOWNOTIFICATIONPREF',
611: 'DISABLED', paramList);
612:
613: wf_event.AddParameterToList('RAISEERRORS',
614: 'TRUE', paramList);
615: begin
616: wf_local_synch.propagate_user(p_orig_system => orig_system,
617: p_orig_system_id => orig_system_id,
673: -- Hardcoding the recipient as SYSADMIN. The WFERROR process
674: -- notifications all have the same, hardcoded value for their
675: -- recipients.
676:
677: -- Bug 6431003: Modifying the value of wf_event.phase_maxthreshold
678: -- so that the event gets deferred.
679:
680: -- Taking the backup of current wf_event.phase_maxthreshold value
681:
676:
677: -- Bug 6431003: Modifying the value of wf_event.phase_maxthreshold
678: -- so that the event gets deferred.
679:
680: -- Taking the backup of current wf_event.phase_maxthreshold value
681:
682: current_maxthreshold := wf_event.phase_maxthreshold;
683: wf_event.SetDispatchMode ('ASYNC');
684:
678: -- so that the event gets deferred.
679:
680: -- Taking the backup of current wf_event.phase_maxthreshold value
681:
682: current_maxthreshold := wf_event.phase_maxthreshold;
683: wf_event.SetDispatchMode ('ASYNC');
684:
685: alertNid := WF_NOTIFICATION.send(role => 'SYSADMIN',
686: msg_type => 'WFMAIL',
679:
680: -- Taking the backup of current wf_event.phase_maxthreshold value
681:
682: current_maxthreshold := wf_event.phase_maxthreshold;
683: wf_event.SetDispatchMode ('ASYNC');
684:
685: alertNid := WF_NOTIFICATION.send(role => 'SYSADMIN',
686: msg_type => 'WFMAIL',
687: msg_name => 'USER_PREF_UPDATE_REPORT');
700:
701: -- Ensure that the subject is correctly populated.
702: WF_NOTIFICATION.Denormalize_Notification(alertNid);
703:
704: -- Resetting the wf_event.phase_maxthreshold value
705: wf_event.phase_maxthreshold := current_maxthreshold;
706:
707: end if;
708:
701: -- Ensure that the subject is correctly populated.
702: WF_NOTIFICATION.Denormalize_Notification(alertNid);
703:
704: -- Resetting the wf_event.phase_maxthreshold value
705: wf_event.phase_maxthreshold := current_maxthreshold;
706:
707: end if;
708:
709: end if;
969: into role, group_id, mType, mName
970: from wf_notifications
971: where notification_id = nid;
972:
973: wf_event.AddParameterToList('NOTIFICATION_ID', nid, parameterlist);
974: wf_event.AddParameterToList('ROLE', role, parameterlist);
975: wf_event.AddParameterToList('GROUP_ID', nvl(group_id, nid), parameterlist);
976: wf_event.addParameterToList('Q_CORRELATION_ID', mType || ':' || mName, parameterlist);
977:
970: from wf_notifications
971: where notification_id = nid;
972:
973: wf_event.AddParameterToList('NOTIFICATION_ID', nid, parameterlist);
974: wf_event.AddParameterToList('ROLE', role, parameterlist);
975: wf_event.AddParameterToList('GROUP_ID', nvl(group_id, nid), parameterlist);
976: wf_event.addParameterToList('Q_CORRELATION_ID', mType || ':' || mName, parameterlist);
977:
978: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
971: where notification_id = nid;
972:
973: wf_event.AddParameterToList('NOTIFICATION_ID', nid, parameterlist);
974: wf_event.AddParameterToList('ROLE', role, parameterlist);
975: wf_event.AddParameterToList('GROUP_ID', nvl(group_id, nid), parameterlist);
976: wf_event.addParameterToList('Q_CORRELATION_ID', mType || ':' || mName, parameterlist);
977:
978: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
979: wf_log_pkg.string(WF_LOG_PKG.level_statement,
972:
973: wf_event.AddParameterToList('NOTIFICATION_ID', nid, parameterlist);
974: wf_event.AddParameterToList('ROLE', role, parameterlist);
975: wf_event.AddParameterToList('GROUP_ID', nvl(group_id, nid), parameterlist);
976: wf_event.addParameterToList('Q_CORRELATION_ID', mType || ':' || mName, parameterlist);
977:
978: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
979: wf_log_pkg.string(WF_LOG_PKG.level_statement,
980: 'wf.plsql.WF_MAIL.HandleResponseError',
981: 'Raising the Send event');
982: end if;
983:
984: --Raise the event
985: wf_event.Raise(p_event_name => 'oracle.apps.wf.notification.send',
986: p_event_key => to_char(nid),
987: p_parameters => parameterlist);
988:
989: exception
7865: l_pos integer;
7866: l_amt number;
7867:
7868: l_msg_doc clob;
7869: l_event wf_event_t;
7870: l_agent wf_agent_t;
7871: l_parameter_list wf_parameter_list_t;
7872: l_event_name varchar2(240);
7873: l_event_key varchar2(240);
8155:
8156: --
8157: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'NOTIFICATIONGROUP', l_pos, l_occurance);
8158:
8159: wf_event_t.Initialize(l_event);
8160:
8161: l_event.event_name := wf_xml.WF_NTF_SEND_MESSAGE;
8162:
8163: -- Create an event key based firstly on the parameter. If that does not
8172: end if;
8173:
8174: l_event.SetEventData(l_msg_doc);
8175:
8176: l_agent := wf_agent_t('WF_NOTIFICATION_OUT', wf_event.local_system_name);
8177: l_event.SetFromAgent(l_agent);
8178:
8179: -- Generally it would be 'ALR'
8180: if(instr( send.p_module, ':') = 0) then
8184: END if;
8185:
8186: l_event.addParameterToList('NOTIFICATION_ID', '0');
8187:
8188: wf_event.send(l_event);
8189:
8190: -- Release allocated temp LOBs back to pool
8191: wf_temp_lob.releaseLob(g_LOBTable, l_messageIdx);
8192:
8260: l_messageidx pls_integer;
8261: l_pos INTEGER;
8262: l_occurance INTEGER := 1;
8263:
8264: l_event wf_event_t;
8265: l_agent wf_agent_t;
8266:
8267: l_start pls_integer;
8268: l_end pls_integer;
8608: 'wf.plsql.WF_MAIL.SendMoreInfoResponseWarning',
8609: 'Initializing ' || wf_xml.wf_ntf_send_message || ' event');
8610: end if;
8611:
8612: wf_event_t.initialize(l_event);
8613: l_event.event_name := wf_xml.wf_ntf_send_message;
8614:
8615: -- Create an event key : make it as 0 so that this warning message
8616: -- waon't rely on wf_notification TABLE.
8616: -- waon't rely on wf_notification TABLE.
8617: l_event.event_key := 0;
8618: l_event.seteventdata(l_msg_doc);
8619:
8620: l_agent := wf_agent_t('WF_NOTIFICATION_OUT',wf_event.local_system_name);
8621: l_event.setfromagent(l_agent);
8622:
8623: l_event.addparametertolist('Q_CORRELATION_ID',l_msg_type || ':' ||l_msg_name);
8624: l_event.addparametertolist('NOTIFICATION_ID','0');
8622:
8623: l_event.addparametertolist('Q_CORRELATION_ID',l_msg_type || ':' ||l_msg_name);
8624: l_event.addparametertolist('NOTIFICATION_ID','0');
8625:
8626: wf_event.send(l_event);
8627:
8628: -- Release allocated temp LOBs back to pool
8629: wf_temp_lob.releaselob(g_lobtable, l_messageidx);
8630:
8663:
8664: if (p_status in ('ENABLED', 'DISABLED')) then
8665: -- Update the notification send event group subscription
8666: -- with the specified status
8667: UPDATE wf_event_subscriptions
8668: SET status = p_status
8669: WHERE rule_data = 'MESSAGE'
8670: AND owner_name = 'Oracle Workflow'
8671: AND owner_tag = 'FND'
8670: AND owner_name = 'Oracle Workflow'
8671: AND owner_tag = 'FND'
8672: AND event_filter_guid
8673: IN (SELECT guid
8674: FROM wf_events
8675: WHERE name = 'oracle.apps.wf.notification.send.group'
8676: AND type = 'GROUP')
8677: AND out_agent_guid
8678: IN (SELECT guid