290:
291: -- Dequeue from the exception queue
292: -- and re-enqueue the message.
293: l_timeout := FALSE;
294: wf_xml.setFirstMessage('TRUE');
295: while not l_timeout loop
296: wf_xml.GetExceptionMessage(p_queue, l_nid, l_recipient, l_status,
297: l_timeout, l_error_result);
298: if ( not l_timeout ) then
292: -- and re-enqueue the message.
293: l_timeout := FALSE;
294: wf_xml.setFirstMessage('TRUE');
295: while not l_timeout loop
296: wf_xml.GetExceptionMessage(p_queue, l_nid, l_recipient, l_status,
297: l_timeout, l_error_result);
298: if ( not l_timeout ) then
299: update WF_NOTIFICATIONS N
300: set N.MAIL_STATUS = 'MAIL'
298: if ( not l_timeout ) then
299: update WF_NOTIFICATIONS N
300: set N.MAIL_STATUS = 'MAIL'
301: where N.NOTIFICATION_ID = l_nid;
302: -- wf_xml.EnqueueNotification(l_nid);
303: end if;
304: end loop;
305: commit;
306:
962: -- Set the mail_status to INVALID (mailer will pick this up)
963: update WF_NOTIFICATIONS
964: set MAIL_STATUS = 'INVALID'
965: where NOTIFICATION_ID = nid;
966: -- wf_xml.enqueueNotification(nid);
967:
968: select recipient_role, group_id, message_type, message_name
969: into role, group_id, mType, mName
970: from wf_notifications
4998:
4999:
5000: -- GetLOBMessage4 - get email message data as a LOB
5001: -- Bug 10202313: Added n_status, n_mstatus parameters to store the status, mail_status
5002: -- columns of wf_notifications table which are propagated from WF_XML.GenerateMessage() API
5003: --
5004: -- IN
5005: -- notification id
5006: -- mailer node name
5265: t_headerText := '';
5266: t_headerHTML := '';
5267: step := 'Getting body';
5268: if (r_ntf_pref in ('MAILTEXT', 'MAILATTH')) then
5269: -- Below Allocated TEMP LOB here is released within WF_XML.getBodyPart
5270: -- ( which is called by caller of GetLOBMessage4 API)
5271: -- based on the Ntf type (text/plain or text/html) by calling wf_mail.CloseLOB
5272: g_text_messageIdx := wf_temp_lob.getLob(g_LOBTable);
5273:
5301: end if;
5302: end if;
5303:
5304: if (r_ntf_pref in ('MAILHTML', 'MAILATTH', 'MAILHTM2')) then
5305: -- Below Allocated TEMP LOB IS released within WF_XML.getBodyPart
5306: -- based on the Ntf type (text/plain or text/html) by calling wf_mail.CloseLOB
5307: g_html_messageIdx := wf_temp_lob.getLob(g_LOBTable);
5308:
5309: if (renderbody = 'Y') then
7860: p_fyi_flag in varchar2)
7861: is
7862: l_module varchar2(10);
7863: l_str varchar2(4000);
7864: l_attrlist wf_xml.wf_xml_attr_table_type;
7865: l_pos integer;
7866: l_amt number;
7867:
7868: l_msg_doc clob;
7955: l_pos := length(l_str);
7956: dbms_lob.write(l_msg_doc, l_pos, 1, l_str);
7957:
7958: --
7959: wf_xml.AddElementAttribute('maxcount', '1', l_attrlist);
7960: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'NOTIFICATIONGROUP', '', l_attrlist);
7961: l_attrlist.DELETE;
7962:
7963: l_nodename := WF_MAILER_PARAMETER.GetValueForCorr(p_module, 'NODENAME');
7956: dbms_lob.write(l_msg_doc, l_pos, 1, l_str);
7957:
7958: --
7959: wf_xml.AddElementAttribute('maxcount', '1', l_attrlist);
7960: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'NOTIFICATIONGROUP', '', l_attrlist);
7961: l_attrlist.DELETE;
7962:
7963: l_nodename := WF_MAILER_PARAMETER.GetValueForCorr(p_module, 'NODENAME');
7964:
7975: l_idstr := null;
7976: end if;
7977:
7978: --
7979: wf_xml.AddElementAttribute('nid', '0', l_attrlist);
7980: wf_xml.AddElementAttribute('nidstr', l_idstr, l_attrlist);
7981: wf_xml.AddElementAttribute('language', p_language, l_attrlist);
7982: wf_xml.AddElementAttribute('territory', p_territory, l_attrlist);
7983: wf_xml.AddElementAttribute('codeset', p_codeset, l_attrlist);
7976: end if;
7977:
7978: --
7979: wf_xml.AddElementAttribute('nid', '0', l_attrlist);
7980: wf_xml.AddElementAttribute('nidstr', l_idstr, l_attrlist);
7981: wf_xml.AddElementAttribute('language', p_language, l_attrlist);
7982: wf_xml.AddElementAttribute('territory', p_territory, l_attrlist);
7983: wf_xml.AddElementAttribute('codeset', p_codeset, l_attrlist);
7984:
7977:
7978: --
7979: wf_xml.AddElementAttribute('nid', '0', l_attrlist);
7980: wf_xml.AddElementAttribute('nidstr', l_idstr, l_attrlist);
7981: wf_xml.AddElementAttribute('language', p_language, l_attrlist);
7982: wf_xml.AddElementAttribute('territory', p_territory, l_attrlist);
7983: wf_xml.AddElementAttribute('codeset', p_codeset, l_attrlist);
7984:
7985: -- <
7978: --
7979: wf_xml.AddElementAttribute('nid', '0', l_attrlist);
7980: wf_xml.AddElementAttribute('nidstr', l_idstr, l_attrlist);
7981: wf_xml.AddElementAttribute('language', p_language, l_attrlist);
7982: wf_xml.AddElementAttribute('territory', p_territory, l_attrlist);
7983: wf_xml.AddElementAttribute('codeset', p_codeset, l_attrlist);
7984:
7985: -- <
7986: -- Setting default parameter's value until ALR team starts to pass
7979: wf_xml.AddElementAttribute('nid', '0', l_attrlist);
7980: wf_xml.AddElementAttribute('nidstr', l_idstr, l_attrlist);
7981: wf_xml.AddElementAttribute('language', p_language, l_attrlist);
7982: wf_xml.AddElementAttribute('territory', p_territory, l_attrlist);
7983: wf_xml.AddElementAttribute('codeset', p_codeset, l_attrlist);
7984:
7985: -- <
7986: -- Setting default parameter's value until ALR team starts to pass
7987: -- below parameter's values.
7985: -- <
7986: -- Setting default parameter's value until ALR team starts to pass
7987: -- below parameter's values.
7988: -- TODO>>
7989: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
7990: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
7991: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7992: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7993:
7986: -- Setting default parameter's value until ALR team starts to pass
7987: -- below parameter's values.
7988: -- TODO>>
7989: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
7990: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
7991: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7992: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7993:
7994: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7987: -- below parameter's values.
7988: -- TODO>>
7989: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
7990: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
7991: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7992: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7993:
7994: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7995: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7988: -- TODO>>
7989: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
7990: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
7991: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7992: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7993:
7994: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7995: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7996: wf_xml.AddElementAttribute('node', l_nodename, l_attrlist);
7990: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
7991: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7992: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7993:
7994: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7995: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7996: wf_xml.AddElementAttribute('node', l_nodename, l_attrlist);
7997: wf_xml.AddElementAttribute('item_type', 'NULL', l_attrlist);
7998: wf_xml.AddElementAttribute('message_name', 'NULL', l_attrlist);
7991: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7992: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7993:
7994: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7995: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7996: wf_xml.AddElementAttribute('node', l_nodename, l_attrlist);
7997: wf_xml.AddElementAttribute('item_type', 'NULL', l_attrlist);
7998: wf_xml.AddElementAttribute('message_name', 'NULL', l_attrlist);
7999: wf_xml.AddElementAttribute('full-document', 'Y', l_attrlist);
7992: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7993:
7994: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7995: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7996: wf_xml.AddElementAttribute('node', l_nodename, l_attrlist);
7997: wf_xml.AddElementAttribute('item_type', 'NULL', l_attrlist);
7998: wf_xml.AddElementAttribute('message_name', 'NULL', l_attrlist);
7999: wf_xml.AddElementAttribute('full-document', 'Y', l_attrlist);
8000:
7993:
7994: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7995: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7996: wf_xml.AddElementAttribute('node', l_nodename, l_attrlist);
7997: wf_xml.AddElementAttribute('item_type', 'NULL', l_attrlist);
7998: wf_xml.AddElementAttribute('message_name', 'NULL', l_attrlist);
7999: wf_xml.AddElementAttribute('full-document', 'Y', l_attrlist);
8000:
8001: if (p_callback_event is not null) then
7994: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7995: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7996: wf_xml.AddElementAttribute('node', l_nodename, l_attrlist);
7997: wf_xml.AddElementAttribute('item_type', 'NULL', l_attrlist);
7998: wf_xml.AddElementAttribute('message_name', 'NULL', l_attrlist);
7999: wf_xml.AddElementAttribute('full-document', 'Y', l_attrlist);
8000:
8001: if (p_callback_event is not null) then
8002: wf_xml.AddElementAttribute('callback', p_callback_event, l_attrlist);
7995: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7996: wf_xml.AddElementAttribute('node', l_nodename, l_attrlist);
7997: wf_xml.AddElementAttribute('item_type', 'NULL', l_attrlist);
7998: wf_xml.AddElementAttribute('message_name', 'NULL', l_attrlist);
7999: wf_xml.AddElementAttribute('full-document', 'Y', l_attrlist);
8000:
8001: if (p_callback_event is not null) then
8002: wf_xml.AddElementAttribute('callback', p_callback_event, l_attrlist);
8003: end if;
7998: wf_xml.AddElementAttribute('message_name', 'NULL', l_attrlist);
7999: wf_xml.AddElementAttribute('full-document', 'Y', l_attrlist);
8000:
8001: if (p_callback_event is not null) then
8002: wf_xml.AddElementAttribute('callback', p_callback_event, l_attrlist);
8003: end if;
8004:
8005: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'NOTIFICATION', '', l_attrlist);
8006: l_attrlist.DELETE;
8001: if (p_callback_event is not null) then
8002: wf_xml.AddElementAttribute('callback', p_callback_event, l_attrlist);
8003: end if;
8004:
8005: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'NOTIFICATION', '', l_attrlist);
8006: l_attrlist.DELETE;
8007:
8008: dbms_lob.createTemporary(l_recp_clob, TRUE, dbms_lob.call);
8009:
8015: l_name := replace(p_recipient_list(i).name, g_newline);
8016: l_recp_type := p_recipient_list(i).recipient_type;
8017:
8018: --
8019: wf_xml.AddElementAttribute('name', l_name, l_attrlist);
8020: wf_xml.AddElementAttribute('type', l_recp_type, l_attrlist);
8021: l_recp_pos := wf_xml.NewTag(l_recp_tmp, l_recp_pos, 'RECIPIENT', '', l_attrlist);
8022: l_attrlist.DELETE;
8023:
8016: l_recp_type := p_recipient_list(i).recipient_type;
8017:
8018: --
8019: wf_xml.AddElementAttribute('name', l_name, l_attrlist);
8020: wf_xml.AddElementAttribute('type', l_recp_type, l_attrlist);
8021: l_recp_pos := wf_xml.NewTag(l_recp_tmp, l_recp_pos, 'RECIPIENT', '', l_attrlist);
8022: l_attrlist.DELETE;
8023:
8024: --
8017:
8018: --
8019: wf_xml.AddElementAttribute('name', l_name, l_attrlist);
8020: wf_xml.AddElementAttribute('type', l_recp_type, l_attrlist);
8021: l_recp_pos := wf_xml.NewTag(l_recp_tmp, l_recp_pos, 'RECIPIENT', '', l_attrlist);
8022: l_attrlist.DELETE;
8023:
8024: --
8025: l_recp_pos := wf_xml.NewTag(l_recp_tmp, l_recp_pos, 'NAME', l_name, l_attrlist);
8021: l_recp_pos := wf_xml.NewTag(l_recp_tmp, l_recp_pos, 'RECIPIENT', '', l_attrlist);
8022: l_attrlist.DELETE;
8023:
8024: --
8025: l_recp_pos := wf_xml.NewTag(l_recp_tmp, l_recp_pos, 'NAME', l_name, l_attrlist);
8026: l_recp_pos := wf_xml.SkipTag(l_recp_tmp, 'NAME', l_recp_pos, l_occurance);
8027:
8028: --
8029: l_email := '';
8022: l_attrlist.DELETE;
8023:
8024: --
8025: l_recp_pos := wf_xml.NewTag(l_recp_tmp, l_recp_pos, 'NAME', l_name, l_attrlist);
8026: l_recp_pos := wf_xml.SkipTag(l_recp_tmp, 'NAME', l_recp_pos, l_occurance);
8027:
8028: --
8029: l_email := '';
8030: l_recp_pos := wf_xml.NewTag(l_recp_tmp, l_recp_pos, 'ADDRESS', l_email, l_attrlist);
8026: l_recp_pos := wf_xml.SkipTag(l_recp_tmp, 'NAME', l_recp_pos, l_occurance);
8027:
8028: --
8027:
8028: --
8030: l_recp_pos := wf_xml.NewTag(l_recp_tmp, l_recp_pos, 'ADDRESS', l_email, l_attrlist);
8031: l_recp_pos := wf_xml.SkipTag(l_recp_tmp, 'ADDRESS', l_recp_pos, l_occurance);
8032:
8033: --
8034: l_recp_pos := wf_xml.SkipTag(l_recp_tmp, 'RECIPIENT', l_recp_pos, l_occurance);
8035: l_attrlist.DELETE;
8036:
8037: i := p_recipient_list.next(i);
8038:
8053: --
8054: l_recp_pos := 0;
8055: if (l_recp_is_lob) then
8056: dbms_lob.createTemporary(l_recp, TRUE, dbms_lob.call);
8057: l_recp_pos := wf_xml.NewLOBTag(l_recp, l_recp_pos, 'RECIPIENTLIST', l_recp_clob, l_attrlist);
8058: l_recp_pos := wf_xml.SkipLOBTag(l_recp, 'RECIPIENTLIST', l_recp_pos, l_occurance);
8059: else
8060: l_recp_pos := wf_xml.NewTag(l_recp_txt, l_recp_pos, 'RECIPIENTLIST', l_recp_tmp, l_attrlist);
8061: l_recp_pos := wf_xml.SkipTag(l_recp_txt, 'RECIPIENTLIST', l_recp_pos, l_occurance);
8054: l_recp_pos := 0;
8055: if (l_recp_is_lob) then
8056: dbms_lob.createTemporary(l_recp, TRUE, dbms_lob.call);
8057: l_recp_pos := wf_xml.NewLOBTag(l_recp, l_recp_pos, 'RECIPIENTLIST', l_recp_clob, l_attrlist);
8058: l_recp_pos := wf_xml.SkipLOBTag(l_recp, 'RECIPIENTLIST', l_recp_pos, l_occurance);
8059: else
8060: l_recp_pos := wf_xml.NewTag(l_recp_txt, l_recp_pos, 'RECIPIENTLIST', l_recp_tmp, l_attrlist);
8061: l_recp_pos := wf_xml.SkipTag(l_recp_txt, 'RECIPIENTLIST', l_recp_pos, l_occurance);
8062: end if;
8056: dbms_lob.createTemporary(l_recp, TRUE, dbms_lob.call);
8057: l_recp_pos := wf_xml.NewLOBTag(l_recp, l_recp_pos, 'RECIPIENTLIST', l_recp_clob, l_attrlist);
8058: l_recp_pos := wf_xml.SkipLOBTag(l_recp, 'RECIPIENTLIST', l_recp_pos, l_occurance);
8059: else
8060: l_recp_pos := wf_xml.NewTag(l_recp_txt, l_recp_pos, 'RECIPIENTLIST', l_recp_tmp, l_attrlist);
8061: l_recp_pos := wf_xml.SkipTag(l_recp_txt, 'RECIPIENTLIST', l_recp_pos, l_occurance);
8062: end if;
8063:
8064: l_hdr_pos := 0;
8057: l_recp_pos := wf_xml.NewLOBTag(l_recp, l_recp_pos, 'RECIPIENTLIST', l_recp_clob, l_attrlist);
8058: l_recp_pos := wf_xml.SkipLOBTag(l_recp, 'RECIPIENTLIST', l_recp_pos, l_occurance);
8059: else
8060: l_recp_pos := wf_xml.NewTag(l_recp_txt, l_recp_pos, 'RECIPIENTLIST', l_recp_tmp, l_attrlist);
8061: l_recp_pos := wf_xml.SkipTag(l_recp_txt, 'RECIPIENTLIST', l_recp_pos, l_occurance);
8062: end if;
8063:
8064: l_hdr_pos := 0;
8065: l_hdr_tmp := '';
8065: l_hdr_tmp := '';
8066:
8067: if (p_from is not null or p_replyto is not null) then
8068: --
8069: l_hdr_pos := wf_xml.NewTag(l_hdr_tmp, l_hdr_pos, 'FROM', '', l_attrlist);
8070:
8071: --
8072: if (p_from is not null) then
8073: l_from := replace(p_from, g_newLine);
8073: l_from := replace(p_from, g_newLine);
8074: -- Bug 13786156: Use CDATA for From header value as the XML parser is throwing SAXParseException
8075: -- in java layer when From value is email address of the form "Display Name
8076: l_from := '';
8077: l_hdr_pos := wf_xml.NewTag(l_hdr_tmp, l_hdr_pos, 'NAME', l_from, l_attrlist);
8078: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'NAME', l_hdr_pos, l_occurance);
8079: end if;
8080:
8081: --
8074: -- Bug 13786156: Use CDATA for From header value as the XML parser is throwing SAXParseException
8075: -- in java layer when From value is email address of the form "Display Name
8076: l_from := '';
8077: l_hdr_pos := wf_xml.NewTag(l_hdr_tmp, l_hdr_pos, 'NAME', l_from, l_attrlist);
8078: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'NAME', l_hdr_pos, l_occurance);
8079: end if;
8080:
8081: --
8082: if (p_replyto is not null) then
8081: --
8082: if (p_replyto is not null) then
8083: l_replyto := replace(p_replyto, g_newLine);
8084: l_replyto := '';
8085: l_hdr_pos := wf_xml.NewTag(l_hdr_tmp, l_hdr_pos, 'ADDRESS', l_replyto, l_attrlist);
8086: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'ADDRESS', l_hdr_pos, l_occurance);
8087: end if;
8088:
8089: --
8090: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'FROM', l_hdr_pos, l_occurance);
8086: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'ADDRESS', l_hdr_pos, l_occurance);
8087: end if;
8088:
8089: --
8090: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'FROM', l_hdr_pos, l_occurance);
8091: end if;
8092:
8093: l_subject := replace(p_subject, g_newLine);
8094: l_subject := '';
8091: end if;
8092:
8093: l_subject := replace(p_subject, g_newLine);
8094: l_subject := '';
8095: l_hdr_pos := wf_xml.NewTag(l_hdr_tmp, l_hdr_pos, 'SUBJECT', l_subject, l_attrlist);
8096: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'SUBJECT', l_hdr_pos, l_occurance);
8097:
8098: if (l_recp_is_lob) then
8099: dbms_lob.WriteAppend(l_recp, length(l_hdr_tmp), l_hdr_tmp);
8092:
8093: l_subject := replace(p_subject, g_newLine);
8094: l_subject := '';
8095: l_hdr_pos := wf_xml.NewTag(l_hdr_tmp, l_hdr_pos, 'SUBJECT', l_subject, l_attrlist);
8096: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'SUBJECT', l_hdr_pos, l_occurance);
8097:
8098: if (l_recp_is_lob) then
8099: dbms_lob.WriteAppend(l_recp, length(l_hdr_tmp), l_hdr_tmp);
8100: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'HEADER', l_recp, l_attrlist);
8096: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'SUBJECT', l_hdr_pos, l_occurance);
8097:
8098: if (l_recp_is_lob) then
8099: dbms_lob.WriteAppend(l_recp, length(l_hdr_tmp), l_hdr_tmp);
8100: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'HEADER', l_recp, l_attrlist);
8101: else
8102: l_hdr_tmp := l_recp_txt || l_hdr_tmp;
8103: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'HEADER', l_hdr_tmp, l_attrlist);
8104: end if;
8099: dbms_lob.WriteAppend(l_recp, length(l_hdr_tmp), l_hdr_tmp);
8100: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'HEADER', l_recp, l_attrlist);
8101: else
8102: l_hdr_tmp := l_recp_txt || l_hdr_tmp;
8103: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'HEADER', l_hdr_tmp, l_attrlist);
8104: end if;
8105: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'HEADER', l_pos, l_occurance);
8106: l_attrlist.DELETE;
8107:
8101: else
8102: l_hdr_tmp := l_recp_txt || l_hdr_tmp;
8103: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'HEADER', l_hdr_tmp, l_attrlist);
8104: end if;
8105: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'HEADER', l_pos, l_occurance);
8106: l_attrlist.DELETE;
8107:
8108: --
8109: wf_xml.AddElementAttribute('content-type', 'multipart/mixed', l_attrlist);
8105: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'HEADER', l_pos, l_occurance);
8106: l_attrlist.DELETE;
8107:
8108: --
8109: wf_xml.AddElementAttribute('content-type', 'multipart/mixed', l_attrlist);
8110: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'CONTENT', '', l_attrlist);
8111: l_attrlist.DELETE;
8112:
8113: --
8106: l_attrlist.DELETE;
8107:
8108: --
8109: wf_xml.AddElementAttribute('content-type', 'multipart/mixed', l_attrlist);
8110: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'CONTENT', '', l_attrlist);
8111: l_attrlist.DELETE;
8112:
8113: --
8114: wf_xml.AddElementAttribute('content-type', p_content_type, l_attrlist);
8110: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'CONTENT', '', l_attrlist);
8111: l_attrlist.DELETE;
8112:
8113: --
8114: wf_xml.AddElementAttribute('content-type', p_content_type, l_attrlist);
8115: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'BODYPART', '', l_attrlist);
8116:
8117: --
8118:
8111: l_attrlist.DELETE;
8112:
8113: --
8114: wf_xml.AddElementAttribute('content-type', p_content_type, l_attrlist);
8115: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'BODYPART', '', l_attrlist);
8116:
8117: --
8118:
8119: l_messageIdx := wf_temp_lob.getLOB(g_LOBTable);
8137: dbms_lob.writeAppend(g_LOBTable(l_messageIdx).temp_lob,
8138: length(l_end_cdata), l_end_cdata);
8139:
8140: -- Alert Message has been appended in XML Payload, can be released now
8141: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'MESSAGE',
8142: g_LOBTable(l_messageIdx).temp_lob, l_attrlist);
8143: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'MESSAGE', l_pos, l_occurance);
8144:
8145: l_attrlist.DELETE;
8139:
8140: -- Alert Message has been appended in XML Payload, can be released now
8141: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'MESSAGE',
8142: g_LOBTable(l_messageIdx).temp_lob, l_attrlist);
8143: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'MESSAGE', l_pos, l_occurance);
8144:
8145: l_attrlist.DELETE;
8146:
8147: --
8144:
8145: l_attrlist.DELETE;
8146:
8147: --
8148: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'BODYPART', l_pos, l_occurance);
8149:
8150: --
8151: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'CONTENT', l_pos, l_occurance);
8152:
8147: --
8148: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'BODYPART', l_pos, l_occurance);
8149:
8150: --
8151: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'CONTENT', l_pos, l_occurance);
8152:
8153: --
8154: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'NOTIFICATION', l_pos, l_occurance);
8155:
8150: --
8151: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'CONTENT', l_pos, l_occurance);
8152:
8153: --
8154: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'NOTIFICATION', l_pos, l_occurance);
8155:
8156: --
8157: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'NOTIFICATIONGROUP', l_pos, l_occurance);
8158:
8153: --
8154: l_pos := wf_xml.SkipLOBTag(l_msg_doc, 'NOTIFICATION', l_pos, l_occurance);
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;
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
8164: -- exist, then base it on the ID string. If that too is null (FYI for
8165: -- instance) then create a default, non unique key.
8254: l_orig_system varchar2(30);
8255: l_orig_system_id number;
8256:
8257: l_msg_doc CLOB;
8258: l_attrlist wf_xml.wf_xml_attr_table_type;
8259:
8260: l_messageidx pls_integer;
8261: l_pos INTEGER;
8262: l_occurance INTEGER := 1;
8428: l_pos := LENGTH(l_str);
8429: dbms_lob.WRITE(l_msg_doc, l_pos, 1, l_str);
8430:
8431: --
8432: wf_xml.AddElementAttribute('maxcount','1',l_attrlist);
8433: l_pos := wf_xml.newlobtag(l_msg_doc,l_pos,'NOTIFICATIONGROUP','',l_attrlist);
8434: l_attrlist.DELETE;
8435:
8436:
8429: dbms_lob.WRITE(l_msg_doc, l_pos, 1, l_str);
8430:
8431: --
8432: wf_xml.AddElementAttribute('maxcount','1',l_attrlist);
8433: l_pos := wf_xml.newlobtag(l_msg_doc,l_pos,'NOTIFICATIONGROUP','',l_attrlist);
8434: l_attrlist.DELETE;
8435:
8436:
8437: --
8436:
8437: --
8438: -- WF_NOTIFICATION.MAIL_STAUTS should not affect to deliver
8439: -- this warning message.
8440: wf_xml.AddElementAttribute('nid','0',l_attrlist);
8441: wf_xml.AddElementAttribute('nidstr',l_idstr,l_attrlist);
8442: wf_xml.AddElementAttribute('language',l_language,l_attrlist);
8443: wf_xml.AddElementAttribute('territory',l_territory,l_attrlist);
8444: wf_xml.AddElementAttribute('codeset',l_codeset,l_attrlist);
8437: --
8438: -- WF_NOTIFICATION.MAIL_STAUTS should not affect to deliver
8439: -- this warning message.
8440: wf_xml.AddElementAttribute('nid','0',l_attrlist);
8441: wf_xml.AddElementAttribute('nidstr',l_idstr,l_attrlist);
8442: wf_xml.AddElementAttribute('language',l_language,l_attrlist);
8443: wf_xml.AddElementAttribute('territory',l_territory,l_attrlist);
8444: wf_xml.AddElementAttribute('codeset',l_codeset,l_attrlist);
8445:
8438: -- WF_NOTIFICATION.MAIL_STAUTS should not affect to deliver
8439: -- this warning message.
8440: wf_xml.AddElementAttribute('nid','0',l_attrlist);
8441: wf_xml.AddElementAttribute('nidstr',l_idstr,l_attrlist);
8442: wf_xml.AddElementAttribute('language',l_language,l_attrlist);
8443: wf_xml.AddElementAttribute('territory',l_territory,l_attrlist);
8444: wf_xml.AddElementAttribute('codeset',l_codeset,l_attrlist);
8445:
8446: -- <
8439: -- this warning message.
8440: wf_xml.AddElementAttribute('nid','0',l_attrlist);
8441: wf_xml.AddElementAttribute('nidstr',l_idstr,l_attrlist);
8442: wf_xml.AddElementAttribute('language',l_language,l_attrlist);
8443: wf_xml.AddElementAttribute('territory',l_territory,l_attrlist);
8444: wf_xml.AddElementAttribute('codeset',l_codeset,l_attrlist);
8445:
8446: -- <
8447: -- Setting default parameter's value as for warning, as these parameters
8440: wf_xml.AddElementAttribute('nid','0',l_attrlist);
8441: wf_xml.AddElementAttribute('nidstr',l_idstr,l_attrlist);
8442: wf_xml.AddElementAttribute('language',l_language,l_attrlist);
8443: wf_xml.AddElementAttribute('territory',l_territory,l_attrlist);
8444: wf_xml.AddElementAttribute('codeset',l_codeset,l_attrlist);
8445:
8446: -- <
8447: -- Setting default parameter's value as for warning, as these parameters
8448: -- won't be used to update AppsContext (non-OAF content)
8446: -- <
8447: -- Setting default parameter's value as for warning, as these parameters
8448: -- won't be used to update AppsContext (non-OAF content)
8449: -- TODO>>
8450: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
8451: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
8452: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8453: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8454:
8447: -- Setting default parameter's value as for warning, as these parameters
8448: -- won't be used to update AppsContext (non-OAF content)
8449: -- TODO>>
8450: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
8451: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
8452: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8453: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8454:
8455: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8448: -- won't be used to update AppsContext (non-OAF content)
8449: -- TODO>>
8450: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
8451: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
8452: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8453: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8454:
8455: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8456: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8449: -- TODO>>
8450: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
8451: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
8452: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8453: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8454:
8455: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8456: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8457: wf_xml.AddElementAttribute('node',l_nodename,l_attrlist);
8451: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
8452: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8453: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8454:
8455: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8456: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8457: wf_xml.AddElementAttribute('node',l_nodename,l_attrlist);
8458: wf_xml.AddElementAttribute('item_type',l_msg_type,l_attrlist);
8459: wf_xml.AddElementAttribute('message_name',l_msg_name,l_attrlist);
8452: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8453: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8454:
8455: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8456: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8457: wf_xml.AddElementAttribute('node',l_nodename,l_attrlist);
8458: wf_xml.AddElementAttribute('item_type',l_msg_type,l_attrlist);
8459: wf_xml.AddElementAttribute('message_name',l_msg_name,l_attrlist);
8460: wf_xml.AddElementAttribute('full-document','Y',l_attrlist);
8453: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8454:
8455: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8456: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8457: wf_xml.AddElementAttribute('node',l_nodename,l_attrlist);
8458: wf_xml.AddElementAttribute('item_type',l_msg_type,l_attrlist);
8459: wf_xml.AddElementAttribute('message_name',l_msg_name,l_attrlist);
8460: wf_xml.AddElementAttribute('full-document','Y',l_attrlist);
8461:
8454:
8455: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8456: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8457: wf_xml.AddElementAttribute('node',l_nodename,l_attrlist);
8458: wf_xml.AddElementAttribute('item_type',l_msg_type,l_attrlist);
8459: wf_xml.AddElementAttribute('message_name',l_msg_name,l_attrlist);
8460: wf_xml.AddElementAttribute('full-document','Y',l_attrlist);
8461:
8462: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos,'NOTIFICATION','',l_attrlist);
8455: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8456: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8457: wf_xml.AddElementAttribute('node',l_nodename,l_attrlist);
8458: wf_xml.AddElementAttribute('item_type',l_msg_type,l_attrlist);
8459: wf_xml.AddElementAttribute('message_name',l_msg_name,l_attrlist);
8460: wf_xml.AddElementAttribute('full-document','Y',l_attrlist);
8461:
8462: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos,'NOTIFICATION','',l_attrlist);
8463: l_attrlist.DELETE;
8456: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8457: wf_xml.AddElementAttribute('node',l_nodename,l_attrlist);
8458: wf_xml.AddElementAttribute('item_type',l_msg_type,l_attrlist);
8459: wf_xml.AddElementAttribute('message_name',l_msg_name,l_attrlist);
8460: wf_xml.AddElementAttribute('full-document','Y',l_attrlist);
8461:
8462: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos,'NOTIFICATION','',l_attrlist);
8463: l_attrlist.DELETE;
8464:
8458: wf_xml.AddElementAttribute('item_type',l_msg_type,l_attrlist);
8459: wf_xml.AddElementAttribute('message_name',l_msg_name,l_attrlist);
8460: wf_xml.AddElementAttribute('full-document','Y',l_attrlist);
8461:
8462: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos,'NOTIFICATION','',l_attrlist);
8463: l_attrlist.DELETE;
8464:
8465: -- Below variabkes are just to generate HEADER of
8466: -- xml PAYLOAD
8466: -- xml PAYLOAD
8467: hdrxmlPos := 0;
8468: hdrxml := '';
8469:
8470: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'RECIPIENTLIST', '', l_attrlist);
8471:
8472: -- TO
8473: WF_XML.AddElementAttribute('name', l_to_role, l_attrlist);
8474: WF_XML.AddElementAttribute('type', 'to', l_attrlist);
8469:
8470: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'RECIPIENTLIST', '', l_attrlist);
8471:
8472: -- TO
8473: WF_XML.AddElementAttribute('name', l_to_role, l_attrlist);
8474: WF_XML.AddElementAttribute('type', 'to', l_attrlist);
8475:
8476: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'RECIPIENT', '', l_attrlist);
8477: l_attrlist.DELETE;
8470: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'RECIPIENTLIST', '', l_attrlist);
8471:
8472: -- TO
8473: WF_XML.AddElementAttribute('name', l_to_role, l_attrlist);
8474: WF_XML.AddElementAttribute('type', 'to', l_attrlist);
8475:
8476: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'RECIPIENT', '', l_attrlist);
8477: l_attrlist.DELETE;
8478:
8472: -- TO
8473: WF_XML.AddElementAttribute('name', l_to_role, l_attrlist);
8474: WF_XML.AddElementAttribute('type', 'to', l_attrlist);
8475:
8476: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'RECIPIENT', '', l_attrlist);
8477: l_attrlist.DELETE;
8478:
8479:
8480: if (l_display_name is not null or l_display_name <> '') then
8484: l_display_name := '';
8485: end if;
8486:
8487: -- attrlist is empty
8488: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'NAME', l_display_name, l_attrlist);
8489: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'NAME', hdrxmlPos, l_occurance);
8490:
8491: l_to_emailaddress := replace(l_to_emailaddress, g_newLine);
8492: l_to_emailaddress := '';
8485: end if;
8486:
8487: -- attrlist is empty
8488: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'NAME', l_display_name, l_attrlist);
8489: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'NAME', hdrxmlPos, l_occurance);
8490:
8491: l_to_emailaddress := replace(l_to_emailaddress, g_newLine);
8492: l_to_emailaddress := '';
8493:
8491: l_to_emailaddress := replace(l_to_emailaddress, g_newLine);
8492: l_to_emailaddress := '';
8493:
8494: -- attrlist is empty
8495: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'ADDRESS', l_to_emailaddress, l_attrlist);
8496: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'ADDRESS', hdrxmlPos, l_occurance);
8497:
8498: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'RECIPIENT', hdrxmlPos, l_occurance);
8499:
8492: l_to_emailaddress := '';
8493:
8494: -- attrlist is empty
8495: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'ADDRESS', l_to_emailaddress, l_attrlist);
8496: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'ADDRESS', hdrxmlPos, l_occurance);
8497:
8498: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'RECIPIENT', hdrxmlPos, l_occurance);
8499:
8500: -- end RECIPIENTLIST tag
8494: -- attrlist is empty
8495: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'ADDRESS', l_to_emailaddress, l_attrlist);
8496: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'ADDRESS', hdrxmlPos, l_occurance);
8497:
8498: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'RECIPIENT', hdrxmlPos, l_occurance);
8499:
8500: -- end RECIPIENTLIST tag
8501: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'RECIPIENTLIST', hdrxmlPos, l_occurance);
8502: l_attrlist.DELETE;
8497:
8498: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'RECIPIENT', hdrxmlPos, l_occurance);
8499:
8500: -- end RECIPIENTLIST tag
8501: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'RECIPIENTLIST', hdrxmlPos, l_occurance);
8502: l_attrlist.DELETE;
8503:
8504:
8505: -- Use from_role which asked the Question or requested for more info.
8505: -- Use from_role which asked the Question or requested for more info.
8506: -- TODO : we should use Display name of that role.
8507: IF(l_from_role IS NOT NULL AND l_from_role <> '' ) then
8508: -- attrlist is empty
8509: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'FROM', '', l_attrlist);
8510:
8511: l_from_role := replace(l_from_role, g_newLine);
8512: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'NAME', l_from_role, l_attrlist);
8513: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'NAME', hdrxmlPos, l_occurance);
8508: -- attrlist is empty
8509: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'FROM', '', l_attrlist);
8510:
8511: l_from_role := replace(l_from_role, g_newLine);
8512: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'NAME', l_from_role, l_attrlist);
8513: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'NAME', hdrxmlPos, l_occurance);
8514:
8515: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'FROM', hdrxmlPos, l_occurance);
8516:
8509: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'FROM', '', l_attrlist);
8510:
8511: l_from_role := replace(l_from_role, g_newLine);
8512: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'NAME', l_from_role, l_attrlist);
8513: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'NAME', hdrxmlPos, l_occurance);
8514:
8515: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'FROM', hdrxmlPos, l_occurance);
8516:
8517: end if;
8511: l_from_role := replace(l_from_role, g_newLine);
8512: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'NAME', l_from_role, l_attrlist);
8513: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'NAME', hdrxmlPos, l_occurance);
8514:
8515: hdrxmlPos := WF_XML.SkipTag(hdrxml, 'FROM', hdrxmlPos, l_occurance);
8516:
8517: end if;
8518:
8519: l_attrlist.DELETE;
8518:
8519: l_attrlist.DELETE;
8520: l_subject := replace(l_subject, g_newLine);
8521: l_subject := '';
8522: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'SUBJECT', l_subject, l_attrlist);
8523:
8524: -- Add HEADER tag in LOB.
8525: l_pos := WF_XML.NewLOBTag(l_msg_doc, l_pos, 'HEADER', hdrxml, l_attrlist);
8526: l_pos := WF_XML.SkipLOBTag(l_msg_doc, 'HEADER', l_pos, l_occurance);
8521: l_subject := '';
8522: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'SUBJECT', l_subject, l_attrlist);
8523:
8524: -- Add HEADER tag in LOB.
8525: l_pos := WF_XML.NewLOBTag(l_msg_doc, l_pos, 'HEADER', hdrxml, l_attrlist);
8526: l_pos := WF_XML.SkipLOBTag(l_msg_doc, 'HEADER', l_pos, l_occurance);
8527: l_attrlist.DELETE;
8528:
8529: --
8522: hdrxmlPos := WF_XML.NewTag(hdrxml, hdrxmlPos, 'SUBJECT', l_subject, l_attrlist);
8523:
8524: -- Add HEADER tag in LOB.
8525: l_pos := WF_XML.NewLOBTag(l_msg_doc, l_pos, 'HEADER', hdrxml, l_attrlist);
8526: l_pos := WF_XML.SkipLOBTag(l_msg_doc, 'HEADER', l_pos, l_occurance);
8527: l_attrlist.DELETE;
8528:
8529: --
8530: wf_xml.AddElementAttribute('content-type','multipart/mixed',l_attrlist);
8526: l_pos := WF_XML.SkipLOBTag(l_msg_doc, 'HEADER', l_pos, l_occurance);
8527: l_attrlist.DELETE;
8528:
8529: --
8530: wf_xml.AddElementAttribute('content-type','multipart/mixed',l_attrlist);
8531: l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos,'CONTENT','',l_attrlist);
8532: l_attrlist.DELETE;
8533:
8534: --
8527: l_attrlist.DELETE;
8528:
8529: --
8530: wf_xml.AddElementAttribute('content-type','multipart/mixed',l_attrlist);
8531: l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos,'CONTENT','',l_attrlist);
8532: l_attrlist.DELETE;
8533:
8534: --
8535: wf_xml.AddElementAttribute('content-type','text/plain', l_attrlist);
8531: l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos,'CONTENT','',l_attrlist);
8532: l_attrlist.DELETE;
8533:
8534: --
8535: wf_xml.AddElementAttribute('content-type','text/plain', l_attrlist);
8536: l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos,'BODYPART', '', l_attrlist);
8537:
8538:
8539: l_messageidx := wf_temp_lob.getlob(g_lobtable);
8532: l_attrlist.DELETE;
8533:
8534: --
8535: wf_xml.AddElementAttribute('content-type','text/plain', l_attrlist);
8536: l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos,'BODYPART', '', l_attrlist);
8537:
8538:
8539: l_messageidx := wf_temp_lob.getlob(g_lobtable);
8540:
8551:
8552: -- l_attrlist content-type='text/plain' will be used same
8553: -- as for BODYPART
8554: -- --
8555: l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos, 'MESSAGE',
8556: g_lobtable(l_messageidx).temp_lob,
8557: l_attrlist);
8558:
8559: l_pos := wf_xml.SkipLOBTag(l_msg_doc,'MESSAGE',l_pos,l_occurance);
8555: l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos, 'MESSAGE',
8556: g_lobtable(l_messageidx).temp_lob,
8557: l_attrlist);
8558:
8559: l_pos := wf_xml.SkipLOBTag(l_msg_doc,'MESSAGE',l_pos,l_occurance);
8560: l_attrlist.DELETE;
8561:
8562: --
8563: l_pos := wf_xml.SkipLOBTag(l_msg_doc,'BODYPART',l_pos,l_occurance);
8559: l_pos := wf_xml.SkipLOBTag(l_msg_doc,'MESSAGE',l_pos,l_occurance);
8560: l_attrlist.DELETE;
8561:
8562: --
8563: l_pos := wf_xml.SkipLOBTag(l_msg_doc,'BODYPART',l_pos,l_occurance);
8564:
8565: -- TODO : << sstomar>>
8566: -- Later we will consider to send HTML body part
8567: -- commenting below code as of now.
8572:
8573: --l_attrlist.DELETE;
8574:
8575: --
8576: --wf_xml.AddElementAttribute('content-type','text/html', l_attrlist);
8577: --l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos,'BODYPART', '', l_attrlist);
8578:
8579: --dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8580: -- LENGTH(l_start_cdata), l_start_cdata);
8573: --l_attrlist.DELETE;
8574:
8575: --
8576: --wf_xml.AddElementAttribute('content-type','text/html', l_attrlist);
8577: --l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos,'BODYPART', '', l_attrlist);
8578:
8579: --dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8580: -- LENGTH(l_start_cdata), l_start_cdata);
8581:
8584:
8585: --dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8586: -- LENGTH(l_end_cdata),l_end_cdata);
8587:
8588: --l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos, 'MESSAGE',
8589: -- g_lobtable(l_messageidx).temp_lob,
8590: -- l_attrlist);
8591:
8592: --l_pos := wf_xml.SkipLOBTag(l_msg_doc,'MESSAGE',l_pos,l_occurance);
8588: --l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos, 'MESSAGE',
8589: -- g_lobtable(l_messageidx).temp_lob,
8590: -- l_attrlist);
8591:
8592: --l_pos := wf_xml.SkipLOBTag(l_msg_doc,'MESSAGE',l_pos,l_occurance);
8593: --l_attrlist.DELETE;
8594:
8595: --
8596: --l_pos := wf_xml.SkipLOBTag(l_msg_doc,'BODYPART',l_pos,l_occurance);
8592: --l_pos := wf_xml.SkipLOBTag(l_msg_doc,'MESSAGE',l_pos,l_occurance);
8593: --l_attrlist.DELETE;
8594:
8595: --
8596: --l_pos := wf_xml.SkipLOBTag(l_msg_doc,'BODYPART',l_pos,l_occurance);
8597:
8598: --
8599: l_pos := wf_xml.skiplobtag(l_msg_doc,'CONTENT',l_pos,l_occurance);
8600: --
8595: --
8596: --l_pos := wf_xml.SkipLOBTag(l_msg_doc,'BODYPART',l_pos,l_occurance);
8597:
8598: --
8599: l_pos := wf_xml.skiplobtag(l_msg_doc,'CONTENT',l_pos,l_occurance);
8600: --
8601: l_pos := wf_xml.skiplobtag(l_msg_doc,'NOTIFICATION',l_pos,l_occurance);
8602: --
8603: l_pos := wf_xml.skiplobtag(l_msg_doc,'NOTIFICATIONGROUP',l_pos,l_occurance);
8597:
8598: --
8599: l_pos := wf_xml.skiplobtag(l_msg_doc,'CONTENT',l_pos,l_occurance);
8600: --
8601: l_pos := wf_xml.skiplobtag(l_msg_doc,'NOTIFICATION',l_pos,l_occurance);
8602: --
8603: l_pos := wf_xml.skiplobtag(l_msg_doc,'NOTIFICATIONGROUP',l_pos,l_occurance);
8604:
8605:
8599: l_pos := wf_xml.skiplobtag(l_msg_doc,'CONTENT',l_pos,l_occurance);
8600: --
8601: l_pos := wf_xml.skiplobtag(l_msg_doc,'NOTIFICATION',l_pos,l_occurance);
8602: --
8603: l_pos := wf_xml.skiplobtag(l_msg_doc,'NOTIFICATIONGROUP',l_pos,l_occurance);
8604:
8605:
8606: if(wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
8607: wf_log_pkg.string(wf_log_pkg.level_procedure,
8605:
8606: if(wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
8607: wf_log_pkg.string(wf_log_pkg.level_procedure,
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;
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.
8617: l_event.event_key := 0;