925: -- pExtn The extention of the file name
926: -- pEncoding The content-encoding part of the Content-Type
927: --
928: -- NOTE: For bug 3735752, a copy of parseContentType was taken and
929: -- placed into WF_MAIL_UTIL in order to prevent a dependancy
930: -- on WF_XML for WFA_HTML. This copy remains in tact.
931: procedure parseContentType(pContentType in varchar2,
932: pMimeType out nocopy varchar2,
933: pFileName out nocopy varchar2,
1073: ** as attachments.
1074: */
1075: if upper(substr(l_crec.url,1, 6)) = 'PLSQL:' then
1076:
1077: -- wf_mail.getDocContent(p_nid, l_crec.name, l_display_type,
1078: -- l_tmpcontent, l_error_result);
1079: -- bug 2879507. call wf_notification.GetAttrDoc2 to get the
1080: -- doc content as well as the document type
1081: wf_notification.GetAttrDoc2(p_nid, l_crec.name, l_display_type,
1125: -- Getting Content
1126: -- First we call the existing APIs to render the
1127: -- content and then we fetch the content into
1128: -- the new structure.
1129: -- Note: LOB allocated within wf_mail.getLOBDocContent API
1130: -- is released here after processing by calling
1131: -- WF_MAIL.CloseLob(l_display_type) api.
1132: wf_mail.getLOBDocContent(p_nid, l_crec.name, l_display_type,
1133: l_content_type, l_error_result);
1127: -- content and then we fetch the content into
1128: -- the new structure.
1129: -- Note: LOB allocated within wf_mail.getLOBDocContent API
1130: -- is released here after processing by calling
1131: -- WF_MAIL.CloseLob(l_display_type) api.
1132: wf_mail.getLOBDocContent(p_nid, l_crec.name, l_display_type,
1133: l_content_type, l_error_result);
1134:
1135: if l_error_result is not null or l_error_result <> '' then
1128: -- the new structure.
1129: -- Note: LOB allocated within wf_mail.getLOBDocContent API
1130: -- is released here after processing by calling
1131: -- WF_MAIL.CloseLob(l_display_type) api.
1132: wf_mail.getLOBDocContent(p_nid, l_crec.name, l_display_type,
1133: l_content_type, l_error_result);
1134:
1135: if l_error_result is not null or l_error_result <> '' then
1136: -- Error in getting content
1178:
1179: else
1180:
1181: -- Fetch the content
1182: WF_MAIL.InitFetchLOB(l_display_type, l_doc_length);
1183: l_doc_end := 0;
1184: dbms_lob.writeAppend(g_LOBTable(l_contentIdx).temp_lob,
1185: length(l_start), l_start);
1186: while l_doc_end = 0 loop
1183: l_doc_end := 0;
1184: dbms_lob.writeAppend(g_LOBTable(l_contentIdx).temp_lob,
1185: length(l_start), l_start);
1186: while l_doc_end = 0 loop
1187: WF_MAIL.FetchLobContent(l_tmpContent, l_display_type,
1188: l_doc_end);
1189: l_tmpContent := replace(l_tmpContent, g_fndapi_misschr);
1190: dbms_lob.writeAppend(g_LOBTable(l_contentIdx).temp_lob,
1191: length(l_tmpContent), l_tmpContent);
1216: l_pos := SkipLOBTag(p_doc, 'MESSAGE', l_pos, l_occurance);
1217: l_pos := SkipLOBTag(p_doc, 'BODYPART', l_pos, l_occurance);
1218: end if;
1219:
1220: -- Release temp LOB allocated within wf_mail.getLOBDocContent
1221: -- i.e. wf_mail.g_html_messageIdx or wf_mail.g_text_messageIdx Locators
1222: WF_MAIL.CloseLob(l_display_type);
1223:
1224: elsif upper(substr(l_crec.url,1, 10)) = 'PLSQLBLOB:' then
1217: l_pos := SkipLOBTag(p_doc, 'BODYPART', l_pos, l_occurance);
1218: end if;
1219:
1220: -- Release temp LOB allocated within wf_mail.getLOBDocContent
1221: -- i.e. wf_mail.g_html_messageIdx or wf_mail.g_text_messageIdx Locators
1222: WF_MAIL.CloseLob(l_display_type);
1223:
1224: elsif upper(substr(l_crec.url,1, 10)) = 'PLSQLBLOB:' then
1225: /*
1218: end if;
1219:
1220: -- Release temp LOB allocated within wf_mail.getLOBDocContent
1221: -- i.e. wf_mail.g_html_messageIdx or wf_mail.g_text_messageIdx Locators
1222: WF_MAIL.CloseLob(l_display_type);
1223:
1224: elsif upper(substr(l_crec.url,1, 10)) = 'PLSQLBLOB:' then
1225: /*
1226: ** For PLSQLBLOB documents.
1292:
1293: if l_isURLAttrs then
1294: dbms_lob.trim(g_LOBTable(l_contentIdx).temp_lob,0);
1295:
1296: wf_mail.GetURLAttachment(p_nid, l_tmpContent, l_error_result);
1297: dbms_lob.writeAppend(g_LOBTable(l_contentIdx).temp_lob,
1298: length(l_start), l_start);
1299: dbms_lob.writeAppend(g_LOBTable(l_contentIdx).temp_lob,
1300: length(l_tmpContent), l_tmpContent);
1340:
1341: return l_pos;
1342: exception
1343: when others then
1344: WF_MAIL.CloseLob(l_display_type);
1345: wf_temp_lob.releaseLob(g_LOBTable, l_contentIdx);
1346: wf_core.context('WF_XML', 'GetAttachments', to_char(p_nid), p_agent,
1347: to_char(p_pos));
1348: l_err_message := sqlerrm;
1484:
1485: begin
1486:
1487: -- Grab the details of the message to be enqueued using the
1488: -- previous interface of WF_MAIL.GetMessage.
1489: begin
1490:
1491: select installed_flag
1492: into l_installed_lang
1504: end;
1505: dbms_session.set_nls('NLS_LANGUAGE' , l_language);
1506: dbms_session.set_nls('NLS_TERRITORY' , l_territory);
1507:
1508: wf_mail.getmessage(p_nid, p_node, p_agent, p_replyto,
1509: l_subject, l_text_body, l_html_body, l_body_atth,
1510: l_error_result);
1511: -- Check for any problems
1512: if l_error_result is not NULL then
1695:
1696: begin
1697:
1698: -- Grab the details of the message to be enqueued using the
1699: -- previous interface of WF_MAIL.GetMessage.
1700:
1701: -- Instantiate a handle to the new document.
1702: -- dbms_lob.createTemporary(l_doc, TRUE, dbms_lob.session);
1703: l_docIdx := wf_temp_lob.getLOB(g_LOBTable);
1803:
1804: begin
1805:
1806: -- Grab the details of the message to be enqueued using the
1807: -- previous interface of WF_MAIL.GetMessage.
1808:
1809: -- Instantiate a handle to the new document.
1810: p_message := '';
1811:
2599: l_start VARCHAR2(10) := '
2600: l_end VARCHAR2(4) := ']]>';
2601: begin
2602:
2603: WF_MAIL.InitFetchLOB(p_doctype, l_doc_length);
2604: l_doc_end := 0;
2605: dbms_lob.writeAppend(p_doc, length(l_start), l_start);
2606: while l_doc_end = 0 loop
2607: WF_MAIL.FetchLobContent(l_message, p_doctype, l_doc_end);
2603: WF_MAIL.InitFetchLOB(p_doctype, l_doc_length);
2604: l_doc_end := 0;
2605: dbms_lob.writeAppend(p_doc, length(l_start), l_start);
2606: while l_doc_end = 0 loop
2607: WF_MAIL.FetchLobContent(l_message, p_doctype, l_doc_end);
2608: l_message := replace(l_message, g_fndapi_misschr);
2609: dbms_lob.writeAppend(p_doc, length(l_message), l_message);
2610: end loop;
2611: dbms_lob.writeAppend(p_doc, length(l_end), l_end);
2608: l_message := replace(l_message, g_fndapi_misschr);
2609: dbms_lob.writeAppend(p_doc, length(l_message), l_message);
2610: end loop;
2611: dbms_lob.writeAppend(p_doc, length(l_end), l_end);
2612: WF_MAIL.CloseLob(p_doctype);
2613:
2614: exception
2615: when others then
2616: wf_core.context('WF_XML','getBodyPart',to_char(p_nid),p_doctype);
2832: attrlist.DELETE;
2833:
2834: for resourceIdx in 1..resourceList.COUNT loop
2835:
2836: encodedURL := wf_mail.urlEncode(resourceList(resourceIdx).value);
2837: AddElementAttribute('content-type', resourceList(resourceIdx).contentType, attrlist);
2838: AddElementAttribute('src', resourceList(resourceIdx).value, attrlist);
2839: AddElementAttribute('content-id', resourceList(resourceIdx).contentId, attrlist);
2840: AddElementAttribute('filename', resourceList(resourceIdx).fileName, attrlist);
2910: p_list in varchar2,
2911: p_type in varchar2,
2912: p_pos in out nocopy integer)
2913: is
2914: copy_recipient_list WF_MAIL_UTIL.parserStack_t;
2915: atPos pls_integer;
2916:
2917: display_name varchar2(360);
2918: recipient_role varchar2(320);
2937:
2938: begin
2939: step := 'Initializing the copy list';
2940: copy_recipient_list.DELETE;
2941: copy_recipient_list := WF_MAIL_UTIL.strParser(p_list, ';');
2942: if (copy_recipient_list.COUNT > 0) then
2943:
2944: for i in 1..copy_recipient_list.COUNT loop
2945:
3068: end if;
3069:
3070:
3071:
3072: wf_mail.SetResponseDelimiters(open_text => null,
3073: close_text => null,
3074: open_html => open_html_delimiter,
3075: close_html => close_html_delimiter);
3076:
3231: wf_core.context('WF_XML','GenerateDoc',to_char(nid));
3232: raise;
3233: end;
3234:
3235: if (wf_mail.test_flag = TRUE) then
3236: if (status not in ('OPEN','CANCELED','CLOSED')) then
3237: status := 'OPEN';
3238: end if;
3239: end if;
3285:
3286: corrId := wf_event.getValueForParameter('Q_CORRELATION_ID',
3287: p_parameter_list);
3288: -- Obtain the values for the configurable items
3289: nodename := WF_MAILER_PARAMETER.GetValueForCorr (pNid => nid,
3290: pCorrId => corrId,
3291: pName => 'NODENAME',
3292: pInAttr => dummy);
3293:
3290: pCorrId => corrId,
3291: pName => 'NODENAME',
3292: pInAttr => dummy);
3293:
3294: agent := WF_MAILER_PARAMETER.GetValueForCorr (pNid => nid,
3295: pCorrId => corrId,
3296: pName => 'HTMLAGENT',
3297: pInAttr => dummy);
3298:
3295: pCorrId => corrId,
3296: pName => 'HTMLAGENT',
3297: pInAttr => dummy);
3298:
3299: fromName := WF_MAILER_PARAMETER.GetValueForCorr (pNid => nid,
3300: pCorrId => corrId,
3301: pName => 'FROM',
3302: pInAttr => FromInAttr);
3303:
3300: pCorrId => corrId,
3301: pName => 'FROM',
3302: pInAttr => FromInAttr);
3303:
3304: replyto := WF_MAILER_PARAMETER.GetValueForCorr (pNid => nid,
3305: pCorrId => corrId,
3306: pName => 'REPLYTO',
3307: pInAttr => ReplyToInAttr);
3308:
3305: pCorrId => corrId,
3306: pName => 'REPLYTO',
3307: pInAttr => ReplyToInAttr);
3308:
3309: inlineAtt := WF_MAILER_PARAMETER.GetValueForCorr (pNid => nid,
3310: pCorrId => corrId,
3311: pName => 'INLINE_ATTACHMENT',
3312: pInAttr => dummy);
3313:
3310: pCorrId => corrId,
3311: pName => 'INLINE_ATTACHMENT',
3312: pInAttr => dummy);
3313:
3314: sendAccessKey := WF_MAILER_PARAMETER.GetValueForCorr (pNid => nid,
3315: pCorrId => corrId,
3316: pName => 'SEND_ACCESS_KEY',
3317: pInAttr => dummy);
3318:
3315: pCorrId => corrId,
3316: pName => 'SEND_ACCESS_KEY',
3317: pInAttr => dummy);
3318:
3319: stylesheetEnabled := wf_mailer_parameter.getValueForCorr(pNid => nid,
3320: pCorrId => corrId,
3321: pName => 'ENABLE_STYLESHEET',
3322: pInAttr => EnableStyleInAttr);
3323:
3322: pInAttr => EnableStyleInAttr);
3323:
3324: -- 5393647 - Parameter to control the text/html response
3325: -- template delimiter
3326: delimiter_string := wf_mailer_parameter.getValueForCorr(pNId => nid,
3327: pCorrId => corrId,
3328: pName => 'HTML_DELIMITER',
3329: pInAttr => dummy);
3330:
3330:
3331: setHtmlDelimiters(upper(trim(delimiter_string)));
3332:
3333: -- 4676402 Support for CC and BCC. These are not configuration parameters
3334: -- so the values can not be retrieved through the wf_mailer_parameter
3335: -- interface.
3336: -- The precedence will be only for normal notifications. Requests
3337: -- for more information will not be subject to the cc and bcc
3338: -- handling.
3367: -- They are not configurable at the message level because of the
3368: -- confusion caused with multiple mailers and especially those that
3369: -- share the same correlation ID. The value must be consisten in the
3370: -- PL/SQL layer as well as the Java layer.
3371: directResponse := WF_MAILER_PARAMETER.getValueForCorr(pCorrId => corrId,
3372: pName => 'DIRECT_RESPONSE');
3373:
3374: attachInlineImages := WF_MAILER_PARAMETER.GetValueForCorr (
3375: pCorrId => corrId,
3370: -- PL/SQL layer as well as the Java layer.
3371: directResponse := WF_MAILER_PARAMETER.getValueForCorr(pCorrId => corrId,
3372: pName => 'DIRECT_RESPONSE');
3373:
3374: attachInlineImages := WF_MAILER_PARAMETER.GetValueForCorr (
3375: pCorrId => corrId,
3376: pName => 'ATTACH_IMAGES');
3377: if inlineAtt = 'Y' then
3378: disposition := 'inline';
3380: disposition := 'attachment';
3381: end if;
3382:
3383: if sendAccessKey = 'Y' then
3384: wf_mail.Send_Access_Key_On;
3385: else
3386: wf_mail.Send_Access_Key_Off;
3387: end if;
3388:
3382:
3383: if sendAccessKey = 'Y' then
3384: wf_mail.Send_Access_Key_On;
3385: else
3386: wf_mail.Send_Access_Key_Off;
3387: end if;
3388:
3389: if directResponse = 'Y' then
3390: wf_mail.direct_response_on;
3386: wf_mail.Send_Access_Key_Off;
3387: end if;
3388:
3389: if directResponse = 'Y' then
3390: wf_mail.direct_response_on;
3391: else
3392: wf_mail.direct_response_off;
3393: end if;
3394:
3388:
3389: if directResponse = 'Y' then
3390: wf_mail.direct_response_on;
3391: else
3392: wf_mail.direct_response_off;
3393: end if;
3394:
3395: -- If we are here, we are going to generate notification xml payload
3396: -- So allocate TEMP LOB now. << bug 6511028 >>
3395: -- If we are here, we are going to generate notification xml payload
3396: -- So allocate TEMP LOB now. << bug 6511028 >>
3397: messageIdx := wf_temp_lob.getLob(g_LOBTable);
3398:
3399: WF_MAIL.setContext(nid);
3400:
3401: -- Set the preferred document type based on the
3402: -- notification preference.
3403: if notification_pref = 'MAILTEXT' then
3429: -- If user's language also not installed then below API updates OUT params
3430: -- with base language, territory and charset etc..
3431: --
3432: -- TODO : Get_Ntf_Language : optimization required.
3433: WF_MAIL.Get_Ntf_Language(nid, l_nlsLanguage, l_nlsTerritory, l_nlsCodeset);
3434:
3435: -- Set NLS language and territory for this notification
3436: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
3437: wf_log_pkg.string(WF_LOG_PKG.level_procedure,
3484:
3485: if frameworkContent = TRUE then
3486: -- Get a modified version of the message. All is rendered
3487: -- except for the &BODY token.
3488: -- NOTE: TEMP LOBs allocated within WF_MAIL.GetLobMessage3 for
3489: -- message body contents should be released here
3490: -- after processsing
3491: WF_MAIL.GetLobMessage3(nid, nodeName, agent, replyto,
3492: recipient_role, l_nlsLanguage, l_nlsTerritory,
3487: -- except for the &BODY token.
3488: -- NOTE: TEMP LOBs allocated within WF_MAIL.GetLobMessage3 for
3489: -- message body contents should be released here
3490: -- after processsing
3491: WF_MAIL.GetLobMessage3(nid, nodeName, agent, replyto,
3492: recipient_role, l_nlsLanguage, l_nlsTerritory,
3493: notification_pref, email,
3494: display_name,
3495: 'N',
3496: subject, body_atth,
3497: error_result, bodyToken);
3498:
3499: else
3500: WF_MAIL.GetLobMessage3(nid, nodeName, agent, replyto,
3501: recipient_role, l_nlsLanguage, l_nlsTerritory,
3502: notification_pref, email,
3503: display_name,
3504: 'Y',
3643: -- <
3644: --- Below API returns Template Name based on l_sec_policy . So if 'OPEN_MAIL_SECURE'
3645: -- it means user should view online version of ntf but user will
3646: -- get "notification detail.html" as attachement.
3647: Wf_Mail.ProcessSecurityPolicy(nid, l_sec_policy, t_name);
3648:
3649:
3650: /*
3651: ** Potentially, it could be possible for a text/plain notification
3665: */
3666: dbms_lob.trim(g_LOBTable(messageIdx).temp_lob, 0);
3667:
3668: -- This getBodyPart API releases temp lob allocated within
3669: -- WF_MAIL.GetLobMessage3 for doctype (text/plain )
3670: -- i.e. g_text_messageIdx locator
3671: getBodyPart(g_LOBTable(messageIdx).temp_lob, nid,
3672: g_ntfDocText);
3673:
3705: -- Build the resource section of the XML so that the
3706: -- java layer can locate the notification body to
3707: -- merge into the template.
3708:
3709: ntfURL := wf_mail.urlEncode(wf_notification.getFwkBodyURL2(nid,
3710: g_ntfDocText,
3711: l_nlsLanguage,
3712: l_nlsCalendar));
3713:
3746: --
3747: dbms_lob.trim(g_LOBTable(messageIdx).temp_lob, 0);
3748:
3749: -- This getBodyPart API releases temp lob allocated within
3750: -- WF_MAIL.GetLobMessage3 for doctype (text/html )
3751: -- i.e. g_html_messageIdx locator
3752: getBodyPart(g_LOBTable(messageIdx).temp_lob, nid,
3753: g_ntfDocHtml);
3754:
3783:
3784: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
3785: wf_log_pkg.string(WF_LOG_PKG.level_procedure,
3786: 'wf.plsql.WF_XML.generateDoc',
3787: ' Template Name returned by Wf_Mail.ProcessSecurityPolicy: [' || t_name || ']' );
3788:
3789: if (frameworkContent ) then
3790: wf_log_pkg.string(WF_LOG_PKG.level_procedure,
3791: 'wf.plsql.WF_XML.generateDoc', ' framework-Content ?: YES') ;
3883: -- Build the resource section of the XML so that the
3884: -- java layer can locate the notification body to
3885: -- merge into the template.
3886:
3887: ntfURL := wf_mail.urlEncode(wf_notification.getFwkBodyURL2(nid,
3888: g_ntfDocHtml,
3889: l_nlsLanguage,
3890: l_nlsCalendar));
3891:
3979: -- attachment or inline through e-mail.
3980: --
3981:
3982: -- << sstomar : below API is being called above so t_name have assigned (null or somevalue) .
3983: -- Wf_Mail.ProcessSecurityPolicy(nid, l_sec_policy, t_name);
3984:
3985: if (t_name is not null) then
3986: if (t_name <> 'OPEN_MAIL_SECURE')
3987: then
4031: when others then
4032:
4033: wf_temp_lob.releaseLob(g_LOBTable, messageIdx);
4034:
4035: -- Since within wf_mail.getLOBMessage3 we are releasing
4036: -- TEMP LOBs incase of any exception, so there is no need to
4037: -- release those LOBs here. -- WF_MAIL.CloseLob(doctype)
4038:
4039: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
4033: wf_temp_lob.releaseLob(g_LOBTable, messageIdx);
4034:
4035: -- Since within wf_mail.getLOBMessage3 we are releasing
4036: -- TEMP LOBs incase of any exception, so there is no need to
4037: -- release those LOBs here. -- WF_MAIL.CloseLob(doctype)
4038:
4039: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
4040: wf_log_pkg.string(WF_LOG_PKG.level_procedure,
4041: 'wf.plsql.WF_XML.generateDoc',
4155: -- 4628088 Send the RESET_NLS flag if one is defined
4156: -- at the message level.
4157: corrId := wf_event.getValueForParameter('Q_CORRELATION_ID',
4158: p_parameter_list);
4159: resetNls := WF_MAILER_PARAMETER.GetValueForCorr (pNid => p_event_key,
4160: pCorrId => corrId,
4161: pName => 'RESET_NLS',
4162: pInAttr => inAttr);
4163:
4242: when no_data_found then
4243: str := '';
4244: pos := length(str);
4245: dbms_lob.write(p_doc, pos, 1, str);
4246: nodename := WF_MAILER_PARAMETER.GetValueForCorr (pNid => nid,
4247: pCorrId => messageType,
4248: pName => 'NODENAME',
4249: pInAttr => inAttr);
4250:
4275: wf_core.context('WF_XML','GenerateMessage',to_char(nid));
4276: raise;
4277: end;
4278:
4279: if (wf_mail.test_flag = TRUE) then
4280: mail_status := 'MAIL';
4281: if (status not in ('OPEN','CANCELED','CLOSED')) then
4282: status := 'OPEN';
4283: end if;
4287:
4288: str := '';
4289: pos := length(str);
4290: dbms_lob.write(p_doc, pos, 1, str);
4291: nodename := WF_MAILER_PARAMETER.GetValueForCorr (pNid => nid,
4292: pCorrId => messageType,
4293: pName => 'NODENAME',
4294: pInAttr => inAttr);
4295:
4339: dbms_lob.write(p_doc, pos, 1, str);
4340:
4341: -- 4628088 Send the RESET_NLS flag if one is defined
4342: -- at the message level.
4343: resetNls := WF_MAILER_PARAMETER.GetValueForCorr (pNid => nid,
4344: pCorrId => messageType,
4345: pName => 'RESET_NLS',
4346: pInAttr => inAttr);
4347:
4577: end if;
4578:
4579: -- Get the Base NLS.
4580: -- << sstomar>> : already being set in GENERATE function
4581: -- WF_MAIL.GetSessionLanguage(base_lang, base_territory, base_codeset);
4582:
4583: -- If requested language is not installed, use base NLS setting
4584: if installed = 'N' then
4585: l_nlsLanguage := g_base_language;
4628:
4629: l_lob := 'N';
4630:
4631: -- <
4632: -- This WF_MAIL.GetSummary2 API may allocate temp LOB depending on
4633: -- size of contents. We release within getBodyPart api, getBodyPart
4634: -- is being called below...
4635: WF_MAIL.GetSummary2(
4636: role => recipient_role,
4631: -- <
4632: -- This WF_MAIL.GetSummary2 API may allocate temp LOB depending on
4633: -- size of contents. We release within getBodyPart api, getBodyPart
4634: -- is being called below...
4635: WF_MAIL.GetSummary2(
4636: role => recipient_role,
4637: dname => display_name,
4638: node => nodename,
4639: renderBody=> l_renderBody,
4699:
4700: hdrxmlPos := NewTag(hdrxml, hdrxmlPos, 'FROM', '', attrlist);
4701:
4702: -- fromName := 'FROM';
4703: fromName := WF_MAILER_PARAMETER.GetValueForCorr (pCorrId => corrId,
4704: pName => 'FROM');
4705: fromName := replace(fromName, g_newLine);
4706: fromName := '';
4707: hdrxmlPos := NewTag(hdrxml, hdrxmlPos, 'NAME', fromName, attrlist);
4707: hdrxmlPos := NewTag(hdrxml, hdrxmlPos, 'NAME', fromName, attrlist);
4708: hdrxmlPos := SkipTag(hdrxml, 'NAME', hdrxmlPos, occurance);
4709:
4710: -- replyto := 'REPLYTO';
4711: replyto := WF_MAILER_PARAMETER.GetValueForCorr (pCorrId => corrId,
4712: pName => 'REPLYTO');
4713: replyto := replace(replyto, g_newLine);
4714: replyto := '';
4715: hdrxmlPos := NewTag(hdrxml, hdrxmlPos, 'ADDRESS', replyto, attrlist);
4756: dbms_lob.trim(g_LOBTable(messageIdx).temp_lob, 0);
4757:
4758: -- << bug 6511028 >>
4759: -- This getBodyPart API also releases temp lob allocated within
4760: -- WF_MAIL.GetSummary2 for doctype (text/plain )
4761: -- i.e. g_text_messageIdx locator
4762: getBodyPart(g_LOBTable(messageIdx).temp_lob, 1,
4763: g_ntfDocText);
4764:
4779: if l_renderBody = 'N' then
4780: -- If this is a HTML summary notification then
4781: -- create a RESOURCE tag to obtain the content from
4782: -- the Applications Framework
4783: resourceSrc := wf_mail.urlEncode(wf_notification.getSummaryUrl2(
4784: recipient_role, docType, l_nlsCalendar));
4785: AddElementAttribute('page-type','fwk', attrlist);
4786: AddElementAttribute('src', resourceSrc, attrlist);
4787:
5547: wf_core.Context('WF_XML','handleReceiveEvent',
5548: p_event.getEventName(), p_subscription_guid);
5549: -- Save error message and set status to INVALID so mailer will
5550: -- bounce an "invalid reply" message to sender.
5551: WF_MAIL.HandleResponseError(l_nid, lk_type, lk_code,
5552: l_error_result);
5553: end;
5554: return 'SUCCESS';
5555: end if;
5562: if l_responses.COUNT > 0 then
5563: begin
5564: -- Check if this notification requires a Signature. Other than DEFAULT
5565: -- policies, no other policy is processed by the mailer.
5566: Wf_Mail.GetSignaturePolicy(l_nid, l_sig_policy);
5567: if (l_sig_policy is not NULL and upper(l_sig_policy) <> 'DEFAULT') then
5568: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
5569: wf_log_pkg.string(WF_LOG_PKG.level_statement,
5570: 'wf.plsql.WF_XML.handleReceiveEvent',
5601: -- Verify the content of the lookup. This will raise
5602: -- an exception if it is not matched. GetLovMeaning
5603: -- allows for nulls. This is not acceptable here.
5604:
5605: lk_meaning := wf_mail.GetLovMeaning(lk_type,
5606: lk_code);
5607: if lk_meaning is null then
5608: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
5609: wf_log_pkg.string(WF_LOG_PKG.level_statement,
5708: end if;
5709:
5710: wf_core.Context('WF_XML','handleReceiveEvent',
5711: to_char(l_nid), 'Step '||l_step);
5712: wf_core.context('WF_MAIL','HandleRevieveEvent', to_char(l_nid));
5713: -- Save error message and set status to INVALID so mailer will
5714: -- bounce an "invalid reply" message to sender.
5715: WF_MAIL.HandleResponseError(l_nid, lk_type,
5716: substrb(lk_code, 1, 1000),
5711: to_char(l_nid), 'Step '||l_step);
5712: wf_core.context('WF_MAIL','HandleRevieveEvent', to_char(l_nid));
5713: -- Save error message and set status to INVALID so mailer will
5714: -- bounce an "invalid reply" message to sender.
5715: WF_MAIL.HandleResponseError(l_nid, lk_type,
5716: substrb(lk_code, 1, 1000),
5717: l_error_result);
5718: end;
5719: end if;