47:
48: -- GLOBAL Package level varaibles that contain static data.
49: g_ntfHistory varchar2(30);
50: g_ntfActionHistory varchar2(50);
51: g_tab varchar2(1) := wf_core.tab;
52: g_moreInfoAPrompt varchar2(200);
53: g_moreInfoAnswer varchar2(200);
54: g_moreInfoQPrompt varchar2(200);
55: g_moreInfoSubject varchar2(200);
57: g_moreInfoQuestion varchar2(200);
58: g_moreInfoFrom varchar2(200);
59: g_moreInfoRequested varchar2(200);
60: g_moreInfoRequestee varchar2(4000);
61: g_webAgent varchar2(200) := wf_core.translate('WF_WEB_AGENT');
62: g_wfmonId varchar2(60);
63: g_to varchar2(60);
64: g_from varchar2(60);
65: g_beginDate varchar2(100);
72: g_soOn varchar2(60);
73: g_none varchar2(200);
74: g_truncate varchar2(200);
75: g_noResult varchar2(200);
76: g_install varchar2(60) := wf_core.translate('WF_INSTALL');
77: g_ntfDocText varchar2(30) := wf_notification.doc_text;
78: g_ntfDocHtml varchar2(30) := wf_notification.doc_html;
79: g_Id varchar2(30);
80: g_isFwkNtf boolean;
116: -- Handle error.
117: -- IN
118: -- notification id
119: -- status
120: -- error name (null if error is in WF_CORE)
121: procedure UpdateStatus(
122: nid in number,
123: status in varchar2,
124: error_name in varchar2)
136: error_name => UpdateStatus.error_name,
137: external_error => null);
138: exception
139: when others then
140: wf_core.context('WF_MAIL', 'UpdateStatus', to_char(nid),
141: UpdateStatus.status, UpdateStatus.error_name);
142: raise;
143:
144: end UpdateStatus;
150: -- nid notification id
151: -- status Status to set the notification
152: -- autoclose Flag to specify whether the notification should be closed
153: -- automitically
154: -- error name (null if error is in WF_CORE)
155: -- external_error Any error message that can not be reflected or captured
156: -- through the wf_core.context facilty ie Java.
157: procedure UpdateStatus2(
158: nid in number,
152: -- autoclose Flag to specify whether the notification should be closed
153: -- automitically
154: -- error name (null if error is in WF_CORE)
155: -- external_error Any error message that can not be reflected or captured
156: -- through the wf_core.context facilty ie Java.
157: procedure UpdateStatus2(
158: nid in number,
159: status in varchar2,
160: autoclose in varchar2,
266: and nvl(end_date, sysdate + 1)));
267: end if;
268: exception
269: when others then
270: wf_core.context('WF_MAIL', 'UpdateStatus2', to_char(nid),
271: UpdateStatus2.status, UpdateStatus2.autoclose,
272: UpdateStatus2.error_name);
273: raise;
274:
305: commit;
306:
307: exception
308: when others then
309: wf_core.context('WF_MAIL', 'ResetFailed', p_queue);
310: raise;
311:
312: end ResetFailed;
313:
315: -- Call any callback in error mode if error occurs in sending mail.
316: -- IN
317: -- notification id
318: -- mailer send status
319: -- error name (null if error is in WF_CORE)
320: -- external_error Any error message that can not be reflected or captured
321: -- through the wf_core.context facilty ie Java.
322: procedure HandleSendError(
323: nid in number,
317: -- notification id
318: -- mailer send status
319: -- error name (null if error is in WF_CORE)
320: -- external_error Any error message that can not be reflected or captured
321: -- through the wf_core.context facilty ie Java.
322: procedure HandleSendError(
323: nid in number,
324: status in varchar2,
325: error_name in varchar2,
343: where NOTIFICATION_ID = nid;
344:
345: -- If there is no callback, just clear any error and return.
346: if (cb is null) then
347: wf_core.clear;
348: return;
349: end if;
350:
351: -- Put supplied error message on stack, if any
350:
351: -- Put supplied error message on stack, if any
352: if (error_name is not null) then
353: begin
354: wf_core.token('NID', to_char(nid));
355: wf_core.token('STATUS', status);
356: wf_core.token('ROLE', role);
357: if external_error is not null then
358: wf_core.token('EXTERNAL_ERROR', external_error);
351: -- Put supplied error message on stack, if any
352: if (error_name is not null) then
353: begin
354: wf_core.token('NID', to_char(nid));
355: wf_core.token('STATUS', status);
356: wf_core.token('ROLE', role);
357: if external_error is not null then
358: wf_core.token('EXTERNAL_ERROR', external_error);
359: end if;
352: if (error_name is not null) then
353: begin
354: wf_core.token('NID', to_char(nid));
355: wf_core.token('STATUS', status);
356: wf_core.token('ROLE', role);
357: if external_error is not null then
358: wf_core.token('EXTERNAL_ERROR', external_error);
359: end if;
360: wf_core.raise(error_name);
354: wf_core.token('NID', to_char(nid));
355: wf_core.token('STATUS', status);
356: wf_core.token('ROLE', role);
357: if external_error is not null then
358: wf_core.token('EXTERNAL_ERROR', external_error);
359: end if;
360: wf_core.raise(error_name);
361: exception
362: when others then null;
356: wf_core.token('ROLE', role);
357: if external_error is not null then
358: wf_core.token('EXTERNAL_ERROR', external_error);
359: end if;
360: wf_core.raise(error_name);
361: exception
362: when others then null;
363: end;
364: end if;
363: end;
364: end if;
365:
366: -- Put default error message on stack, if none exists
367: if (wf_core.error_name is null) then
368: begin
369: wf_core.token('NID', to_char(nid));
370: if external_error is not null then
371: wf_core.token('EXTERNAL_ERROR', external_error);
365:
366: -- Put default error message on stack, if none exists
367: if (wf_core.error_name is null) then
368: begin
369: wf_core.token('NID', to_char(nid));
370: if external_error is not null then
371: wf_core.token('EXTERNAL_ERROR', external_error);
372: end if;
373: wf_core.raise('WFMAIL_GENERIC');
367: if (wf_core.error_name is null) then
368: begin
369: wf_core.token('NID', to_char(nid));
370: if external_error is not null then
371: wf_core.token('EXTERNAL_ERROR', external_error);
372: end if;
373: wf_core.raise('WFMAIL_GENERIC');
374: exception
375: when others then null;
369: wf_core.token('NID', to_char(nid));
370: if external_error is not null then
371: wf_core.token('EXTERNAL_ERROR', external_error);
372: end if;
373: wf_core.raise('WFMAIL_GENERIC');
374: exception
375: when others then null;
376: end;
377: end if;
390: in out nvalue,
391: in out dvalue;
392:
393: -- Clear the error from the stack.
394: wf_core.clear;
395:
396: exception
397: when others then
398: null;
506: when no_data_found then
507: -- If there is no notification, then don't do anything
508: return 'SUCCESS';
509: when others then
510: wf_core.context('WF_MAIL','Disable_Recipient_Ntf_Pref',
511: errorName, externError, sqlerrm);
512: raise;
513: end;
514:
542: invalidRoleList := '';
543: reasonList := '';
544: invalidRoleCount := 0;
545: recipient_disabled := false;
546: errorReport := wf_core.translate('WFMLR_RECIPIENT_ROLE')||' - '||
547: wf_core.translate('WFMLR_NOTIFICATION_PREFERENCE')||
548: wf_core.newline||
549: '=================================================='||
550: wf_core.newline;
543: reasonList := '';
544: invalidRoleCount := 0;
545: recipient_disabled := false;
546: errorReport := wf_core.translate('WFMLR_RECIPIENT_ROLE')||' - '||
547: wf_core.translate('WFMLR_NOTIFICATION_PREFERENCE')||
548: wf_core.newline||
549: '=================================================='||
550: wf_core.newline;
551: for tk in 1..tokens.COUNT loop
544: invalidRoleCount := 0;
545: recipient_disabled := false;
546: errorReport := wf_core.translate('WFMLR_RECIPIENT_ROLE')||' - '||
547: wf_core.translate('WFMLR_NOTIFICATION_PREFERENCE')||
548: wf_core.newline||
549: '=================================================='||
550: wf_core.newline;
551: for tk in 1..tokens.COUNT loop
552: if tokens(tk) is not null and tokens(tk) <> ',' then
546: errorReport := wf_core.translate('WFMLR_RECIPIENT_ROLE')||' - '||
547: wf_core.translate('WFMLR_NOTIFICATION_PREFERENCE')||
548: wf_core.newline||
549: '=================================================='||
550: wf_core.newline;
551: for tk in 1..tokens.COUNT loop
552: if tokens(tk) is not null and tokens(tk) <> ',' then
553:
554: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
581: -- For a group of recipient, only one notification should be
582: -- sent.
583:
584: errorReport := errorReport || tokens(tk)||' - '||pref||
585: wf_core.newLine;
586: recipient_disabled := true;
587:
588: -- ER 5748131: Store the existing notification preference of the user
589: -- in FND_USER_PREFERENCES table which can used to reset it back when
621: -- Should the propagate fail, then save the
622: -- role to be used to update the ErrorStack with
623: -- the failed role and the reason.
624:
625: wf_core.get_error(err_name => errorName,
626: err_message => errMessage,
627: err_stack => errStack);
628:
629: invalidRoleList := invalidRoleList||'{'||tokens(tk)||
661: 'One or more users have been disabled. Sending a notification to SYSADMIN');
662: end if;
663: if length(errorReport) > 2000 then
664: errorReport := substrb(errorReport, 1, 1900);
665: errorReport := errorReport||wf_core.translate('WFMLR_REPORT_TRUNC');
666: end if;
667:
668: -- Note, can not call HandleSendError here since that will result
669: -- in the notification activity going into error. That is too
714: 'wf.plsql.WF_MAIL.Disable_Recipient_Ntf_Pref',
715: 'END WARNING');
716: end if;
717:
718: p_event.setErrorMessage(wf_core.translate('WFMLR_ROLE_UPDATE_FAILURE'));
719: p_event.setErrorStack(substrb(invalidRoleList, 1, 4000));
720: return 'WARNING';
721: else
722: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
728: end if;
729:
730: exception
731: when others then
732: wf_core.context('WF_MAIL','Disable_Recipient_Ntf_Pref',
733: role, pref);
734: raise;
735: end Disable_Recipient_Ntf_Pref;
736:
768:
769: return(buffer);
770: exception
771: when others then
772: wf_core.context('WF_MAIL', 'GetLovList', lk_type);
773: raise;
774: end GetLovList;
775:
776:
853: 'wf.plsql.WF_MAIL.HandleResponseError',
854: 'BEGIN');
855: end if;
856:
857: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
858: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
859: g_soOn := wf_core.translate('WFMLR_SO_ON');
860: g_none := wf_core.translate('WFMLR_NONE');
861:
854: 'BEGIN');
855: end if;
856:
857: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
858: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
859: g_soOn := wf_core.translate('WFMLR_SO_ON');
860: g_none := wf_core.translate('WFMLR_NONE');
861:
862: -- First look for a wf_core error.
855: end if;
856:
857: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
858: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
859: g_soOn := wf_core.translate('WFMLR_SO_ON');
860: g_none := wf_core.translate('WFMLR_NONE');
861:
862: -- First look for a wf_core error.
863: wf_core.get_error(errname, errmsg, errstack);
856:
857: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
858: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
859: g_soOn := wf_core.translate('WFMLR_SO_ON');
860: g_none := wf_core.translate('WFMLR_NONE');
861:
862: -- First look for a wf_core error.
863: wf_core.get_error(errname, errmsg, errstack);
864:
858: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
859: g_soOn := wf_core.translate('WFMLR_SO_ON');
860: g_none := wf_core.translate('WFMLR_NONE');
861:
862: -- First look for a wf_core error.
863: wf_core.get_error(errname, errmsg, errstack);
864:
865: -- If no wf_core error look for a sql error.
866: if (errname is null) then
859: g_soOn := wf_core.translate('WFMLR_SO_ON');
860: g_none := wf_core.translate('WFMLR_NONE');
861:
862: -- First look for a wf_core error.
863: wf_core.get_error(errname, errmsg, errstack);
864:
865: -- If no wf_core error look for a sql error.
866: if (errname is null) then
867: errmsg := sqlerrm;
861:
862: -- First look for a wf_core error.
863: wf_core.get_error(errname, errmsg, errstack);
864:
865: -- If no wf_core error look for a sql error.
866: if (errname is null) then
867: errmsg := sqlerrm;
868: end if;
869:
888: exception
889: when no_program_unit then
890: raise;
891: when others then
892: if (wf_core.error_name = 'WFNTF_ATTR') then
893: Wf_Core.Clear;
894: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_NAME');
895: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_NAME', errname);
896: end if;
889: when no_program_unit then
890: raise;
891: when others then
892: if (wf_core.error_name = 'WFNTF_ATTR') then
893: Wf_Core.Clear;
894: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_NAME');
895: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_NAME', errname);
896: end if;
897: end;
903: exception
904: when no_program_unit then
905: raise;
906: when others then
907: if (wf_core.error_name = 'WFNTF_ATTR') then
908: Wf_Core.Clear;
909: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_MESSAGE');
910: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_MESSAGE', errmsg);
911: end if;
904: when no_program_unit then
905: raise;
906: when others then
907: if (wf_core.error_name = 'WFNTF_ATTR') then
908: Wf_Core.Clear;
909: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_MESSAGE');
910: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_MESSAGE', errmsg);
911: end if;
912: end;
917: exception
918: when no_program_unit then
919: raise;
920: when others then
921: if (wf_core.error_name = 'WFNTF_ATTR') then
922: Wf_Core.Clear;
923: Wf_Notification.AddAttr(nid, 'MAIL_VALUE_FOUND');
924: Wf_Notification.SetAttrText(nid, 'MAIL_VALUE_FOUND', value_found);
925: end if;
918: when no_program_unit then
919: raise;
920: when others then
921: if (wf_core.error_name = 'WFNTF_ATTR') then
922: Wf_Core.Clear;
923: Wf_Notification.AddAttr(nid, 'MAIL_VALUE_FOUND');
924: Wf_Notification.SetAttrText(nid, 'MAIL_VALUE_FOUND', value_found);
925: end if;
926: end;
931: exception
932: when no_program_unit then
933: raise;
934: when others then
935: if (wf_core.error_name = 'WFNTF_ATTR') then
936: Wf_Core.Clear;
937: Wf_Notification.AddAttr(nid, 'MAIL_EXP_VALUES');
938: Wf_Notification.SetAttrText(nid, 'MAIL_EXP_VALUES', remarks);
939: end if;
932: when no_program_unit then
933: raise;
934: when others then
935: if (wf_core.error_name = 'WFNTF_ATTR') then
936: Wf_Core.Clear;
937: Wf_Notification.AddAttr(nid, 'MAIL_EXP_VALUES');
938: Wf_Notification.SetAttrText(nid, 'MAIL_EXP_VALUES', remarks);
939: end if;
940: end;
951: exception
952: when no_program_unit then
953: raise;
954: when others then
955: if (wf_core.error_name = 'WFNTF_ATTR') then
956: Wf_Core.Clear;
957: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_STACK');
958: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_STACK', errstack);
959: end if;
952: when no_program_unit then
953: raise;
954: when others then
955: if (wf_core.error_name = 'WFNTF_ATTR') then
956: Wf_Core.Clear;
957: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_STACK');
958: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_STACK', errstack);
959: end if;
960: end;
993: 'wf.plsql.WF_MAIL.HandleResponseError',
994: 'Error Msg '|| sqlerrm);
995: end if;
996:
997: wf_core.context('WF_MAIL', 'HandleResponseError', nid);
998: raise;
999: end HandleResponseError;
1000:
1001:
1077:
1078: return(buf);
1079: exception
1080: when others then
1081: wf_core.context('WF_MAIL', 'WordWrap', text, to_char(indent));
1082: raise;
1083: end WordWrap;
1084:
1085:
1107: from WF_LOOKUPS
1108: where LOOKUP_TYPE = lk_type and LOOKUP_CODE = lk_code;
1109: exception
1110: when no_data_found then
1111: wf_core.token('TYPE', lk_type);
1112: wf_core.token('CODE', lk_code);
1113: wf_core.raise('WFSQL_LOOKUP_CODE');
1114: end;
1115:
1108: where LOOKUP_TYPE = lk_type and LOOKUP_CODE = lk_code;
1109: exception
1110: when no_data_found then
1111: wf_core.token('TYPE', lk_type);
1112: wf_core.token('CODE', lk_code);
1113: wf_core.raise('WFSQL_LOOKUP_CODE');
1114: end;
1115:
1116: return(buf);
1109: exception
1110: when no_data_found then
1111: wf_core.token('TYPE', lk_type);
1112: wf_core.token('CODE', lk_code);
1113: wf_core.raise('WFSQL_LOOKUP_CODE');
1114: end;
1115:
1116: return(buf);
1117: exception
1115:
1116: return(buf);
1117: exception
1118: when others then
1119: wf_core.context('WF_MAIL', 'GetLovMeaning', lk_type, lk_code);
1120: raise;
1121: end GetLovMeaning;
1122:
1123:
1135: buf varchar2(30);
1136: begin
1137: -- Allow null values
1138: if (lk_meaning is null) then
1139: wf_core.raise('WFMLR_INVALID_LOOKUP');
1140: end if;
1141:
1142: -- Exact match
1143: begin
1161: where LOOKUP_TYPE = lk_type
1162: and upper(MEANING) = upper(lk_meaning);
1163: exception
1164: when no_data_found then
1165: wf_core.raise('WFMLR_INVALID_LOOKUP');
1166: end;
1167:
1168: return buf;
1169: exception
1167:
1168: return buf;
1169: exception
1170: when others then
1171: wf_core.context('WF_MAIL', 'GetLovCode', lk_type, lk_meaning);
1172: raise;
1173: end GetLovCode;
1174:
1175:
1207:
1208: return(buffer);
1209: exception
1210: when others then
1211: wf_core.context('WF_MAIL', 'GetLovListInternal', lk_type);
1212: raise;
1213: end GetLovListInternal;
1214:
1215: -- GetDirectAnswer (PRIVATE)
1270: one_answer := answer;
1271:
1272: exception
1273: when answer_syntax_error then
1274: wf_core.context('WF_MAIL', 'GetDirectAnswer');
1275: raise;
1276: when others then
1277: wf_core.context('WF_MAIL', 'GetDirectAnswer');
1278: raise;
1273: when answer_syntax_error then
1274: wf_core.context('WF_MAIL', 'GetDirectAnswer');
1275: raise;
1276: when others then
1277: wf_core.context('WF_MAIL', 'GetDirectAnswer');
1278: raise;
1279: end GetDirectAnswer;
1280:
1281:
1354: return buffer;
1355:
1356: exception
1357: when others then
1358: wf_core.context('WF_MAIL', 'GetEmailResponse', to_char(nid));
1359: raise;
1360: end GetEmailResponse;
1361:
1362:
1402:
1403: -- for each response variable
1404: for rec in c1 loop
1405: -- Construct response instruction:
1406: wf_core.token('DISPLAY_NAME', rec.display_name);
1407: wf_core.token('SEQ', seq);
1408: wf_core.token('DESCRIPTION', rec.description);
1409:
1410: -- Enter the
1403: -- for each response variable
1404: for rec in c1 loop
1405: -- Construct response instruction:
1406: wf_core.token('DISPLAY_NAME', rec.display_name);
1407: wf_core.token('SEQ', seq);
1408: wf_core.token('DESCRIPTION', rec.description);
1409:
1410: -- Enter the
1411: buffer := buffer||
1404: for rec in c1 loop
1405: -- Construct response instruction:
1406: wf_core.token('DISPLAY_NAME', rec.display_name);
1407: wf_core.token('SEQ', seq);
1408: wf_core.token('DESCRIPTION', rec.description);
1409:
1410: -- Enter the
1411: buffer := buffer||
1412: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_ENTER');
1408: wf_core.token('DESCRIPTION', rec.description);
1409:
1410: -- Enter the
1411: buffer := buffer||
1412: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_ENTER');
1413:
1414: if (rec.value is not null) then
1415: if (rec.type = 'LOOKUP') then
1416: wf_core.token('DEFAULT_VALUE',GetLovMeaning(rec.format,rec.value));
1412: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_ENTER');
1413:
1414: if (rec.value is not null) then
1415: if (rec.type = 'LOOKUP') then
1416: wf_core.token('DEFAULT_VALUE',GetLovMeaning(rec.format,rec.value));
1417: else
1418: wf_core.token('DEFAULT_VALUE', rec.value);
1419: end if;
1420: end if;
1414: if (rec.value is not null) then
1415: if (rec.type = 'LOOKUP') then
1416: wf_core.token('DEFAULT_VALUE',GetLovMeaning(rec.format,rec.value));
1417: else
1418: wf_core.token('DEFAULT_VALUE', rec.value);
1419: end if;
1420: end if;
1421:
1422: --
1420: end if;
1421:
1422: --
1423: IF(rec.date_value IS NOT null) then
1424: wf_core.token('DEFAULT_VALUE', rec.date_value);
1425: end if;
1426:
1427:
1428: --
1426:
1427:
1428: --
1429: if (rec.format is not null) then
1430: wf_core.token('FORMAT', rec.format);
1431: elsif (rec.type = 'VARCHAR2') then
1432: wf_core.token('FORMAT', '2000');
1433: end if;
1434:
1428: --
1429: if (rec.format is not null) then
1430: wf_core.token('FORMAT', rec.format);
1431: elsif (rec.type = 'VARCHAR2') then
1432: wf_core.token('FORMAT', '2000');
1433: end if;
1434:
1435: buffer := buffer||g_newLine;
1436:
1437: -- Handle LOOKUP specially because of printing the LOV list
1438: if (rec.type = 'LOOKUP') then
1439: if (rec.value is not null) then
1440: buffer := buffer||
1441: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_LOOKUP_DEFAULT');
1442: else
1443: buffer := buffer||
1444: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_LOOKUP');
1445: end if;
1440: buffer := buffer||
1441: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_LOOKUP_DEFAULT');
1442: else
1443: buffer := buffer||
1444: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_LOOKUP');
1445: end if;
1446: buffer := WordWrap(buffer, 0);
1447: buffer := buffer || g_newLine || GetLovList(rec.format);
1448: else
1452: -- DATE: show date format
1453: if (rec.format is not null) then
1454: -- &FORMAT would be replaced in "{Value must be a date in the form "&FORMAT".????? }"
1455: Buffer := buffer ||
1456: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DATE_FORMAT');
1457: else
1458: buffer := buffer ||
1459: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DATE');
1460: end if;
1455: Buffer := buffer ||
1456: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DATE_FORMAT');
1457: else
1458: buffer := buffer ||
1459: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DATE');
1460: end if;
1461: elsif (rec.type = 'NUMBER') then
1462: -- NUMBER: show number format
1463: if (rec.format is not null) then
1461: elsif (rec.type = 'NUMBER') then
1462: -- NUMBER: show number format
1463: if (rec.format is not null) then
1464: buffer := buffer ||
1465: wf_core.substitute('WFMLR','WFMLR_DIRECT_NUMBER_FORMAT');
1466: else
1467: buffer := buffer||
1468: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_NUMBER');
1469: end if;
1464: buffer := buffer ||
1465: wf_core.substitute('WFMLR','WFMLR_DIRECT_NUMBER_FORMAT');
1466: else
1467: buffer := buffer||
1468: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_NUMBER');
1469: end if;
1470:
1471: elsif (rec.type = 'VARCHAR2') then
1472: -- VARCHAR2: show varchar2 format
1470:
1471: elsif (rec.type = 'VARCHAR2') then
1472: -- VARCHAR2: show varchar2 format
1473: buffer := buffer||
1474: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_VARCHAR2_FORMAT');
1475: end if;
1476:
1477: --
1478: --
1477: --
1478: --
1479: if ((rec.value is not null) and (rec.type <> 'LOOKUP')) then
1480:
1481: wf_core.token('DEFAULT_VALUE', rec.value);
1482:
1483: buffer := buffer||g_newLine||
1484: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DEFAULT');
1485:
1480:
1481: wf_core.token('DEFAULT_VALUE', rec.value);
1482:
1483: buffer := buffer||g_newLine||
1484: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DEFAULT');
1485:
1486: elsif (rec.date_value is not null) then
1487: wf_core.token('DEFAULT_VALUE', rec.date_value);
1488:
1483: buffer := buffer||g_newLine||
1484: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DEFAULT');
1485:
1486: elsif (rec.date_value is not null) then
1487: wf_core.token('DEFAULT_VALUE', rec.date_value);
1488:
1489: -- {Default is "&DEFAULT_VALUE".??? }
1490: buffer := buffer||g_newLine||
1491: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DEFAULT');
1487: wf_core.token('DEFAULT_VALUE', rec.date_value);
1488:
1489: -- {Default is "&DEFAULT_VALUE".??? }
1490: buffer := buffer||g_newLine||
1491: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DEFAULT');
1492:
1493: end if;
1494:
1495: buffer := WordWrap(buffer, 0);
1503: return buffer;
1504:
1505: exception
1506: when others then
1507: wf_core.context('WF_MAIL', 'GetEmailDirectResponse', to_char(nid));
1508: raise;
1509: end GetEmailDirectResponse;
1510:
1511:
1732:
1733: return buffer;
1734: exception
1735: when others then
1736: WF_CORE.Context('WF_MAIL','GetMoreInfoLOV', to_char(nid));
1737: raise;
1738: end GetMoreInfoLOV;
1739:
1740: --
1867: end if;
1868: return buffer;
1869: exception
1870: when others then
1871: wf_core.context('Wf_Mail', 'GetMoreInfoMailTo', to_char(nid));
1872: raise;
1873: end GetMoreInfoMailTo;
1874:
1875:
1954: return buffer;
1955:
1956: exception
1957: when others then
1958: wf_core.context('WF_MAIL', 'GetMailToBody', to_char(nid));
1959: raise;
1960: end GetMailToBody;
1961:
1962: -- GetMailToBody (PRIVATE) - Construct the mailto body part.
2081:
2082: exception
2083: when others then
2084: -- wf_temp_lob.releaseLob(g_LOBTable, bufferIdx);
2085: wf_core.context('WF_MAIL', 'GetMailToBody', to_char(nid));
2086: raise;
2087: end GetMailToBody;
2088:
2089: -- GetMailTo - Construct MailTo Section (PRIVATE)
2259: return(buffer);
2260:
2261: exception
2262: when others then
2263: wf_core.context('WF_MAIL', 'GetMailTo', nid);
2264: raise;
2265:
2266: end GetMailTo;
2267:
2308: n_end_date_text := wf_notification_util.GetCalendarDate(n_nid, n_end_date, null, true);
2309:
2310: if (n_priority > 66) then
2311: --Bug 2774891 fix - sacsharm
2312: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2313: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2314: elsif (n_priority > 33) then
2315: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2316: else
2309:
2310: if (n_priority > 66) then
2311: --Bug 2774891 fix - sacsharm
2312: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2313: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2314: elsif (n_priority > 33) then
2315: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2316: else
2317: --Bug 2774891 fix - sacsharm
2311: --Bug 2774891 fix - sacsharm
2312: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2313: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2314: elsif (n_priority > 33) then
2315: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2316: else
2317: --Bug 2774891 fix - sacsharm
2318: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2319: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2314: elsif (n_priority > 33) then
2315: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2316: else
2317: --Bug 2774891 fix - sacsharm
2318: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2319: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2320: end if;
2321:
2322: stxt := substrb(txt, 1, 32000);
2315: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2316: else
2317: --Bug 2774891 fix - sacsharm
2318: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2319: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2320: end if;
2321:
2322: stxt := substrb(txt, 1, 32000);
2323: stxt := substrb(replace(stxt, '&'||'NOTIFICATION_ID', to_char(n_nid)), 1,
2399: where NAME = messageName
2400: and TYPE = itemType;
2401: exception
2402: when no_data_found then
2403: wf_core.token('NAME', messageName);
2404: wf_core.token('TYPE', itemType);
2405: wf_core.raise('WFNTF_MESSAGE');
2406: end;
2407:
2400: and TYPE = itemType;
2401: exception
2402: when no_data_found then
2403: wf_core.token('NAME', messageName);
2404: wf_core.token('TYPE', itemType);
2405: wf_core.raise('WFNTF_MESSAGE');
2406: end;
2407:
2408: -- Substitute USER_NAME with role display name
2401: exception
2402: when no_data_found then
2403: wf_core.token('NAME', messageName);
2404: wf_core.token('TYPE', itemType);
2405: wf_core.raise('WFNTF_MESSAGE');
2406: end;
2407:
2408: -- Substitute USER_NAME with role display name
2409: t_text_body := substrb(replace(t_text_body, '&'||'UFROM', ufrom), 1, 32000);
2424: html_body_text := t_html_body;
2425:
2426: exception
2427: when others then
2428: wf_core.context('WF_MAIL', 'GetWarning', ufrom, usubject, ubody);
2429: raise;
2430: end GetWarning;
2431:
2432:
2550: where NAME = t_name
2551: and TYPE = t_type;
2552: exception
2553: when NO_DATA_FOUND then
2554: wf_core.context('WF_MAIL','getTemplateName',
2555: 'nid => '||to_char(nid),
2556: 'n_status => '||n_status,
2557: 'n_mstatus => '||n_mStatus,
2558: 't_type => '||t_type,
2556: 'n_status => '||n_status,
2557: 'n_mstatus => '||n_mStatus,
2558: 't_type => '||t_type,
2559: 't_name => '||t_name);
2560: wf_core.token('TYPE', t_type);
2561: wf_core.token('NAME', t_name);
2562: wf_core.raise('WFMLR_NOTEMPLATE');
2563: end;
2564: end if;
2557: 'n_mstatus => '||n_mStatus,
2558: 't_type => '||t_type,
2559: 't_name => '||t_name);
2560: wf_core.token('TYPE', t_type);
2561: wf_core.token('NAME', t_name);
2562: wf_core.raise('WFMLR_NOTEMPLATE');
2563: end;
2564: end if;
2565:
2558: 't_type => '||t_type,
2559: 't_name => '||t_name);
2560: wf_core.token('TYPE', t_type);
2561: wf_core.token('NAME', t_name);
2562: wf_core.raise('WFMLR_NOTEMPLATE');
2563: end;
2564: end if;
2565:
2566: exception
2564: end if;
2565:
2566: exception
2567: when others then
2568: WF_CORE.Context('WF_MAIL','getTemplateName',to_char(nid), n_status,
2569: n_mstatus, t_type, t_name);
2570: raise;
2571: end getTemplateName;
2572:
2643: t_name := n_status;
2644: end if;
2645: n_nid_str := 'NID ' || to_char(nid);
2646: else
2647: wf_core.token('NID', to_char(nid));
2648: wf_core.token('POLICY', n_sig_policy);
2649: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
2650: end if;
2651:
2644: end if;
2645: n_nid_str := 'NID ' || to_char(nid);
2646: else
2647: wf_core.token('NID', to_char(nid));
2648: wf_core.token('POLICY', n_sig_policy);
2649: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
2650: end if;
2651:
2652: exception
2645: n_nid_str := 'NID ' || to_char(nid);
2646: else
2647: wf_core.token('NID', to_char(nid));
2648: wf_core.token('POLICY', n_sig_policy);
2649: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
2650: end if;
2651:
2652: exception
2653: when others then
2650: end if;
2651:
2652: exception
2653: when others then
2654: wf_core.context('WF_MAIL', 'ProcessSignaturePolicy', to_char(nid));
2655: raise;
2656: end ProcessSignaturePolicy;
2657:
2658: -- Returns TRUE if the language is Bi directional
2726: FROM wf_notifications
2727: WHERE notification_id = nid;
2728: exception
2729: when no_data_found then
2730: wf_core.token('NID', to_char(nid));
2731: wf_core.raise('WFNTF_NID');
2732: end;
2733:
2734: -- Cache the values of the product notification headers.
2727: WHERE notification_id = nid;
2728: exception
2729: when no_data_found then
2730: wf_core.token('NID', to_char(nid));
2731: wf_core.raise('WFNTF_NID');
2732: end;
2733:
2734: -- Cache the values of the product notification headers.
2735: attrList := '';
2806: document_type := display_type;
2807:
2808: exception
2809: when others then
2810: wf_core.context('WF_MAIL','GetHeaderTable',document_id, display_type);
2811: raise;
2812: end GetHeaderTable;
2813:
2814:
2919: from WF_NOTIFICATIONS
2920: where NOTIFICATION_ID = nid;
2921: exception
2922: when no_data_found then
2923: wf_core.token('NID', to_char(nid));
2924: wf_core.raise('WFNTF_NID');
2925: end;
2926:
2927: -- More information processing - bug 2282139
2920: where NOTIFICATION_ID = nid;
2921: exception
2922: when no_data_found then
2923: wf_core.token('NID', to_char(nid));
2924: wf_core.raise('WFNTF_NID');
2925: end;
2926:
2927: -- More information processing - bug 2282139
2928: g_moreinfo := NULL;
3119: from WF_MESSAGES_VL
3120: where NAME = t_name and TYPE = t_type;
3121: exception
3122: when no_data_found then
3123: wf_core.token('NAME', t_name);
3124: wf_core.token('TYPE', t_type);
3125: wf_core.raise('WFNTF_MESSAGE');
3126: end;
3127:
3120: where NAME = t_name and TYPE = t_type;
3121: exception
3122: when no_data_found then
3123: wf_core.token('NAME', t_name);
3124: wf_core.token('TYPE', t_type);
3125: wf_core.raise('WFNTF_MESSAGE');
3126: end;
3127:
3128: -- Get Click here Response display value
3121: exception
3122: when no_data_found then
3123: wf_core.token('NAME', t_name);
3124: wf_core.token('TYPE', t_type);
3125: wf_core.raise('WFNTF_MESSAGE');
3126: end;
3127:
3128: -- Get Click here Response display value
3129: begin
3371: body_atth := m_html;
3372:
3373: exception
3374: when no_program_unit then
3375: wf_core.context('WF_MAIL', 'GetMessage', to_char(nid), node);
3376: raise;
3377: when others then
3378: -- First look for a wf_core error.
3379: wf_core.get_error(err_name, err_message, err_stack);
3374: when no_program_unit then
3375: wf_core.context('WF_MAIL', 'GetMessage', to_char(nid), node);
3376: raise;
3377: when others then
3378: -- First look for a wf_core error.
3379: wf_core.get_error(err_name, err_message, err_stack);
3380:
3381: -- If no wf_core error look for a sql error.
3382: if (err_name is null) then
3375: wf_core.context('WF_MAIL', 'GetMessage', to_char(nid), node);
3376: raise;
3377: when others then
3378: -- First look for a wf_core error.
3379: wf_core.get_error(err_name, err_message, err_stack);
3380:
3381: -- If no wf_core error look for a sql error.
3382: if (err_name is null) then
3383: err_message := sqlerrm;
3377: when others then
3378: -- First look for a wf_core error.
3379: wf_core.get_error(err_name, err_message, err_stack);
3380:
3381: -- If no wf_core error look for a sql error.
3382: if (err_name is null) then
3383: err_message := sqlerrm;
3384: end if;
3385:
3383: err_message := sqlerrm;
3384: end if;
3385:
3386: error_result := err_message||g_newLine||err_stack;
3387: wf_core.context('WF_MAIL', 'GetMessage', to_char(nid), node, error_result);
3388:
3389: end GetMessage;
3390:
3391: -- LOBReplace
3511:
3512: exception
3513: when others then
3514: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3515: WF_CORE.Context('WF_MAIL','LOBReplace',token,
3516: tokenValue);
3517: raise;
3518:
3519: end LOBReplace;
3622:
3623: exception
3624: when others then
3625: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3626: WF_CORE.Context('WF_MAIL','LOBReplace',token, 'LOB');
3627: raise;
3628:
3629: end LOBReplace;
3630:
3705: n_end_date_text := wf_notification_util.GetCalendarDate(n_nid, n_end_date, null, true);
3706:
3707: if (n_priority > 66) then
3708: --Bug 2774891 fix - sacsharm
3709: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3710: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3711: elsif (n_priority > 33) then
3712: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3713: else
3706:
3707: if (n_priority > 66) then
3708: --Bug 2774891 fix - sacsharm
3709: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3710: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3711: elsif (n_priority > 33) then
3712: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3713: else
3714: --Bug 2774891 fix - sacsharm
3708: --Bug 2774891 fix - sacsharm
3709: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3710: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3711: elsif (n_priority > 33) then
3712: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3713: else
3714: --Bug 2774891 fix - sacsharm
3715: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3716: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3711: elsif (n_priority > 33) then
3712: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3713: else
3714: --Bug 2774891 fix - sacsharm
3715: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3716: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3717: end if;
3718:
3719: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.SESSION);
3712: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3713: else
3714: --Bug 2774891 fix - sacsharm
3715: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3716: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3717: end if;
3718:
3719: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.SESSION);
3720: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);
3987:
3988: exception
3989: when others then
3990: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3991: WF_CORE.Context('WF_MAIL','LOBSubstitute',tokenName,
3992: to_char(msgLen)||':'||to_char(pos)||':'||to_char(tempPos));
3993: raise;
3994: end LOBSubstitute;
3995:
4344: if(l_amount > l_lineSize) then
4345: dbms_lob.read(lob_loc => message, amount => l_lineSize,
4346: offset => l_offSet, buffer => l_strBuffer);
4347:
4348: l_lastCR := instr(l_strBuffer, wf_core.newline, -1);
4349: l_lastWS := instr(l_strBuffer, ' ', -1);
4350:
4351: if(l_lastCR > 1) then
4352: l_bufferSize := l_lastCR;
4361: l_offset := l_offset + l_bufferSize;
4362:
4363: if (l_forcedBreak) then
4364: l_strBuffer := substr(l_strBuffer, 1, l_bufferSize - 1)||
4365: wf_core.newline;
4366: -- Recalculate the buffer size incase newline is not the
4367: -- same size as the space that was removed
4368: l_bufferSize := length(l_strBuffer);
4369: end if;
4395: end if;
4396:
4397: -- exception
4398: -- when others then
4399: -- wf_core.context('WF_MAIL', 'LOBLineBreak', to_char(textWidth));
4400: -- raise;
4401: end LOBLineBreak;
4402:
4403:
4614:
4615: exception
4616: when others then
4617: wf_temp_lob.releaseLob(g_LOBTable, bufferIdx);
4618: wf_core.context('WF_MAIL', 'GetMailTo', nid);
4619: raise;
4620:
4621: end GetMailTo;
4622:
4851: end if;
4852:
4853: exception
4854: when others then
4855: WF_CORE.Context('WF_MAIL','SetContext',to_char(nid));
4856: raise;
4857: end setContext;
4858:
4859: -- Get_Last_Question (Private)
5118: end if;
5119:
5120: -- 3532615 Moved these from being initialized at the session level
5121: -- back to the notification level.
5122: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
5123: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
5124: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
5125: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
5126: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
5119:
5120: -- 3532615 Moved these from being initialized at the session level
5121: -- back to the notification level.
5122: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
5123: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
5124: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
5125: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
5126: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
5127: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
5120: -- 3532615 Moved these from being initialized at the session level
5121: -- back to the notification level.
5122: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
5123: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
5124: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
5125: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
5126: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
5127: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
5128: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
5121: -- back to the notification level.
5122: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
5123: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
5124: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
5125: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
5126: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
5127: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
5128: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
5129: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
5122: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
5123: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
5124: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
5125: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
5126: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
5127: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
5128: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
5129: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
5130: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
5123: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
5124: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
5125: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
5126: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
5127: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
5128: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
5129: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
5130: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
5131: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
5124: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
5125: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
5126: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
5127: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
5128: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
5129: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
5130: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
5131: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
5132: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
5125: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
5126: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
5127: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
5128: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
5129: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
5130: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
5131: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
5132: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
5133: g_wfmonId := wf_core.translate('WFMON_ID');
5126: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
5127: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
5128: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
5129: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
5130: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
5131: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
5132: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
5133: g_wfmonId := wf_core.translate('WFMON_ID');
5134: g_to := wf_core.translate('TO');
5127: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
5128: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
5129: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
5130: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
5131: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
5132: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
5133: g_wfmonId := wf_core.translate('WFMON_ID');
5134: g_to := wf_core.translate('TO');
5135: g_from := wf_core.translate('FROM');
5128: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
5129: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
5130: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
5131: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
5132: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
5133: g_wfmonId := wf_core.translate('WFMON_ID');
5134: g_to := wf_core.translate('TO');
5135: g_from := wf_core.translate('FROM');
5136:
5129: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
5130: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
5131: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
5132: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
5133: g_wfmonId := wf_core.translate('WFMON_ID');
5134: g_to := wf_core.translate('TO');
5135: g_from := wf_core.translate('FROM');
5136:
5137: g_beginDate := wf_core.translate('BEGIN_DATE');
5130: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
5131: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
5132: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
5133: g_wfmonId := wf_core.translate('WFMON_ID');
5134: g_to := wf_core.translate('TO');
5135: g_from := wf_core.translate('FROM');
5136:
5137: g_beginDate := wf_core.translate('BEGIN_DATE');
5138: g_dueDate2 := wf_core.translate('DUE_DATE');
5131: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
5132: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
5133: g_wfmonId := wf_core.translate('WFMON_ID');
5134: g_to := wf_core.translate('TO');
5135: g_from := wf_core.translate('FROM');
5136:
5137: g_beginDate := wf_core.translate('BEGIN_DATE');
5138: g_dueDate2 := wf_core.translate('DUE_DATE');
5139: g_notificationId := wf_core.translate('NOTIFICATION_ID');
5133: g_wfmonId := wf_core.translate('WFMON_ID');
5134: g_to := wf_core.translate('TO');
5135: g_from := wf_core.translate('FROM');
5136:
5137: g_beginDate := wf_core.translate('BEGIN_DATE');
5138: g_dueDate2 := wf_core.translate('DUE_DATE');
5139: g_notificationId := wf_core.translate('NOTIFICATION_ID');
5140: g_priority := wf_core.translate('PRIORITY');
5141:
5134: g_to := wf_core.translate('TO');
5135: g_from := wf_core.translate('FROM');
5136:
5137: g_beginDate := wf_core.translate('BEGIN_DATE');
5138: g_dueDate2 := wf_core.translate('DUE_DATE');
5139: g_notificationId := wf_core.translate('NOTIFICATION_ID');
5140: g_priority := wf_core.translate('PRIORITY');
5141:
5142: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5135: g_from := wf_core.translate('FROM');
5136:
5137: g_beginDate := wf_core.translate('BEGIN_DATE');
5138: g_dueDate2 := wf_core.translate('DUE_DATE');
5139: g_notificationId := wf_core.translate('NOTIFICATION_ID');
5140: g_priority := wf_core.translate('PRIORITY');
5141:
5142: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5143:
5136:
5137: g_beginDate := wf_core.translate('BEGIN_DATE');
5138: g_dueDate2 := wf_core.translate('DUE_DATE');
5139: g_notificationId := wf_core.translate('NOTIFICATION_ID');
5140: g_priority := wf_core.translate('PRIORITY');
5141:
5142: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5143:
5144: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
5138: g_dueDate2 := wf_core.translate('DUE_DATE');
5139: g_notificationId := wf_core.translate('NOTIFICATION_ID');
5140: g_priority := wf_core.translate('PRIORITY');
5141:
5142: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5143:
5144: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
5145: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
5146: g_soOn := wf_core.translate('WFMLR_SO_ON');
5140: g_priority := wf_core.translate('PRIORITY');
5141:
5142: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5143:
5144: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
5145: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
5146: g_soOn := wf_core.translate('WFMLR_SO_ON');
5147: g_none := wf_core.translate('WFMLR_NONE');
5148: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
5141:
5142: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5143:
5144: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
5145: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
5146: g_soOn := wf_core.translate('WFMLR_SO_ON');
5147: g_none := wf_core.translate('WFMLR_NONE');
5148: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
5149: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
5142: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5143:
5144: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
5145: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
5146: g_soOn := wf_core.translate('WFMLR_SO_ON');
5147: g_none := wf_core.translate('WFMLR_NONE');
5148: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
5149: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
5150: g_Id := wf_core.translate('ID');
5143:
5144: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
5145: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
5146: g_soOn := wf_core.translate('WFMLR_SO_ON');
5147: g_none := wf_core.translate('WFMLR_NONE');
5148: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
5149: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
5150: g_Id := wf_core.translate('ID');
5151:
5144: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
5145: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
5146: g_soOn := wf_core.translate('WFMLR_SO_ON');
5147: g_none := wf_core.translate('WFMLR_NONE');
5148: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
5149: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
5150: g_Id := wf_core.translate('ID');
5151:
5152: step := 'Getting notification information';
5145: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
5146: g_soOn := wf_core.translate('WFMLR_SO_ON');
5147: g_none := wf_core.translate('WFMLR_NONE');
5148: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
5149: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
5150: g_Id := wf_core.translate('ID');
5151:
5152: step := 'Getting notification information';
5153: -- Get notification information
5146: g_soOn := wf_core.translate('WFMLR_SO_ON');
5147: g_none := wf_core.translate('WFMLR_NONE');
5148: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
5149: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
5150: g_Id := wf_core.translate('ID');
5151:
5152: step := 'Getting notification information';
5153: -- Get notification information
5154: begin
5163: from WF_NOTIFICATIONS
5164: where NOTIFICATION_ID = nid;
5165: exception
5166: when no_data_found then
5167: wf_core.token('NID', to_char(nid));
5168: wf_core.raise('WFNTF_NID');
5169: end;
5170:
5171:
5164: where NOTIFICATION_ID = nid;
5165: exception
5166: when no_data_found then
5167: wf_core.token('NID', to_char(nid));
5168: wf_core.raise('WFNTF_NID');
5169: end;
5170:
5171:
5172: n_to_role := recipient;
5229: from WF_MESSAGES_VL
5230: where NAME = t_name and TYPE = t_type;
5231: exception
5232: when no_data_found then
5233: wf_core.token('NAME', t_name);
5234: wf_core.token('TYPE', t_type);
5235: wf_core.raise('WFNTF_MESSAGE');
5236: end;
5237:
5230: where NAME = t_name and TYPE = t_type;
5231: exception
5232: when no_data_found then
5233: wf_core.token('NAME', t_name);
5234: wf_core.token('TYPE', t_type);
5235: wf_core.raise('WFNTF_MESSAGE');
5236: end;
5237:
5238: g_isFwkNtf := true;
5231: exception
5232: when no_data_found then
5233: wf_core.token('NAME', t_name);
5234: wf_core.token('TYPE', t_type);
5235: wf_core.raise('WFNTF_MESSAGE');
5236: end;
5237:
5238: g_isFwkNtf := true;
5239: if (t_name in ('VIEW_FROMUI', 'VIEW_FROMUI_FYI')) then
5285: end loop;
5286: exception
5287: when others then
5288:
5289: wf_core.context('WF_MAIL','GetLOBMessage4',
5290: 'nid => '||to_char(nid),
5291: 'r_ntf_pref => '||r_ntf_pref);
5292: wf_core.token('ERROR',sqlerrm);
5293: wf_core.raise('WFMLR_NTFERR');
5288:
5289: wf_core.context('WF_MAIL','GetLOBMessage4',
5290: 'nid => '||to_char(nid),
5291: 'r_ntf_pref => '||r_ntf_pref);
5292: wf_core.token('ERROR',sqlerrm);
5293: wf_core.raise('WFMLR_NTFERR');
5294: end;
5295: -- Get the table of header attributes. Use a PL/SQL document
5296: -- API format.
5289: wf_core.context('WF_MAIL','GetLOBMessage4',
5290: 'nid => '||to_char(nid),
5291: 'r_ntf_pref => '||r_ntf_pref);
5292: wf_core.token('ERROR',sqlerrm);
5293: wf_core.raise('WFMLR_NTFERR');
5294: end;
5295: -- Get the table of header attributes. Use a PL/SQL document
5296: -- API format.
5297: end if; -- RENDERBODY
5319: end if;
5320: end loop;
5321: exception
5322: when others then
5323: wf_core.context('WF_MAIL','GetLOBMessage4',
5324: 'nid => '||to_char(nid),
5325: 'r_ntf_pref => '||r_ntf_pref);
5326: wf_core.token('ERROR',sqlerrm);
5327: wf_core.raise('WFMLR_NTFERR');
5322: when others then
5323: wf_core.context('WF_MAIL','GetLOBMessage4',
5324: 'nid => '||to_char(nid),
5325: 'r_ntf_pref => '||r_ntf_pref);
5326: wf_core.token('ERROR',sqlerrm);
5327: wf_core.raise('WFMLR_NTFERR');
5328: end;
5329:
5330: end if; -- RENDERBODY
5323: wf_core.context('WF_MAIL','GetLOBMessage4',
5324: 'nid => '||to_char(nid),
5325: 'r_ntf_pref => '||r_ntf_pref);
5326: wf_core.token('ERROR',sqlerrm);
5327: wf_core.raise('WFMLR_NTFERR');
5328: end;
5329:
5330: end if; -- RENDERBODY
5331: if (t_hdrRequired = TRUE) then
5577: end if;
5578:
5579: exception
5580: when no_program_unit then
5581: wf_core.context('WF_MAIL', 'GetLOBMessage4', to_char(nid), node,
5582: 'step -> '||step);
5583:
5584: if(g_html_messageIdx IS NOT NULL AND g_html_messageIdx > 0 ) then
5585: wf_temp_lob.releaseLob(g_LOBTable, g_html_messageIdx);
5590: end if;
5591:
5592: raise;
5593: when others then
5594: -- First look for a wf_core error.
5595: wf_core.get_error(err_name, err_message, err_stack);
5596: -- If no wf_core error look for a sql error.
5597: if (err_name is null) then
5598: err_message := sqlerrm;
5591:
5592: raise;
5593: when others then
5594: -- First look for a wf_core error.
5595: wf_core.get_error(err_name, err_message, err_stack);
5596: -- If no wf_core error look for a sql error.
5597: if (err_name is null) then
5598: err_message := sqlerrm;
5599: end if;
5592: raise;
5593: when others then
5594: -- First look for a wf_core error.
5595: wf_core.get_error(err_name, err_message, err_stack);
5596: -- If no wf_core error look for a sql error.
5597: if (err_name is null) then
5598: err_message := sqlerrm;
5599: end if;
5600:
5606: wf_temp_lob.releaseLob(g_LOBTable, g_text_messageIdx);
5607: end if;
5608:
5609: error_result := err_message||g_newLine||err_stack;
5610: wf_core.context('WF_MAIL', 'GetLOBMessage4', to_char(nid), node,
5611: error_result, 'Step -> '||step);
5612: end GetLOBMessage4;
5613:
5614:
5668: from WF_NOTIFICATIONS
5669: where NOTIFICATION_ID = nid;
5670: exception
5671: when no_data_found then
5672: wf_core.token('NID', to_char(nid));
5673: wf_core.raise('WFNTF_NID');
5674: end;
5675:
5676:
5669: where NOTIFICATION_ID = nid;
5670: exception
5671: when no_data_found then
5672: wf_core.token('NID', to_char(nid));
5673: wf_core.raise('WFNTF_NID');
5674: end;
5675:
5676:
5677: wf_mail.getLobMessage4(nid, node, agent, replyto, recipient, language,
5679: subject, body_atth, error_result, bodyToken, n_status, n_mstatus);
5680:
5681: exception
5682: when no_program_unit then
5683: wf_core.context('WF_MAIL', 'GetLOBMessage3', to_char(nid), node);
5684: raise;
5685: when others then
5686: -- First look for a wf_core error.
5687: wf_core.get_error(err_name, err_message, err_stack);
5682: when no_program_unit then
5683: wf_core.context('WF_MAIL', 'GetLOBMessage3', to_char(nid), node);
5684: raise;
5685: when others then
5686: -- First look for a wf_core error.
5687: wf_core.get_error(err_name, err_message, err_stack);
5688:
5689: -- If no wf_core error look for a sql error.
5690: if (err_name is null) then
5683: wf_core.context('WF_MAIL', 'GetLOBMessage3', to_char(nid), node);
5684: raise;
5685: when others then
5686: -- First look for a wf_core error.
5687: wf_core.get_error(err_name, err_message, err_stack);
5688:
5689: -- If no wf_core error look for a sql error.
5690: if (err_name is null) then
5691: err_message := sqlerrm;
5685: when others then
5686: -- First look for a wf_core error.
5687: wf_core.get_error(err_name, err_message, err_stack);
5688:
5689: -- If no wf_core error look for a sql error.
5690: if (err_name is null) then
5691: err_message := sqlerrm;
5692: end if;
5693:
5691: err_message := sqlerrm;
5692: end if;
5693:
5694: error_result := err_message||g_newLine||err_stack;
5695: wf_core.context('WF_MAIL', 'GetLOBMessage3', to_char(nid), node,
5696: error_result);
5697:
5698: end getLOBMessage3;
5699:
5746: subject, body_atth, error_result, bodyToken);
5747:
5748: exception
5749: when no_program_unit then
5750: wf_core.context('WF_MAIL', 'GetLOBMessage2', to_char(nid), node);
5751: raise;
5752: when others then
5753: -- First look for a wf_core error.
5754: wf_core.get_error(err_name, err_message, err_stack);
5749: when no_program_unit then
5750: wf_core.context('WF_MAIL', 'GetLOBMessage2', to_char(nid), node);
5751: raise;
5752: when others then
5753: -- First look for a wf_core error.
5754: wf_core.get_error(err_name, err_message, err_stack);
5755:
5756: -- If no wf_core error look for a sql error.
5757: if (err_name is null) then
5750: wf_core.context('WF_MAIL', 'GetLOBMessage2', to_char(nid), node);
5751: raise;
5752: when others then
5753: -- First look for a wf_core error.
5754: wf_core.get_error(err_name, err_message, err_stack);
5755:
5756: -- If no wf_core error look for a sql error.
5757: if (err_name is null) then
5758: err_message := sqlerrm;
5752: when others then
5753: -- First look for a wf_core error.
5754: wf_core.get_error(err_name, err_message, err_stack);
5755:
5756: -- If no wf_core error look for a sql error.
5757: if (err_name is null) then
5758: err_message := sqlerrm;
5759: end if;
5760:
5758: err_message := sqlerrm;
5759: end if;
5760:
5761: error_result := err_message||g_newLine||err_stack;
5762: wf_core.context('WF_MAIL', 'GetLOBMessage2', to_char(nid), node,
5763: error_result);
5764:
5765: end getLOBMessage2;
5766:
5808: from WF_NOTIFICATIONS
5809: where NOTIFICATION_ID = nid;
5810: exception
5811: when no_data_found then
5812: wf_core.token('NID', to_char(nid));
5813: wf_core.raise('WFNTF_NID');
5814: end;
5815:
5816: -- Get Recipient information
5809: where NOTIFICATION_ID = nid;
5810: exception
5811: when no_data_found then
5812: wf_core.token('NID', to_char(nid));
5813: wf_core.raise('WFNTF_NID');
5814: end;
5815:
5816: -- Get Recipient information
5817: Wf_Directory.GetRoleInfoMail(n_to_role, r_dname, r_email, r_ntf_pref,
5828: subject, body_atth, error_result);
5829:
5830: exception
5831: when no_program_unit then
5832: wf_core.context('WF_MAIL', 'GetLOBMessage', to_char(nid), node);
5833: raise;
5834: when others then
5835: -- First look for a wf_core error.
5836: wf_core.get_error(err_name, err_message, err_stack);
5831: when no_program_unit then
5832: wf_core.context('WF_MAIL', 'GetLOBMessage', to_char(nid), node);
5833: raise;
5834: when others then
5835: -- First look for a wf_core error.
5836: wf_core.get_error(err_name, err_message, err_stack);
5837:
5838: -- If no wf_core error look for a sql error.
5839: if (err_name is null) then
5832: wf_core.context('WF_MAIL', 'GetLOBMessage', to_char(nid), node);
5833: raise;
5834: when others then
5835: -- First look for a wf_core error.
5836: wf_core.get_error(err_name, err_message, err_stack);
5837:
5838: -- If no wf_core error look for a sql error.
5839: if (err_name is null) then
5840: err_message := sqlerrm;
5834: when others then
5835: -- First look for a wf_core error.
5836: wf_core.get_error(err_name, err_message, err_stack);
5837:
5838: -- If no wf_core error look for a sql error.
5839: if (err_name is null) then
5840: err_message := sqlerrm;
5841: end if;
5842:
5840: err_message := sqlerrm;
5841: end if;
5842:
5843: error_result := err_message||g_newLine||err_stack;
5844: wf_core.context('WF_MAIL', 'GetLOBMessage', to_char(nid), node,
5845: error_result);
5846: end GetLOBMessage;
5847:
5848: -- GetSummary - get summary messages for one role
5865: lob varchar2(1);
5866: begin
5867: GetSummary(role, dname, node, subject, body_text,lob);
5868: if lob = 'Y' then
5869: wf_core.context('WF_MAIL', 'GetSummary', role, node);
5870: wf_core.raise('WFMLR_SUMMARY_TOOBIG');
5871: end if;
5872: exception
5873: when others then
5866: begin
5867: GetSummary(role, dname, node, subject, body_text,lob);
5868: if lob = 'Y' then
5869: wf_core.context('WF_MAIL', 'GetSummary', role, node);
5870: wf_core.raise('WFMLR_SUMMARY_TOOBIG');
5871: end if;
5872: exception
5873: when others then
5874: wf_core.context('WF_MAIL', 'GetSummary', role, node);
5870: wf_core.raise('WFMLR_SUMMARY_TOOBIG');
5871: end if;
5872: exception
5873: when others then
5874: wf_core.context('WF_MAIL', 'GetSummary', role, node);
5875: raise;
5876: end GetSummary;
5877:
5878: -- GetSummary2 - get summary messages for one role
5954: 'wf.plsql.WF_MAIL.GetSummary2',
5955: 'BEGIN');
5956: end if;
5957:
5958: g_wfmonId := wf_core.translate('WFMON_ID');
5959: g_to := wf_core.translate('TO');
5960: g_priority := wf_core.translate('PRIORITY');
5961: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5962:
5955: 'BEGIN');
5956: end if;
5957:
5958: g_wfmonId := wf_core.translate('WFMON_ID');
5959: g_to := wf_core.translate('TO');
5960: g_priority := wf_core.translate('PRIORITY');
5961: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5962:
5963: -- Bug# 2358498 - flag to indicate if the sumamry is LOB
5956: end if;
5957:
5958: g_wfmonId := wf_core.translate('WFMON_ID');
5959: g_to := wf_core.translate('TO');
5960: g_priority := wf_core.translate('PRIORITY');
5961: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5962:
5963: -- Bug# 2358498 - flag to indicate if the sumamry is LOB
5964: lob := 'N';
5957:
5958: g_wfmonId := wf_core.translate('WFMON_ID');
5959: g_to := wf_core.translate('TO');
5960: g_priority := wf_core.translate('PRIORITY');
5961: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5962:
5963: -- Bug# 2358498 - flag to indicate if the sumamry is LOB
5964: lob := 'N';
5965:
5988: where NAME = templateName
5989: and TYPE = templateType;
5990: exception
5991: when no_data_found then
5992: wf_core.token('NAME', templateName);
5993: wf_core.token('TYPE', templateType);
5994: wf_core.raise('WFNTF_MESSAGE');
5995: end;
5996:
5989: and TYPE = templateType;
5990: exception
5991: when no_data_found then
5992: wf_core.token('NAME', templateName);
5993: wf_core.token('TYPE', templateType);
5994: wf_core.raise('WFNTF_MESSAGE');
5995: end;
5996:
5997: -- Retrieve role orig_system ids for index access
5990: exception
5991: when no_data_found then
5992: wf_core.token('NAME', templateName);
5993: wf_core.token('TYPE', templateType);
5994: wf_core.raise('WFNTF_MESSAGE');
5995: end;
5996:
5997: -- Retrieve role orig_system ids for index access
5998: -- <
6004: t_subject := substrb(replace(t_subject, '&'||'USER_NAME',
6005: r_displayName), 1, 240);
6006:
6007: if (rorig_system is null or rorig_system = '') then
6008: wf_core.token('ROLE', role);
6009: wf_core.raise('WFNTF_ROLE');
6010: end if;
6011:
6012: if contType = g_ntfDocHtml then
6005: r_displayName), 1, 240);
6006:
6007: if (rorig_system is null or rorig_system = '') then
6008: wf_core.token('ROLE', role);
6009: wf_core.raise('WFNTF_ROLE');
6010: end if;
6011:
6012: if contType = g_ntfDocHtml then
6013: if (t_html_body is null) then
6081: n_buf := lpad(to_char(nid), 7, ' ')||' '||
6082: rpad(substr(dname, 1, 42), 42, ' ')||' ';
6083: if (rec.priority > 66) then
6084: --Bug 2774891 fix - sacsharm
6085: --priority_text := wf_core.substitute('WFTKN', 'HIGH');
6086: priority_text := wf_core.substitute('WFTKN', 'LOW');
6087: elsif (rec.priority > 33) then
6088: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
6089: else
6082: rpad(substr(dname, 1, 42), 42, ' ')||' ';
6083: if (rec.priority > 66) then
6084: --Bug 2774891 fix - sacsharm
6085: --priority_text := wf_core.substitute('WFTKN', 'HIGH');
6086: priority_text := wf_core.substitute('WFTKN', 'LOW');
6087: elsif (rec.priority > 33) then
6088: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
6089: else
6090: --Bug 2774891 fix - sacsharm
6084: --Bug 2774891 fix - sacsharm
6085: --priority_text := wf_core.substitute('WFTKN', 'HIGH');
6086: priority_text := wf_core.substitute('WFTKN', 'LOW');
6087: elsif (rec.priority > 33) then
6088: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
6089: else
6090: --Bug 2774891 fix - sacsharm
6091: --priority_text := wf_core.substitute('WFTKN', 'LOW');
6092: priority_text := wf_core.substitute('WFTKN', 'HIGH');
6087: elsif (rec.priority > 33) then
6088: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
6089: else
6090: --Bug 2774891 fix - sacsharm
6091: --priority_text := wf_core.substitute('WFTKN', 'LOW');
6092: priority_text := wf_core.substitute('WFTKN', 'HIGH');
6093: end if;
6094:
6095: n_buf := n_buf||lpad(priority_text, 12, ' ');
6088: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
6089: else
6090: --Bug 2774891 fix - sacsharm
6091: --priority_text := wf_core.substitute('WFTKN', 'LOW');
6092: priority_text := wf_core.substitute('WFTKN', 'HIGH');
6093: end if;
6094:
6095: n_buf := n_buf||lpad(priority_text, 12, ' ');
6096: n_buf := n_buf||' '||to_char(rec.due_date)||g_newLine;
6172:
6173: end if;
6174:
6175:
6176: wf_core.context('WF_MAIL', 'GetSummary2', role, node, contType);
6177: raise;
6178: end GetSummary2;
6179:
6180: -- GetSummary - get summary messages for one role
6200: begin
6201: GetSummary2(role, dname, node, 'Y', 'text/plain', subject, body_text, lob);
6202: exception
6203: when others then
6204: wf_core.context('WF_MAIL', 'GetSummary', role, node);
6205: raise;
6206: end GetSummary;
6207:
6208:
6273: end if;
6274: end if;
6275: exception
6276: when others then
6277: WF_CORE.Context('WF_MAIL','FetchLOBContent',doc_type,
6278: to_char(pos)||':'||buffer);
6279: raise;
6280: end FetchLOBContent;
6281:
6294: wf_temp_lob.releaseLob(g_LOBTable, g_text_messageIdx);
6295: end if;
6296: exception
6297: when others then
6298: WF_CORE.Context('WF_MAIL','CloseLOB', doc_type);
6299: raise;
6300: end;
6301:
6302: -- CloseLOB - Close the message LOBs ready for use again later
6307: WF_MAIL.CloseLOB(g_ntfDocText);
6308: WF_MAIL.CloseLOB(g_ntfDocHtml);
6309: exception
6310: when others then
6311: WF_CORE.Context('WF_MAIL','CloseLOB');
6312: raise;
6313: end;
6314:
6315:
6330: return('NO_DATA_FOUND');
6331:
6332: when others then
6333: error_result := sqlerrm;
6334: wf_core.context('WF_MAIL', 'FetchUrlContent', piece_count);
6335:
6336: end FetchUrlContent;
6337:
6338:
6371:
6372: when utl_http.init_failed then
6373: error_result := 'UTL_HTTP.INIT_FAILED';
6374: error_result := error_result || sqlerrm;
6375: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6376:
6377: when utl_http.request_failed then
6378: error_result := 'UTL_HTTP.REQUEST_FAILED';
6379: error_result := error_result || sqlerrm;
6376:
6377: when utl_http.request_failed then
6378: error_result := 'UTL_HTTP.REQUEST_FAILED';
6379: error_result := error_result || sqlerrm;
6380: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6381:
6382: when no_program_unit then
6383: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6384: raise;
6379: error_result := error_result || sqlerrm;
6380: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6381:
6382: when no_program_unit then
6383: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6384: raise;
6385: when others then
6386: error_result := sqlerrm;
6387: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6383: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6384: raise;
6385: when others then
6386: error_result := sqlerrm;
6387: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6388:
6389: end GetUrlContent;
6390:
6391: -- GetDocContent - get Document content
6416: doccontent := Wf_Notification.GetAttrDoc(nid, docattrname, disptype);
6417:
6418: exception
6419: when no_program_unit then
6420: wf_core.context('WF_MAIL', 'GetDocContent', docattrname);
6421: raise;
6422: when others then
6423: -- First look for a wf_core error.
6424: wf_core.get_error(err_name, err_message, err_stack);
6419: when no_program_unit then
6420: wf_core.context('WF_MAIL', 'GetDocContent', docattrname);
6421: raise;
6422: when others then
6423: -- First look for a wf_core error.
6424: wf_core.get_error(err_name, err_message, err_stack);
6425:
6426: -- If no wf_core error look for a sql error.
6427: if (err_name is null) then
6420: wf_core.context('WF_MAIL', 'GetDocContent', docattrname);
6421: raise;
6422: when others then
6423: -- First look for a wf_core error.
6424: wf_core.get_error(err_name, err_message, err_stack);
6425:
6426: -- If no wf_core error look for a sql error.
6427: if (err_name is null) then
6428: err_message := sqlerrm;
6422: when others then
6423: -- First look for a wf_core error.
6424: wf_core.get_error(err_name, err_message, err_stack);
6425:
6426: -- If no wf_core error look for a sql error.
6427: if (err_name is null) then
6428: err_message := sqlerrm;
6429: end if;
6430:
6428: err_message := sqlerrm;
6429: end if;
6430:
6431: error_result := err_message;
6432: wf_core.context('WF_MAIL', 'GetDocContent', docattrname);
6433:
6434: end GetDocContent;
6435:
6436: -- GetLOBDocContent - get Document content
6460: Wf_Mail.GetLOBDocContent(nid, docattrname, disptype, doctype, error_result);
6461:
6462: exception
6463: when no_program_unit then
6464: wf_core.context('WF_MAIL', 'oldGetLOBDocContent', docattrname);
6465: raise;
6466: when others then
6467: -- First look for a wf_core error.
6468: wf_core.get_error(err_name, err_message, err_stack);
6463: when no_program_unit then
6464: wf_core.context('WF_MAIL', 'oldGetLOBDocContent', docattrname);
6465: raise;
6466: when others then
6467: -- First look for a wf_core error.
6468: wf_core.get_error(err_name, err_message, err_stack);
6469:
6470: -- If no wf_core error look for a sql error.
6471: if (err_name is null) then
6464: wf_core.context('WF_MAIL', 'oldGetLOBDocContent', docattrname);
6465: raise;
6466: when others then
6467: -- First look for a wf_core error.
6468: wf_core.get_error(err_name, err_message, err_stack);
6469:
6470: -- If no wf_core error look for a sql error.
6471: if (err_name is null) then
6472: err_message := sqlerrm;
6466: when others then
6467: -- First look for a wf_core error.
6468: wf_core.get_error(err_name, err_message, err_stack);
6469:
6470: -- If no wf_core error look for a sql error.
6471: if (err_name is null) then
6472: err_message := sqlerrm;
6473: end if;
6474:
6472: err_message := sqlerrm;
6473: end if;
6474:
6475: error_result := err_message;
6476: wf_core.context('WF_MAIL', 'oldGetDocLOBContent', docattrname);
6477: end GetLOBDocContent;
6478:
6479: -- GetLOBDocContent - get Document content
6480: --
6533:
6534: exception
6535: -- propagating all exceptions to the calling program
6536: when others then
6537: wf_core.context('WF_MAIL', 'GetLOBDocContent', docattrname);
6538: raise;
6539:
6540: end GetLOBDocContent;
6541:
6615: end loop;
6616: return tmpBody;
6617: exception
6618: when others then
6619: wf_core.context('WF_MAIL', 'RemoveSpace');
6620: raise;
6621: end RemoveSpace;
6622:
6623: -- PutMessage
6694: from WF_NOTIFICATIONS
6695: where NOTIFICATION_ID = nid;
6696: exception
6697: when no_data_found then
6698: wf_core.token('NID', to_char(nid));
6699: wf_core.raise('WFNTF_NID');
6700: end;
6701: i := 1;
6702: -- collect all the response attributes and their details
6695: where NOTIFICATION_ID = nid;
6696: exception
6697: when no_data_found then
6698: wf_core.token('NID', to_char(nid));
6699: wf_core.raise('WFNTF_NID');
6700: end;
6701: i := 1;
6702: -- collect all the response attributes and their details
6703: -- for the notification
6713: -- raise error is the policy is invalid
6714: Wf_Mail.GetSignaturePolicy(nid, n_sig_policy);
6715: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6716: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6717: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6718: wf_core.token('NID', to_char(nid));
6719: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6720: else
6721: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6714: Wf_Mail.GetSignaturePolicy(nid, n_sig_policy);
6715: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6716: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6717: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6718: wf_core.token('NID', to_char(nid));
6719: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6720: else
6721: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6722: wf_core.token('NID', to_char(nid));
6715: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6716: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6717: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6718: wf_core.token('NID', to_char(nid));
6719: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6720: else
6721: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6722: wf_core.token('NID', to_char(nid));
6723: wf_core.token('POLICY', n_sig_policy);
6717: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6718: wf_core.token('NID', to_char(nid));
6719: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6720: else
6721: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6722: wf_core.token('NID', to_char(nid));
6723: wf_core.token('POLICY', n_sig_policy);
6724: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6725: end if;
6718: wf_core.token('NID', to_char(nid));
6719: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6720: else
6721: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6722: wf_core.token('NID', to_char(nid));
6723: wf_core.token('POLICY', n_sig_policy);
6724: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6725: end if;
6726: end if;
6719: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6720: else
6721: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6722: wf_core.token('NID', to_char(nid));
6723: wf_core.token('POLICY', n_sig_policy);
6724: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6725: end if;
6726: end if;
6727:
6720: else
6721: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6722: wf_core.token('NID', to_char(nid));
6723: wf_core.token('POLICY', n_sig_policy);
6724: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6725: end if;
6726: end if;
6727:
6728: -- all database-friendly RemoveSpace
6848: -- Complete the response.
6849: if response then
6850: Wf_Notification.Respond(nid, NULL, 'email:'||from_addr);
6851: else
6852: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6853: wf_core.raise('WFRSPR_NORESPONSE');
6854: end if;
6855:
6856: exception
6849: if response then
6850: Wf_Notification.Respond(nid, NULL, 'email:'||from_addr);
6851: else
6852: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6853: wf_core.raise('WFRSPR_NORESPONSE');
6854: end if;
6855:
6856: exception
6857: when no_program_unit then
6854: end if;
6855:
6856: exception
6857: when no_program_unit then
6858: wf_core.context('WF_MAIL','PutMessage', to_char(nid));
6859: raise;
6860: when OTHERS then
6861: wf_core.context('WF_MAIL','PutMessage', to_char(nid));
6862: -- Save error message and set status to INVALID so mailer will
6857: when no_program_unit then
6858: wf_core.context('WF_MAIL','PutMessage', to_char(nid));
6859: raise;
6860: when OTHERS then
6861: wf_core.context('WF_MAIL','PutMessage', to_char(nid));
6862: -- Save error message and set status to INVALID so mailer will
6863: -- bounce an "invalid reply" message to sender.
6864: HandleResponseError(nid, lk_type, lk_meaning, error_result);
6865: end PutMessage;
6938: from WF_NOTIFICATIONS
6939: where NOTIFICATION_ID = nid;
6940: exception
6941: when no_data_found then
6942: wf_core.token('NID', to_char(nid));
6943: wf_core.raise('WFNTF_NID');
6944: end;
6945:
6946: -- Bug 2375920 get the signature policy for the notification and
6939: where NOTIFICATION_ID = nid;
6940: exception
6941: when no_data_found then
6942: wf_core.token('NID', to_char(nid));
6943: wf_core.raise('WFNTF_NID');
6944: end;
6945:
6946: -- Bug 2375920 get the signature policy for the notification and
6947: -- raise error is the policy is invalid
6947: -- raise error is the policy is invalid
6948: Wf_Mail.GetSignaturePolicy(nid, n_sig_policy);
6949: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6950: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6951: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6952: wf_core.token('NID', to_char(nid));
6953: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6954: else
6955: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6948: Wf_Mail.GetSignaturePolicy(nid, n_sig_policy);
6949: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6950: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6951: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6952: wf_core.token('NID', to_char(nid));
6953: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6954: else
6955: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6956: wf_core.token('NID', to_char(nid));
6949: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6950: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6951: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6952: wf_core.token('NID', to_char(nid));
6953: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6954: else
6955: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6956: wf_core.token('NID', to_char(nid));
6957: wf_core.token('POLICY', n_sig_policy);
6951: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6952: wf_core.token('NID', to_char(nid));
6953: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6954: else
6955: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6956: wf_core.token('NID', to_char(nid));
6957: wf_core.token('POLICY', n_sig_policy);
6958: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6959: end if;
6952: wf_core.token('NID', to_char(nid));
6953: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6954: else
6955: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6956: wf_core.token('NID', to_char(nid));
6957: wf_core.token('POLICY', n_sig_policy);
6958: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6959: end if;
6960: end if;
6953: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6954: else
6955: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6956: wf_core.token('NID', to_char(nid));
6957: wf_core.token('POLICY', n_sig_policy);
6958: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6959: end if;
6960: end if;
6961:
6954: else
6955: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6956: wf_core.token('NID', to_char(nid));
6957: wf_core.token('POLICY', n_sig_policy);
6958: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6959: end if;
6960: end if;
6961:
6962: -- Process all Response attributes.
7019: -- Complete the response.
7020: if response then
7021: Wf_Notification.Respond(nid, NULL, 'email:'||from_addr);
7022: else
7023: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid),
7024: node, from_addr);
7025: wf_core.raise('WFRSPR_NORESPONSE');
7026: end if;
7027: exception
7021: Wf_Notification.Respond(nid, NULL, 'email:'||from_addr);
7022: else
7023: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid),
7024: node, from_addr);
7025: wf_core.raise('WFRSPR_NORESPONSE');
7026: end if;
7027: exception
7028: when no_program_unit then
7029: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
7025: wf_core.raise('WFRSPR_NORESPONSE');
7026: end if;
7027: exception
7028: when no_program_unit then
7029: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
7030: raise;
7031: when OTHERS then
7032: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
7033: -- Save error message and set status to INVALID so mailer will
7028: when no_program_unit then
7029: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
7030: raise;
7031: when OTHERS then
7032: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
7033: -- Save error message and set status to INVALID so mailer will
7034: -- bounce an "invalid reply" message to sender.
7035: HandleResponseError(nid, lk_type, lk_meaning, error_result);
7036: end PutDirectMessage;
7109: wf_notification.UpdateInfo2(nid, to_user, from_addr, comment);
7110: end if;
7111: exception
7112: when no_program_unit then
7113: wf_core.context('WF_MAIL','PutMoreInfoRequest', to_char(nid));
7114: raise;
7115: when OTHERS then
7116: wf_core.context('WF_MAIL','PutMoreInfoRequest', to_char(nid));
7117: -- Save error message and set status to INVALID so mailer will
7112: when no_program_unit then
7113: wf_core.context('WF_MAIL','PutMoreInfoRequest', to_char(nid));
7114: raise;
7115: when OTHERS then
7116: wf_core.context('WF_MAIL','PutMoreInfoRequest', to_char(nid));
7117: -- Save error message and set status to INVALID so mailer will
7118: -- bounce an "invalid reply" message to sender.
7119: HandleResponseError(nid, dummy, dummy, error_result);
7120: end PutMoreInfoRequest;
7192: to_user := NULL;
7193: wf_notification.UpdateInfo2(nid, to_user, from_addr, comment);
7194: exception
7195: when no_program_unit then
7196: wf_core.context('WF_MAIL','PutMoreInfoMessage', to_char(nid));
7197: raise;
7198: when OTHERS then
7199: wf_core.context('WF_MAIL','PutMoreInfoMessage', to_char(nid));
7200: -- Save error message and set status to INVALID so mailer will
7195: when no_program_unit then
7196: wf_core.context('WF_MAIL','PutMoreInfoMessage', to_char(nid));
7197: raise;
7198: when OTHERS then
7199: wf_core.context('WF_MAIL','PutMoreInfoMessage', to_char(nid));
7200: -- Save error message and set status to INVALID so mailer will
7201: -- bounce an "invalid reply" message to sender.
7202: HandleResponseError(nid, dummy, dummy, error_result);
7203: end PutMoreInfoMessage;
7278: buffer := '';
7279: end if;
7280: exception
7281: when no_program_unit then
7282: wf_core.context('WF_MAIL', 'GetURLAttachment', to_char(nid));
7283: raise;
7284: when others then
7285: -- First look for a wf_core error.
7286: wf_core.get_error(err_name, err_message, err_stack);
7281: when no_program_unit then
7282: wf_core.context('WF_MAIL', 'GetURLAttachment', to_char(nid));
7283: raise;
7284: when others then
7285: -- First look for a wf_core error.
7286: wf_core.get_error(err_name, err_message, err_stack);
7287:
7288: -- If no wf_core error look for a sql error.
7289: if (err_name is null) then
7282: wf_core.context('WF_MAIL', 'GetURLAttachment', to_char(nid));
7283: raise;
7284: when others then
7285: -- First look for a wf_core error.
7286: wf_core.get_error(err_name, err_message, err_stack);
7287:
7288: -- If no wf_core error look for a sql error.
7289: if (err_name is null) then
7290: err_message := sqlerrm;
7284: when others then
7285: -- First look for a wf_core error.
7286: wf_core.get_error(err_name, err_message, err_stack);
7287:
7288: -- If no wf_core error look for a sql error.
7289: if (err_name is null) then
7290: err_message := sqlerrm;
7291: end if;
7292:
7290: err_message := sqlerrm;
7291: end if;
7292:
7293: error_result := err_message;
7294: wf_core.context('WF_MAIL', 'GetURLAttachment', to_char(nid));
7295:
7296: end;
7297:
7298:
7427: and rownum < 2;
7428: end;
7429: exception
7430: when OTHERS then
7431: wf_core.context('WF_MAIL', 'GetCharset', lang, terr);
7432: raise;
7433: end GetCharset;
7434:
7435:
7496:
7497:
7498: exception
7499: when others then
7500: wf_core.context('WF_MAIL', 'GetSessionLanguage');
7501: raise;
7502: end GetSessionLanguage;
7503:
7504:
7521: sig_policy := Wf_Notification.GetAttrText(nid, '#WF_SIG_POLICY');
7522:
7523: exception
7524: when others then
7525: if (wf_core.error_name = 'WFNTF_ATTR') then
7526: wf_core.clear;
7527: sig_policy := 'DEFAULT';
7528: else
7529: raise;
7522:
7523: exception
7524: when others then
7525: if (wf_core.error_name = 'WFNTF_ATTR') then
7526: wf_core.clear;
7527: sig_policy := 'DEFAULT';
7528: else
7529: raise;
7530: end if;
7550: p_sec_policy := 'DEFAULT';
7551: end if;
7552: exception
7553: when others then
7554: if (wf_core.error_name = 'WFNTF_ATTR') then
7555: wf_core.clear;
7556: p_sec_policy := 'DEFAULT';
7557: else
7558: raise;
7551: end if;
7552: exception
7553: when others then
7554: if (wf_core.error_name = 'WFNTF_ATTR') then
7555: wf_core.clear;
7556: p_sec_policy := 'DEFAULT';
7557: else
7558: raise;
7559: end if;
7579: FROM wf_ntf_security_policies
7580: WHERE policy_name = l_sec_policy;
7581: exception
7582: when others then
7583: Wf_Core.Token('NID', to_char(p_nid));
7584: Wf_Core.Token('POLICY', l_sec_policy);
7585: Wf_Core.Raise('WFMLR_INVALID_SEC_POLICY');
7586: end;
7587:
7580: WHERE policy_name = l_sec_policy;
7581: exception
7582: when others then
7583: Wf_Core.Token('NID', to_char(p_nid));
7584: Wf_Core.Token('POLICY', l_sec_policy);
7585: Wf_Core.Raise('WFMLR_INVALID_SEC_POLICY');
7586: end;
7587:
7588: -- There should be a way to avoid hard-coding the values !!!
7581: exception
7582: when others then
7583: Wf_Core.Token('NID', to_char(p_nid));
7584: Wf_Core.Token('POLICY', l_sec_policy);
7585: Wf_Core.Raise('WFMLR_INVALID_SEC_POLICY');
7586: end;
7587:
7588: -- There should be a way to avoid hard-coding the values !!!
7589: p_email := l_email_allowed;
7603: end if;
7604:
7605: exception
7606: when others then
7607: Wf_Core.Context('Wf_Mail', 'ProcessSecurityPolicy', to_char(p_nid));
7608: raise;
7609: end ProcessSecurityPolicy;
7610:
7611: -- Set_FYI_Flag (Private)
7680: begin
7681: l_lang := upper(Wf_Notification.GetAttrText(p_nid, '#WFM_LANGUAGE'));
7682: exception
7683: when others then
7684: if (wf_core.error_name = 'WFNTF_ATTR') then
7685: wf_core.clear();
7686: l_lang := null;
7687: else
7688: raise;
7681: l_lang := upper(Wf_Notification.GetAttrText(p_nid, '#WFM_LANGUAGE'));
7682: exception
7683: when others then
7684: if (wf_core.error_name = 'WFNTF_ATTR') then
7685: wf_core.clear();
7686: l_lang := null;
7687: else
7688: raise;
7689: end if;
7737: begin
7738: l_terr := upper(Wf_Notification.GetAttrText(p_nid, '#WFM_TERRITORY'));
7739: exception
7740: when others then
7741: if (wf_core.error_name = 'WFNTF_ATTR') then
7742: wf_core.clear();
7743: l_terr := null;
7744: else
7745: raise;
7738: l_terr := upper(Wf_Notification.GetAttrText(p_nid, '#WFM_TERRITORY'));
7739: exception
7740: when others then
7741: if (wf_core.error_name = 'WFNTF_ATTR') then
7742: wf_core.clear();
7743: l_terr := null;
7744: else
7745: raise;
7746: end if;
7804: end if;
7805:
7806: exception
7807: when others then
7808: Wf_Core.Context('Wf_Mail', 'Get_Ntf_Language', to_char(p_nid), p_language, p_territory);
7809: raise;
7810: end Get_Ntf_Language;
7811:
7812:
7924: 'wf.plsql.WF_MAIL.send',
7925: 'Recipient List is empty. ');
7926: end if;
7927:
7928: wf_core.raise('WFMLR_NO_RECIPIENTS');
7929: end if;
7930:
7931: -- At least subject or body is required
7932: if (p_subject is null and (p_message is null or dbms_lob.GetLength(p_message)=0)) then
7935: 'wf.plsql.WF_MAIL.send',
7936: 'Subject and Message Contents are blank or null. ');
7937: end if;
7938:
7939: wf_core.raise('WFMLR_MSG_INCOMPLETE');
7940: end if;
7941:
7942: -- For all e-mails, respone or FYI, module name is required
7943: if (p_module is null) then
7946: 'wf.plsql.WF_MAIL.send',
7947: 'Message module is not specified. ');
7948: end if;
7949:
7950: wf_core.raise('WFMLR_NO_MODULE');
7951: end if;
7952:
7953: dbms_lob.createTemporary(l_msg_doc, TRUE, dbms_lob.call);
7954: l_str := '';
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);
8126: dbms_lob.append(dest_lob => g_LOBTable(l_messageIdx).temp_lob,
8127: src_lob => p_message);
8128:
8129: if l_idstr is not null and l_fyi_flag = false then
8130: l_idstr := wf_core.newline||l_idstr;
8131: l_idsize := length(l_idstr);
8132: dbms_lob.writeAppend(lob_loc => g_LOBTable(l_messageIdx).temp_lob,
8133: amount => l_idsize,
8134: buffer => l_idstr);
8203: wf_temp_lob.releaseLob(g_LOBTable, l_messageIdx);
8204: END if;
8205:
8206:
8207: wf_core.context('Wf_Mail', 'Send', p_idstring, p_subject);
8208: raise;
8209: end Send;
8210:
8211:
8387: WHERE NAME = 'WFNTF_CANNOT_REPLY'
8388: AND LANGUAGE = userenv('LANG');
8389: exception
8390: when NO_DATA_FOUND then
8391: wf_core.raise('WFCORE_NO_MESSAGE');
8392: end;
8393:
8394: l_nodename := wf_mailer_parameter.getvalueforcorr(
8395: l_msg_type||':'||l_msg_name,'NODENAME');
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);
8677: AND out_agent_guid
8678: IN (SELECT guid
8679: FROM wf_agents
8680: WHERE name = 'WF_NOTIFICATION_OUT'
8681: AND system_guid = hextoraw(wf_core.translate('WF_SYSTEM_GUID')))
8682: AND customization_level = 'L';
8683:
8684: -- Inform BES cache manager that BES meta-data state has changed
8685: wf_bes_cache.SetMetaDataUploaded;