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: if orig_system in ('FND_USR', 'PER') then
589: FND_PREFERENCE.put(p_user_name => tokens(tk),
610: -- Should the propagate fail, then save the
611: -- role to be used to update the ErrorStack with
612: -- the failed role and the reason.
613:
614: wf_core.get_error(err_name => errorName,
615: err_message => errMessage,
616: err_stack => errStack);
617:
618: invalidRoleList := invalidRoleList||'{'||tokens(tk)||
650: 'One or more users have been disabled. Sending a notification to SYSADMIN');
651: end if;
652: if length(errorReport) > 2000 then
653: errorReport := substrb(errorReport, 1, 1900);
654: errorReport := errorReport||wf_core.translate('WFMLR_REPORT_TRUNC');
655: end if;
656:
657: -- Note, can not call HandleSendError here since that will result
658: -- in the notification activity going into error. That is too
703: 'wf.plsql.WF_MAIL.Disable_Recipient_Ntf_Pref',
704: 'END WARNING');
705: end if;
706:
707: p_event.setErrorMessage(wf_core.translate('WFMLR_ROLE_UPDATE_FAILURE'));
708: p_event.setErrorStack(substrb(invalidRoleList, 1, 4000));
709: return 'WARNING';
710: else
711: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
717: end if;
718:
719: exception
720: when others then
721: wf_core.context('WF_MAIL','Disable_Recipient_Ntf_Pref',
722: role, pref);
723: raise;
724: end Disable_Recipient_Ntf_Pref;
725:
757:
758: return(buffer);
759: exception
760: when others then
761: wf_core.context('WF_MAIL', 'GetLovList', lk_type);
762: raise;
763: end GetLovList;
764:
765:
842: 'wf.plsql.WF_MAIL.HandleResponseError',
843: 'BEGIN');
844: end if;
845:
846: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
847: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
848: g_soOn := wf_core.translate('WFMLR_SO_ON');
849: g_none := wf_core.translate('WFMLR_NONE');
850:
843: 'BEGIN');
844: end if;
845:
846: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
847: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
848: g_soOn := wf_core.translate('WFMLR_SO_ON');
849: g_none := wf_core.translate('WFMLR_NONE');
850:
851: -- First look for a wf_core error.
844: end if;
845:
846: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
847: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
848: g_soOn := wf_core.translate('WFMLR_SO_ON');
849: g_none := wf_core.translate('WFMLR_NONE');
850:
851: -- First look for a wf_core error.
852: wf_core.get_error(errname, errmsg, errstack);
845:
846: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
847: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
848: g_soOn := wf_core.translate('WFMLR_SO_ON');
849: g_none := wf_core.translate('WFMLR_NONE');
850:
851: -- First look for a wf_core error.
852: wf_core.get_error(errname, errmsg, errstack);
853:
847: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
848: g_soOn := wf_core.translate('WFMLR_SO_ON');
849: g_none := wf_core.translate('WFMLR_NONE');
850:
851: -- First look for a wf_core error.
852: wf_core.get_error(errname, errmsg, errstack);
853:
854: -- If no wf_core error look for a sql error.
855: if (errname is null) then
848: g_soOn := wf_core.translate('WFMLR_SO_ON');
849: g_none := wf_core.translate('WFMLR_NONE');
850:
851: -- First look for a wf_core error.
852: wf_core.get_error(errname, errmsg, errstack);
853:
854: -- If no wf_core error look for a sql error.
855: if (errname is null) then
856: errmsg := sqlerrm;
850:
851: -- First look for a wf_core error.
852: wf_core.get_error(errname, errmsg, errstack);
853:
854: -- If no wf_core error look for a sql error.
855: if (errname is null) then
856: errmsg := sqlerrm;
857: end if;
858:
877: exception
878: when no_program_unit then
879: raise;
880: when others then
881: if (wf_core.error_name = 'WFNTF_ATTR') then
882: Wf_Core.Clear;
883: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_NAME');
884: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_NAME', errname);
885: end if;
878: when no_program_unit then
879: raise;
880: when others then
881: if (wf_core.error_name = 'WFNTF_ATTR') then
882: Wf_Core.Clear;
883: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_NAME');
884: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_NAME', errname);
885: end if;
886: end;
892: exception
893: when no_program_unit then
894: raise;
895: when others then
896: if (wf_core.error_name = 'WFNTF_ATTR') then
897: Wf_Core.Clear;
898: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_MESSAGE');
899: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_MESSAGE', errmsg);
900: end if;
893: when no_program_unit then
894: raise;
895: when others then
896: if (wf_core.error_name = 'WFNTF_ATTR') then
897: Wf_Core.Clear;
898: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_MESSAGE');
899: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_MESSAGE', errmsg);
900: end if;
901: end;
906: exception
907: when no_program_unit then
908: raise;
909: when others then
910: if (wf_core.error_name = 'WFNTF_ATTR') then
911: Wf_Core.Clear;
912: Wf_Notification.AddAttr(nid, 'MAIL_VALUE_FOUND');
913: Wf_Notification.SetAttrText(nid, 'MAIL_VALUE_FOUND', value_found);
914: end if;
907: when no_program_unit then
908: raise;
909: when others then
910: if (wf_core.error_name = 'WFNTF_ATTR') then
911: Wf_Core.Clear;
912: Wf_Notification.AddAttr(nid, 'MAIL_VALUE_FOUND');
913: Wf_Notification.SetAttrText(nid, 'MAIL_VALUE_FOUND', value_found);
914: end if;
915: end;
920: exception
921: when no_program_unit then
922: raise;
923: when others then
924: if (wf_core.error_name = 'WFNTF_ATTR') then
925: Wf_Core.Clear;
926: Wf_Notification.AddAttr(nid, 'MAIL_EXP_VALUES');
927: Wf_Notification.SetAttrText(nid, 'MAIL_EXP_VALUES', remarks);
928: end if;
921: when no_program_unit then
922: raise;
923: when others then
924: if (wf_core.error_name = 'WFNTF_ATTR') then
925: Wf_Core.Clear;
926: Wf_Notification.AddAttr(nid, 'MAIL_EXP_VALUES');
927: Wf_Notification.SetAttrText(nid, 'MAIL_EXP_VALUES', remarks);
928: end if;
929: end;
940: exception
941: when no_program_unit then
942: raise;
943: when others then
944: if (wf_core.error_name = 'WFNTF_ATTR') then
945: Wf_Core.Clear;
946: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_STACK');
947: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_STACK', errstack);
948: end if;
941: when no_program_unit then
942: raise;
943: when others then
944: if (wf_core.error_name = 'WFNTF_ATTR') then
945: Wf_Core.Clear;
946: Wf_Notification.AddAttr(nid, 'MAIL_ERROR_STACK');
947: Wf_Notification.SetAttrText(nid, 'MAIL_ERROR_STACK', errstack);
948: end if;
949: end;
982: 'wf.plsql.WF_MAIL.HandleResponseError',
983: 'Error Msg '|| sqlerrm);
984: end if;
985:
986: wf_core.context('WF_MAIL', 'HandleResponseError', nid);
987: raise;
988: end HandleResponseError;
989:
990:
1066:
1067: return(buf);
1068: exception
1069: when others then
1070: wf_core.context('WF_MAIL', 'WordWrap', text, to_char(indent));
1071: raise;
1072: end WordWrap;
1073:
1074:
1096: from WF_LOOKUPS
1097: where LOOKUP_TYPE = lk_type and LOOKUP_CODE = lk_code;
1098: exception
1099: when no_data_found then
1100: wf_core.token('TYPE', lk_type);
1101: wf_core.token('CODE', lk_code);
1102: wf_core.raise('WFSQL_LOOKUP_CODE');
1103: end;
1104:
1097: where LOOKUP_TYPE = lk_type and LOOKUP_CODE = lk_code;
1098: exception
1099: when no_data_found then
1100: wf_core.token('TYPE', lk_type);
1101: wf_core.token('CODE', lk_code);
1102: wf_core.raise('WFSQL_LOOKUP_CODE');
1103: end;
1104:
1105: return(buf);
1098: exception
1099: when no_data_found then
1100: wf_core.token('TYPE', lk_type);
1101: wf_core.token('CODE', lk_code);
1102: wf_core.raise('WFSQL_LOOKUP_CODE');
1103: end;
1104:
1105: return(buf);
1106: exception
1104:
1105: return(buf);
1106: exception
1107: when others then
1108: wf_core.context('WF_MAIL', 'GetLovMeaning', lk_type, lk_code);
1109: raise;
1110: end GetLovMeaning;
1111:
1112:
1124: buf varchar2(30);
1125: begin
1126: -- Allow null values
1127: if (lk_meaning is null) then
1128: wf_core.raise('WFMLR_INVALID_LOOKUP');
1129: end if;
1130:
1131: -- Exact match
1132: begin
1150: where LOOKUP_TYPE = lk_type
1151: and upper(MEANING) = upper(lk_meaning);
1152: exception
1153: when no_data_found then
1154: wf_core.raise('WFMLR_INVALID_LOOKUP');
1155: end;
1156:
1157: return buf;
1158: exception
1156:
1157: return buf;
1158: exception
1159: when others then
1160: wf_core.context('WF_MAIL', 'GetLovCode', lk_type, lk_meaning);
1161: raise;
1162: end GetLovCode;
1163:
1164:
1196:
1197: return(buffer);
1198: exception
1199: when others then
1200: wf_core.context('WF_MAIL', 'GetLovListInternal', lk_type);
1201: raise;
1202: end GetLovListInternal;
1203:
1204: -- GetDirectAnswer (PRIVATE)
1259: one_answer := answer;
1260:
1261: exception
1262: when answer_syntax_error then
1263: wf_core.context('WF_MAIL', 'GetDirectAnswer');
1264: raise;
1265: when others then
1266: wf_core.context('WF_MAIL', 'GetDirectAnswer');
1267: raise;
1262: when answer_syntax_error then
1263: wf_core.context('WF_MAIL', 'GetDirectAnswer');
1264: raise;
1265: when others then
1266: wf_core.context('WF_MAIL', 'GetDirectAnswer');
1267: raise;
1268: end GetDirectAnswer;
1269:
1270:
1333: return buffer;
1334:
1335: exception
1336: when others then
1337: wf_core.context('WF_MAIL', 'GetEmailResponse', to_char(nid));
1338: raise;
1339: end GetEmailResponse;
1340:
1341:
1379:
1380: -- for each response variable
1381: for rec in c1 loop
1382: -- Construct response instruction:
1383: wf_core.token('DISPLAY_NAME', rec.display_name);
1384: wf_core.token('SEQ', seq);
1385: wf_core.token('DESCRIPTION', rec.description);
1386:
1387: -- Enter the
1380: -- for each response variable
1381: for rec in c1 loop
1382: -- Construct response instruction:
1383: wf_core.token('DISPLAY_NAME', rec.display_name);
1384: wf_core.token('SEQ', seq);
1385: wf_core.token('DESCRIPTION', rec.description);
1386:
1387: -- Enter the
1388: buffer := buffer||
1381: for rec in c1 loop
1382: -- Construct response instruction:
1383: wf_core.token('DISPLAY_NAME', rec.display_name);
1384: wf_core.token('SEQ', seq);
1385: wf_core.token('DESCRIPTION', rec.description);
1386:
1387: -- Enter the
1388: buffer := buffer||
1389: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_ENTER');
1385: wf_core.token('DESCRIPTION', rec.description);
1386:
1387: -- Enter the
1388: buffer := buffer||
1389: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_ENTER');
1390:
1391: if (rec.value is not null) then
1392: if (rec.type = 'LOOKUP') then
1393: wf_core.token('DEFAULT_VALUE',GetLovMeaning(rec.format,rec.value));
1389: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_ENTER');
1390:
1391: if (rec.value is not null) then
1392: if (rec.type = 'LOOKUP') then
1393: wf_core.token('DEFAULT_VALUE',GetLovMeaning(rec.format,rec.value));
1394: else
1395: wf_core.token('DEFAULT_VALUE', rec.value);
1396: end if;
1397: end if;
1391: if (rec.value is not null) then
1392: if (rec.type = 'LOOKUP') then
1393: wf_core.token('DEFAULT_VALUE',GetLovMeaning(rec.format,rec.value));
1394: else
1395: wf_core.token('DEFAULT_VALUE', rec.value);
1396: end if;
1397: end if;
1398: if (rec.format is not null) then
1399: wf_core.token('FORMAT', rec.format);
1395: wf_core.token('DEFAULT_VALUE', rec.value);
1396: end if;
1397: end if;
1398: if (rec.format is not null) then
1399: wf_core.token('FORMAT', rec.format);
1400: elsif (rec.type = 'VARCHAR2') then
1401: wf_core.token('FORMAT', '2000');
1402: end if;
1403:
1397: end if;
1398: if (rec.format is not null) then
1399: wf_core.token('FORMAT', rec.format);
1400: elsif (rec.type = 'VARCHAR2') then
1401: wf_core.token('FORMAT', '2000');
1402: end if;
1403:
1404: buffer := buffer||g_newLine;
1405:
1406: -- Handle LOOKUP specially because of printing the LOV list
1407: if (rec.type = 'LOOKUP') then
1408: if (rec.value is not null) then
1409: buffer := buffer||
1410: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_LOOKUP_DEFAULT');
1411: else
1412: buffer := buffer||
1413: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_LOOKUP');
1414: end if;
1409: buffer := buffer||
1410: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_LOOKUP_DEFAULT');
1411: else
1412: buffer := buffer||
1413: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_LOOKUP');
1414: end if;
1415: buffer := WordWrap(buffer, 0);
1416: buffer := buffer || g_newLine || GetLovList(rec.format);
1417: else
1420: if (rec.type = 'DATE') then
1421: -- DATE: show date format
1422: if (rec.format is not null) then
1423: Buffer := buffer ||
1424: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DATE_FORMAT');
1425: else
1426: buffer := buffer ||
1427: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DATE');
1428: end if;
1423: Buffer := buffer ||
1424: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DATE_FORMAT');
1425: else
1426: buffer := buffer ||
1427: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DATE');
1428: end if;
1429: elsif (rec.type = 'NUMBER') then
1430: -- NUMBER: show number format
1431: if (rec.format is not null) then
1429: elsif (rec.type = 'NUMBER') then
1430: -- NUMBER: show number format
1431: if (rec.format is not null) then
1432: buffer := buffer ||
1433: wf_core.substitute('WFMLR','WFMLR_DIRECT_NUMBER_FORMAT');
1434: else
1435: buffer := buffer||
1436: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_NUMBER');
1437: end if;
1432: buffer := buffer ||
1433: wf_core.substitute('WFMLR','WFMLR_DIRECT_NUMBER_FORMAT');
1434: else
1435: buffer := buffer||
1436: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_NUMBER');
1437: end if;
1438:
1439: elsif (rec.type = 'VARCHAR2') then
1440: -- VARCHAR2: show varchar2 format
1438:
1439: elsif (rec.type = 'VARCHAR2') then
1440: -- VARCHAR2: show varchar2 format
1441: buffer := buffer||
1442: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_VARCHAR2_FORMAT');
1443: end if;
1444:
1445: if ((rec.value is not null) and (rec.type <> 'LOOKUP')) then
1446: wf_core.token('DEFAULT_VALUE', rec.value);
1442: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_VARCHAR2_FORMAT');
1443: end if;
1444:
1445: if ((rec.value is not null) and (rec.type <> 'LOOKUP')) then
1446: wf_core.token('DEFAULT_VALUE', rec.value);
1447: buffer := buffer||g_newLine||
1448: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DEFAULT');
1449: end if;
1450:
1444:
1445: if ((rec.value is not null) and (rec.type <> 'LOOKUP')) then
1446: wf_core.token('DEFAULT_VALUE', rec.value);
1447: buffer := buffer||g_newLine||
1448: wf_core.substitute('WFMLR', 'WFMLR_DIRECT_DEFAULT');
1449: end if;
1450:
1451: buffer := WordWrap(buffer, 0);
1452:
1459: return buffer;
1460:
1461: exception
1462: when others then
1463: wf_core.context('WF_MAIL', 'GetEmailDirectResponse', to_char(nid));
1464: raise;
1465: end GetEmailDirectResponse;
1466:
1467:
1605: end loop;
1606: return buffer;
1607: exception
1608: when others then
1609: WF_CORE.Context('WF_MAIL','GetMoreInfoLOV', to_char(nid));
1610: raise;
1611: end GetMoreInfoLOV;
1612:
1613: --
1739: end if;
1740: return buffer;
1741: exception
1742: when others then
1743: wf_core.context('Wf_Mail', 'GetMoreInfoMailTo', to_char(nid));
1744: raise;
1745: end GetMoreInfoMailTo;
1746:
1747:
1823: return buffer;
1824:
1825: exception
1826: when others then
1827: wf_core.context('WF_MAIL', 'GetMailToBody', to_char(nid));
1828: raise;
1829: end GetMailToBody;
1830:
1831: -- GetMailToBody (PRIVATE) - Construct the mailto body part.
1934:
1935: exception
1936: when others then
1937: -- wf_temp_lob.releaseLob(g_LOBTable, bufferIdx);
1938: wf_core.context('WF_MAIL', 'GetMailToBody', to_char(nid));
1939: raise;
1940: end GetMailToBody;
1941:
1942: -- GetMailTo - Construct MailTo Section (PRIVATE)
2105: return(buffer);
2106:
2107: exception
2108: when others then
2109: wf_core.context('WF_MAIL', 'GetMailTo', nid);
2110: raise;
2111:
2112: end GetMailTo;
2113:
2154: n_end_date_text := wf_notification_util.GetCalendarDate(n_nid, n_end_date, null, true);
2155:
2156: if (n_priority > 66) then
2157: --Bug 2774891 fix - sacsharm
2158: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2159: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2160: elsif (n_priority > 33) then
2161: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2162: else
2155:
2156: if (n_priority > 66) then
2157: --Bug 2774891 fix - sacsharm
2158: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2159: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2160: elsif (n_priority > 33) then
2161: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2162: else
2163: --Bug 2774891 fix - sacsharm
2157: --Bug 2774891 fix - sacsharm
2158: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2159: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2160: elsif (n_priority > 33) then
2161: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2162: else
2163: --Bug 2774891 fix - sacsharm
2164: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2165: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2160: elsif (n_priority > 33) then
2161: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2162: else
2163: --Bug 2774891 fix - sacsharm
2164: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2165: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2166: end if;
2167:
2168: stxt := substrb(txt, 1, 32000);
2161: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
2162: else
2163: --Bug 2774891 fix - sacsharm
2164: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
2165: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
2166: end if;
2167:
2168: stxt := substrb(txt, 1, 32000);
2169: stxt := substrb(replace(stxt, '&'||'NOTIFICATION_ID', to_char(n_nid)), 1,
2245: where NAME = messageName
2246: and TYPE = itemType;
2247: exception
2248: when no_data_found then
2249: wf_core.token('NAME', messageName);
2250: wf_core.token('TYPE', itemType);
2251: wf_core.raise('WFNTF_MESSAGE');
2252: end;
2253:
2246: and TYPE = itemType;
2247: exception
2248: when no_data_found then
2249: wf_core.token('NAME', messageName);
2250: wf_core.token('TYPE', itemType);
2251: wf_core.raise('WFNTF_MESSAGE');
2252: end;
2253:
2254: -- Substitute USER_NAME with role display name
2247: exception
2248: when no_data_found then
2249: wf_core.token('NAME', messageName);
2250: wf_core.token('TYPE', itemType);
2251: wf_core.raise('WFNTF_MESSAGE');
2252: end;
2253:
2254: -- Substitute USER_NAME with role display name
2255: t_text_body := substrb(replace(t_text_body, '&'||'UFROM', ufrom), 1, 32000);
2270: html_body_text := t_html_body;
2271:
2272: exception
2273: when others then
2274: wf_core.context('WF_MAIL', 'GetWarning', ufrom, usubject, ubody);
2275: raise;
2276: end GetWarning;
2277:
2278:
2396: where NAME = t_name
2397: and TYPE = t_type;
2398: exception
2399: when NO_DATA_FOUND then
2400: wf_core.context('WF_MAIL','getTemplateName',
2401: 'nid => '||to_char(nid),
2402: 'n_status => '||n_status,
2403: 'n_mstatus => '||n_mStatus,
2404: 't_type => '||t_type,
2402: 'n_status => '||n_status,
2403: 'n_mstatus => '||n_mStatus,
2404: 't_type => '||t_type,
2405: 't_name => '||t_name);
2406: wf_core.token('TYPE', t_type);
2407: wf_core.token('NAME', t_name);
2408: wf_core.raise('WFMLR_NOTEMPLATE');
2409: end;
2410: end if;
2403: 'n_mstatus => '||n_mStatus,
2404: 't_type => '||t_type,
2405: 't_name => '||t_name);
2406: wf_core.token('TYPE', t_type);
2407: wf_core.token('NAME', t_name);
2408: wf_core.raise('WFMLR_NOTEMPLATE');
2409: end;
2410: end if;
2411:
2404: 't_type => '||t_type,
2405: 't_name => '||t_name);
2406: wf_core.token('TYPE', t_type);
2407: wf_core.token('NAME', t_name);
2408: wf_core.raise('WFMLR_NOTEMPLATE');
2409: end;
2410: end if;
2411:
2412: exception
2410: end if;
2411:
2412: exception
2413: when others then
2414: WF_CORE.Context('WF_MAIL','getTemplateName',to_char(nid), n_status,
2415: n_mstatus, t_type, t_name);
2416: raise;
2417: end getTemplateName;
2418:
2489: t_name := n_status;
2490: end if;
2491: n_nid_str := 'NID ' || to_char(nid);
2492: else
2493: wf_core.token('NID', to_char(nid));
2494: wf_core.token('POLICY', n_sig_policy);
2495: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
2496: end if;
2497:
2490: end if;
2491: n_nid_str := 'NID ' || to_char(nid);
2492: else
2493: wf_core.token('NID', to_char(nid));
2494: wf_core.token('POLICY', n_sig_policy);
2495: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
2496: end if;
2497:
2498: exception
2491: n_nid_str := 'NID ' || to_char(nid);
2492: else
2493: wf_core.token('NID', to_char(nid));
2494: wf_core.token('POLICY', n_sig_policy);
2495: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
2496: end if;
2497:
2498: exception
2499: when others then
2496: end if;
2497:
2498: exception
2499: when others then
2500: wf_core.context('WF_MAIL', 'ProcessSignaturePolicy', to_char(nid));
2501: raise;
2502: end ProcessSignaturePolicy;
2503:
2504: -- Returns TRUE if the language is Bi directional
2572: FROM wf_notifications
2573: WHERE notification_id = nid;
2574: exception
2575: when no_data_found then
2576: wf_core.token('NID', to_char(nid));
2577: wf_core.raise('WFNTF_NID');
2578: end;
2579:
2580: -- Cache the values of the product notification headers.
2573: WHERE notification_id = nid;
2574: exception
2575: when no_data_found then
2576: wf_core.token('NID', to_char(nid));
2577: wf_core.raise('WFNTF_NID');
2578: end;
2579:
2580: -- Cache the values of the product notification headers.
2581: attrList := '';
2652: document_type := display_type;
2653:
2654: exception
2655: when others then
2656: wf_core.context('WF_MAIL','GetHeaderTable',document_id, display_type);
2657: raise;
2658: end GetHeaderTable;
2659:
2660:
2765: from WF_NOTIFICATIONS
2766: where NOTIFICATION_ID = nid;
2767: exception
2768: when no_data_found then
2769: wf_core.token('NID', to_char(nid));
2770: wf_core.raise('WFNTF_NID');
2771: end;
2772:
2773: -- More information processing - bug 2282139
2766: where NOTIFICATION_ID = nid;
2767: exception
2768: when no_data_found then
2769: wf_core.token('NID', to_char(nid));
2770: wf_core.raise('WFNTF_NID');
2771: end;
2772:
2773: -- More information processing - bug 2282139
2774: g_moreinfo := NULL;
2965: from WF_MESSAGES_VL
2966: where NAME = t_name and TYPE = t_type;
2967: exception
2968: when no_data_found then
2969: wf_core.token('NAME', t_name);
2970: wf_core.token('TYPE', t_type);
2971: wf_core.raise('WFNTF_MESSAGE');
2972: end;
2973:
2966: where NAME = t_name and TYPE = t_type;
2967: exception
2968: when no_data_found then
2969: wf_core.token('NAME', t_name);
2970: wf_core.token('TYPE', t_type);
2971: wf_core.raise('WFNTF_MESSAGE');
2972: end;
2973:
2974: -- Get Click here Response display value
2967: exception
2968: when no_data_found then
2969: wf_core.token('NAME', t_name);
2970: wf_core.token('TYPE', t_type);
2971: wf_core.raise('WFNTF_MESSAGE');
2972: end;
2973:
2974: -- Get Click here Response display value
2975: begin
3217: body_atth := m_html;
3218:
3219: exception
3220: when no_program_unit then
3221: wf_core.context('WF_MAIL', 'GetMessage', to_char(nid), node);
3222: raise;
3223: when others then
3224: -- First look for a wf_core error.
3225: wf_core.get_error(err_name, err_message, err_stack);
3220: when no_program_unit then
3221: wf_core.context('WF_MAIL', 'GetMessage', to_char(nid), node);
3222: raise;
3223: when others then
3224: -- First look for a wf_core error.
3225: wf_core.get_error(err_name, err_message, err_stack);
3226:
3227: -- If no wf_core error look for a sql error.
3228: if (err_name is null) then
3221: wf_core.context('WF_MAIL', 'GetMessage', to_char(nid), node);
3222: raise;
3223: when others then
3224: -- First look for a wf_core error.
3225: wf_core.get_error(err_name, err_message, err_stack);
3226:
3227: -- If no wf_core error look for a sql error.
3228: if (err_name is null) then
3229: err_message := sqlerrm;
3223: when others then
3224: -- First look for a wf_core error.
3225: wf_core.get_error(err_name, err_message, err_stack);
3226:
3227: -- If no wf_core error look for a sql error.
3228: if (err_name is null) then
3229: err_message := sqlerrm;
3230: end if;
3231:
3229: err_message := sqlerrm;
3230: end if;
3231:
3232: error_result := err_message||g_newLine||err_stack;
3233: wf_core.context('WF_MAIL', 'GetMessage', to_char(nid), node, error_result);
3234:
3235: end GetMessage;
3236:
3237: -- LOBReplace
3357:
3358: exception
3359: when others then
3360: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3361: WF_CORE.Context('WF_MAIL','LOBReplace',token,
3362: tokenValue);
3363: raise;
3364:
3365: end LOBReplace;
3468:
3469: exception
3470: when others then
3471: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3472: WF_CORE.Context('WF_MAIL','LOBReplace',token, 'LOB');
3473: raise;
3474:
3475: end LOBReplace;
3476:
3551: n_end_date_text := wf_notification_util.GetCalendarDate(n_nid, n_end_date, null, true);
3552:
3553: if (n_priority > 66) then
3554: --Bug 2774891 fix - sacsharm
3555: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3556: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3557: elsif (n_priority > 33) then
3558: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3559: else
3552:
3553: if (n_priority > 66) then
3554: --Bug 2774891 fix - sacsharm
3555: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3556: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3557: elsif (n_priority > 33) then
3558: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3559: else
3560: --Bug 2774891 fix - sacsharm
3554: --Bug 2774891 fix - sacsharm
3555: --n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3556: n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3557: elsif (n_priority > 33) then
3558: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3559: else
3560: --Bug 2774891 fix - sacsharm
3561: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3562: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3557: elsif (n_priority > 33) then
3558: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3559: else
3560: --Bug 2774891 fix - sacsharm
3561: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3562: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3563: end if;
3564:
3565: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.SESSION);
3558: n_priority_text := wf_core.substitute('WFTKN', 'NORMAL');
3559: else
3560: --Bug 2774891 fix - sacsharm
3561: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3562: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3563: end if;
3564:
3565: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.SESSION);
3566: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);
3831:
3832: exception
3833: when others then
3834: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3835: WF_CORE.Context('WF_MAIL','LOBSubstitute',tokenName,
3836: to_char(msgLen)||':'||to_char(pos)||':'||to_char(tempPos));
3837: raise;
3838: end LOBSubstitute;
3839:
4188: if(l_amount > l_lineSize) then
4189: dbms_lob.read(lob_loc => message, amount => l_lineSize,
4190: offset => l_offSet, buffer => l_strBuffer);
4191:
4192: l_lastCR := instr(l_strBuffer, wf_core.newline, -1);
4193: l_lastWS := instr(l_strBuffer, ' ', -1);
4194:
4195: if(l_lastCR > 1) then
4196: l_bufferSize := l_lastCR;
4205: l_offset := l_offset + l_bufferSize;
4206:
4207: if (l_forcedBreak) then
4208: l_strBuffer := substr(l_strBuffer, 1, l_bufferSize - 1)||
4209: wf_core.newline;
4210: -- Recalculate the buffer size incase newline is not the
4211: -- same size as the space that was removed
4212: l_bufferSize := length(l_strBuffer);
4213: end if;
4239: end if;
4240:
4241: -- exception
4242: -- when others then
4243: -- wf_core.context('WF_MAIL', 'LOBLineBreak', to_char(textWidth));
4244: -- raise;
4245: end LOBLineBreak;
4246:
4247:
4437:
4438: exception
4439: when others then
4440: wf_temp_lob.releaseLob(g_LOBTable, bufferIdx);
4441: wf_core.context('WF_MAIL', 'GetMailTo', nid);
4442: raise;
4443:
4444: end GetMailTo;
4445:
4674: end if;
4675:
4676: exception
4677: when others then
4678: WF_CORE.Context('WF_MAIL','SetContext',to_char(nid));
4679: raise;
4680: end setContext;
4681:
4682: -- Get_Last_Question (Private)
4935: end if;
4936:
4937: -- 3532615 Moved these from being initialized at the session level
4938: -- back to the notification level.
4939: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
4940: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
4941: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
4942: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
4943: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
4936:
4937: -- 3532615 Moved these from being initialized at the session level
4938: -- back to the notification level.
4939: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
4940: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
4941: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
4942: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
4943: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
4944: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
4937: -- 3532615 Moved these from being initialized at the session level
4938: -- back to the notification level.
4939: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
4940: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
4941: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
4942: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
4943: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
4944: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
4945: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
4938: -- back to the notification level.
4939: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
4940: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
4941: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
4942: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
4943: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
4944: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
4945: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
4946: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
4939: g_ntfHistory := wf_core.translate('WFNTF_HISTORY');
4940: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
4941: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
4942: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
4943: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
4944: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
4945: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
4946: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
4947: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
4940: g_ntfActionHistory := wf_core.translate('WFNTF_ACTION_HISTORY');
4941: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
4942: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
4943: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
4944: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
4945: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
4946: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
4947: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
4948: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
4941: g_moreInfoAPrompt := wf_core.translate('WFNTF_MOREINFO_APROMPT');
4942: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
4943: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
4944: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
4945: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
4946: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
4947: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
4948: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
4949: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
4942: g_moreInfoAnswer := wf_core.translate('WFNTF_MOREINFO_ANSWER');
4943: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
4944: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
4945: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
4946: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
4947: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
4948: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
4949: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
4950: g_wfmonId := wf_core.translate('WFMON_ID');
4943: g_moreInfoQPrompt := wf_core.translate('WFNTF_MOREINFO_QPROMPT');
4944: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
4945: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
4946: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
4947: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
4948: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
4949: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
4950: g_wfmonId := wf_core.translate('WFMON_ID');
4951: g_to := wf_core.translate('TO');
4944: g_moreInfoSubject := wf_core.translate('WFNTF_MOREINFO');
4945: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
4946: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
4947: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
4948: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
4949: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
4950: g_wfmonId := wf_core.translate('WFMON_ID');
4951: g_to := wf_core.translate('TO');
4952: g_from := wf_core.translate('FROM');
4945: g_moreInfoSubmit := wf_core.translate('WFNTF_MOREINFO_SUBMIT');
4946: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
4947: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
4948: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
4949: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
4950: g_wfmonId := wf_core.translate('WFMON_ID');
4951: g_to := wf_core.translate('TO');
4952: g_from := wf_core.translate('FROM');
4953:
4946: g_moreInfoQuestion := wf_core.translate('WFNTF_MOREINFO_QUESTION');
4947: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
4948: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
4949: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
4950: g_wfmonId := wf_core.translate('WFMON_ID');
4951: g_to := wf_core.translate('TO');
4952: g_from := wf_core.translate('FROM');
4953:
4954: g_beginDate := wf_core.translate('BEGIN_DATE');
4947: g_moreInfoFrom := wf_core.translate('WFNTF_MOREINFO_FROM');
4948: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
4949: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
4950: g_wfmonId := wf_core.translate('WFMON_ID');
4951: g_to := wf_core.translate('TO');
4952: g_from := wf_core.translate('FROM');
4953:
4954: g_beginDate := wf_core.translate('BEGIN_DATE');
4955: g_dueDate2 := wf_core.translate('DUE_DATE');
4948: g_moreInfoRequested := wf_core.translate('WFNTF_MOREINFO_REQUESTED');
4949: g_moreInfoRequestee := wf_core.translate('WFNTF_MOREINFO_REQUESTEE');
4950: g_wfmonId := wf_core.translate('WFMON_ID');
4951: g_to := wf_core.translate('TO');
4952: g_from := wf_core.translate('FROM');
4953:
4954: g_beginDate := wf_core.translate('BEGIN_DATE');
4955: g_dueDate2 := wf_core.translate('DUE_DATE');
4956: g_notificationId := wf_core.translate('NOTIFICATION_ID');
4950: g_wfmonId := wf_core.translate('WFMON_ID');
4951: g_to := wf_core.translate('TO');
4952: g_from := wf_core.translate('FROM');
4953:
4954: g_beginDate := wf_core.translate('BEGIN_DATE');
4955: g_dueDate2 := wf_core.translate('DUE_DATE');
4956: g_notificationId := wf_core.translate('NOTIFICATION_ID');
4957: g_priority := wf_core.translate('PRIORITY');
4958:
4951: g_to := wf_core.translate('TO');
4952: g_from := wf_core.translate('FROM');
4953:
4954: g_beginDate := wf_core.translate('BEGIN_DATE');
4955: g_dueDate2 := wf_core.translate('DUE_DATE');
4956: g_notificationId := wf_core.translate('NOTIFICATION_ID');
4957: g_priority := wf_core.translate('PRIORITY');
4958:
4959: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
4952: g_from := wf_core.translate('FROM');
4953:
4954: g_beginDate := wf_core.translate('BEGIN_DATE');
4955: g_dueDate2 := wf_core.translate('DUE_DATE');
4956: g_notificationId := wf_core.translate('NOTIFICATION_ID');
4957: g_priority := wf_core.translate('PRIORITY');
4958:
4959: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
4960:
4953:
4954: g_beginDate := wf_core.translate('BEGIN_DATE');
4955: g_dueDate2 := wf_core.translate('DUE_DATE');
4956: g_notificationId := wf_core.translate('NOTIFICATION_ID');
4957: g_priority := wf_core.translate('PRIORITY');
4958:
4959: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
4960:
4961: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
4955: g_dueDate2 := wf_core.translate('DUE_DATE');
4956: g_notificationId := wf_core.translate('NOTIFICATION_ID');
4957: g_priority := wf_core.translate('PRIORITY');
4958:
4959: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
4960:
4961: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
4962: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
4963: g_soOn := wf_core.translate('WFMLR_SO_ON');
4957: g_priority := wf_core.translate('PRIORITY');
4958:
4959: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
4960:
4961: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
4962: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
4963: g_soOn := wf_core.translate('WFMLR_SO_ON');
4964: g_none := wf_core.translate('WFMLR_NONE');
4965: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
4958:
4959: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
4960:
4961: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
4962: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
4963: g_soOn := wf_core.translate('WFMLR_SO_ON');
4964: g_none := wf_core.translate('WFMLR_NONE');
4965: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
4966: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
4959: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
4960:
4961: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
4962: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
4963: g_soOn := wf_core.translate('WFMLR_SO_ON');
4964: g_none := wf_core.translate('WFMLR_NONE');
4965: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
4966: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
4967: g_Id := wf_core.translate('ID');
4960:
4961: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
4962: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
4963: g_soOn := wf_core.translate('WFMLR_SO_ON');
4964: g_none := wf_core.translate('WFMLR_NONE');
4965: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
4966: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
4967: g_Id := wf_core.translate('ID');
4968:
4961: g_invalidRemarks := wf_core.translate('WFMLR_INVALID_REMARKS');
4962: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
4963: g_soOn := wf_core.translate('WFMLR_SO_ON');
4964: g_none := wf_core.translate('WFMLR_NONE');
4965: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
4966: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
4967: g_Id := wf_core.translate('ID');
4968:
4969: step := 'Getting notification information';
4962: g_forExample := wf_core.translate('WFMLR_FOR_EXAMPLE');
4963: g_soOn := wf_core.translate('WFMLR_SO_ON');
4964: g_none := wf_core.translate('WFMLR_NONE');
4965: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
4966: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
4967: g_Id := wf_core.translate('ID');
4968:
4969: step := 'Getting notification information';
4970: -- Get notification information
4963: g_soOn := wf_core.translate('WFMLR_SO_ON');
4964: g_none := wf_core.translate('WFMLR_NONE');
4965: g_truncate := wf_core.translate('WFNTF_TRUNCATE');
4966: g_noResult := wf_core.translate('WFNTF_NO_RESULT');
4967: g_Id := wf_core.translate('ID');
4968:
4969: step := 'Getting notification information';
4970: -- Get notification information
4971: begin
4980: from WF_NOTIFICATIONS
4981: where NOTIFICATION_ID = nid;
4982: exception
4983: when no_data_found then
4984: wf_core.token('NID', to_char(nid));
4985: wf_core.raise('WFNTF_NID');
4986: end;
4987:
4988:
4981: where NOTIFICATION_ID = nid;
4982: exception
4983: when no_data_found then
4984: wf_core.token('NID', to_char(nid));
4985: wf_core.raise('WFNTF_NID');
4986: end;
4987:
4988:
4989: n_to_role := recipient;
5052: from WF_MESSAGES_VL
5053: where NAME = t_name and TYPE = t_type;
5054: exception
5055: when no_data_found then
5056: wf_core.token('NAME', t_name);
5057: wf_core.token('TYPE', t_type);
5058: wf_core.raise('WFNTF_MESSAGE');
5059: end;
5060:
5053: where NAME = t_name and TYPE = t_type;
5054: exception
5055: when no_data_found then
5056: wf_core.token('NAME', t_name);
5057: wf_core.token('TYPE', t_type);
5058: wf_core.raise('WFNTF_MESSAGE');
5059: end;
5060:
5061: g_isFwkNtf := true;
5054: exception
5055: when no_data_found then
5056: wf_core.token('NAME', t_name);
5057: wf_core.token('TYPE', t_type);
5058: wf_core.raise('WFNTF_MESSAGE');
5059: end;
5060:
5061: g_isFwkNtf := true;
5062: if (t_name in ('VIEW_FROMUI', 'VIEW_FROMUI_FYI')) then
5108: end loop;
5109: exception
5110: when others then
5111:
5112: wf_core.context('WF_MAIL','GetLOBMessage3',
5113: 'nid => '||to_char(nid),
5114: 'r_ntf_pref => '||r_ntf_pref);
5115: wf_core.token('ERROR',sqlerrm);
5116: wf_core.raise('WFMLR_NTFERR');
5111:
5112: wf_core.context('WF_MAIL','GetLOBMessage3',
5113: 'nid => '||to_char(nid),
5114: 'r_ntf_pref => '||r_ntf_pref);
5115: wf_core.token('ERROR',sqlerrm);
5116: wf_core.raise('WFMLR_NTFERR');
5117: end;
5118: -- Get the table of header attributes. Use a PL/SQL document
5119: -- API format.
5112: wf_core.context('WF_MAIL','GetLOBMessage3',
5113: 'nid => '||to_char(nid),
5114: 'r_ntf_pref => '||r_ntf_pref);
5115: wf_core.token('ERROR',sqlerrm);
5116: wf_core.raise('WFMLR_NTFERR');
5117: end;
5118: -- Get the table of header attributes. Use a PL/SQL document
5119: -- API format.
5120: end if; -- RENDERBODY
5142: end if;
5143: end loop;
5144: exception
5145: when others then
5146: wf_core.context('WF_MAIL','GetLOBMessage3',
5147: 'nid => '||to_char(nid),
5148: 'r_ntf_pref => '||r_ntf_pref);
5149: wf_core.token('ERROR',sqlerrm);
5150: wf_core.raise('WFMLR_NTFERR');
5145: when others then
5146: wf_core.context('WF_MAIL','GetLOBMessage3',
5147: 'nid => '||to_char(nid),
5148: 'r_ntf_pref => '||r_ntf_pref);
5149: wf_core.token('ERROR',sqlerrm);
5150: wf_core.raise('WFMLR_NTFERR');
5151: end;
5152:
5153: end if; -- RENDERBODY
5146: wf_core.context('WF_MAIL','GetLOBMessage3',
5147: 'nid => '||to_char(nid),
5148: 'r_ntf_pref => '||r_ntf_pref);
5149: wf_core.token('ERROR',sqlerrm);
5150: wf_core.raise('WFMLR_NTFERR');
5151: end;
5152:
5153: end if; -- RENDERBODY
5154: if (t_hdrRequired = TRUE) then
5399: end if;
5400:
5401: exception
5402: when no_program_unit then
5403: wf_core.context('WF_MAIL', 'GetLOBMessage3', to_char(nid), node,
5404: 'step -> '||step);
5405:
5406: if(g_html_messageIdx IS NOT NULL AND g_html_messageIdx > 0 ) then
5407: wf_temp_lob.releaseLob(g_LOBTable, g_html_messageIdx);
5412: end if;
5413:
5414: raise;
5415: when others then
5416: -- First look for a wf_core error.
5417: wf_core.get_error(err_name, err_message, err_stack);
5418: -- If no wf_core error look for a sql error.
5419: if (err_name is null) then
5420: err_message := sqlerrm;
5413:
5414: raise;
5415: when others then
5416: -- First look for a wf_core error.
5417: wf_core.get_error(err_name, err_message, err_stack);
5418: -- If no wf_core error look for a sql error.
5419: if (err_name is null) then
5420: err_message := sqlerrm;
5421: end if;
5414: raise;
5415: when others then
5416: -- First look for a wf_core error.
5417: wf_core.get_error(err_name, err_message, err_stack);
5418: -- If no wf_core error look for a sql error.
5419: if (err_name is null) then
5420: err_message := sqlerrm;
5421: end if;
5422:
5428: wf_temp_lob.releaseLob(g_LOBTable, g_text_messageIdx);
5429: end if;
5430:
5431: error_result := err_message||g_newLine||err_stack;
5432: wf_core.context('WF_MAIL', 'GetLOBMessage3', to_char(nid), node,
5433: error_result, 'Step -> '||step);
5434: end GetLOBMessage3;
5435:
5436:
5482: subject, body_atth, error_result, bodyToken);
5483:
5484: exception
5485: when no_program_unit then
5486: wf_core.context('WF_MAIL', 'GetLOBMessage2', to_char(nid), node);
5487: raise;
5488: when others then
5489: -- First look for a wf_core error.
5490: wf_core.get_error(err_name, err_message, err_stack);
5485: when no_program_unit then
5486: wf_core.context('WF_MAIL', 'GetLOBMessage2', to_char(nid), node);
5487: raise;
5488: when others then
5489: -- First look for a wf_core error.
5490: wf_core.get_error(err_name, err_message, err_stack);
5491:
5492: -- If no wf_core error look for a sql error.
5493: if (err_name is null) then
5486: wf_core.context('WF_MAIL', 'GetLOBMessage2', to_char(nid), node);
5487: raise;
5488: when others then
5489: -- First look for a wf_core error.
5490: wf_core.get_error(err_name, err_message, err_stack);
5491:
5492: -- If no wf_core error look for a sql error.
5493: if (err_name is null) then
5494: err_message := sqlerrm;
5488: when others then
5489: -- First look for a wf_core error.
5490: wf_core.get_error(err_name, err_message, err_stack);
5491:
5492: -- If no wf_core error look for a sql error.
5493: if (err_name is null) then
5494: err_message := sqlerrm;
5495: end if;
5496:
5494: err_message := sqlerrm;
5495: end if;
5496:
5497: error_result := err_message||g_newLine||err_stack;
5498: wf_core.context('WF_MAIL', 'GetLOBMessage2', to_char(nid), node,
5499: error_result);
5500:
5501: end getLOBMessage2;
5502:
5544: from WF_NOTIFICATIONS
5545: where NOTIFICATION_ID = nid;
5546: exception
5547: when no_data_found then
5548: wf_core.token('NID', to_char(nid));
5549: wf_core.raise('WFNTF_NID');
5550: end;
5551:
5552: -- Get Recipient information
5545: where NOTIFICATION_ID = nid;
5546: exception
5547: when no_data_found then
5548: wf_core.token('NID', to_char(nid));
5549: wf_core.raise('WFNTF_NID');
5550: end;
5551:
5552: -- Get Recipient information
5553: Wf_Directory.GetRoleInfoMail(n_to_role, r_dname, r_email, r_ntf_pref,
5564: subject, body_atth, error_result);
5565:
5566: exception
5567: when no_program_unit then
5568: wf_core.context('WF_MAIL', 'GetLOBMessage', to_char(nid), node);
5569: raise;
5570: when others then
5571: -- First look for a wf_core error.
5572: wf_core.get_error(err_name, err_message, err_stack);
5567: when no_program_unit then
5568: wf_core.context('WF_MAIL', 'GetLOBMessage', to_char(nid), node);
5569: raise;
5570: when others then
5571: -- First look for a wf_core error.
5572: wf_core.get_error(err_name, err_message, err_stack);
5573:
5574: -- If no wf_core error look for a sql error.
5575: if (err_name is null) then
5568: wf_core.context('WF_MAIL', 'GetLOBMessage', to_char(nid), node);
5569: raise;
5570: when others then
5571: -- First look for a wf_core error.
5572: wf_core.get_error(err_name, err_message, err_stack);
5573:
5574: -- If no wf_core error look for a sql error.
5575: if (err_name is null) then
5576: err_message := sqlerrm;
5570: when others then
5571: -- First look for a wf_core error.
5572: wf_core.get_error(err_name, err_message, err_stack);
5573:
5574: -- If no wf_core error look for a sql error.
5575: if (err_name is null) then
5576: err_message := sqlerrm;
5577: end if;
5578:
5576: err_message := sqlerrm;
5577: end if;
5578:
5579: error_result := err_message||g_newLine||err_stack;
5580: wf_core.context('WF_MAIL', 'GetLOBMessage', to_char(nid), node,
5581: error_result);
5582: end GetLOBMessage;
5583:
5584: -- GetSummary - get summary messages for one role
5601: lob varchar2(1);
5602: begin
5603: GetSummary(role, dname, node, subject, body_text,lob);
5604: if lob = 'Y' then
5605: wf_core.context('WF_MAIL', 'GetSummary', role, node);
5606: wf_core.raise('WFMLR_SUMMARY_TOOBIG');
5607: end if;
5608: exception
5609: when others then
5602: begin
5603: GetSummary(role, dname, node, subject, body_text,lob);
5604: if lob = 'Y' then
5605: wf_core.context('WF_MAIL', 'GetSummary', role, node);
5606: wf_core.raise('WFMLR_SUMMARY_TOOBIG');
5607: end if;
5608: exception
5609: when others then
5610: wf_core.context('WF_MAIL', 'GetSummary', role, node);
5606: wf_core.raise('WFMLR_SUMMARY_TOOBIG');
5607: end if;
5608: exception
5609: when others then
5610: wf_core.context('WF_MAIL', 'GetSummary', role, node);
5611: raise;
5612: end GetSummary;
5613:
5614: -- GetSummary2 - get summary messages for one role
5690: 'wf.plsql.WF_MAIL.GetSummary2',
5691: 'BEGIN');
5692: end if;
5693:
5694: g_wfmonId := wf_core.translate('WFMON_ID');
5695: g_to := wf_core.translate('TO');
5696: g_priority := wf_core.translate('PRIORITY');
5697: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5698:
5691: 'BEGIN');
5692: end if;
5693:
5694: g_wfmonId := wf_core.translate('WFMON_ID');
5695: g_to := wf_core.translate('TO');
5696: g_priority := wf_core.translate('PRIORITY');
5697: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5698:
5699: -- Bug# 2358498 - flag to indicate if the sumamry is LOB
5692: end if;
5693:
5694: g_wfmonId := wf_core.translate('WFMON_ID');
5695: g_to := wf_core.translate('TO');
5696: g_priority := wf_core.translate('PRIORITY');
5697: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5698:
5699: -- Bug# 2358498 - flag to indicate if the sumamry is LOB
5700: lob := 'N';
5693:
5694: g_wfmonId := wf_core.translate('WFMON_ID');
5695: g_to := wf_core.translate('TO');
5696: g_priority := wf_core.translate('PRIORITY');
5697: g_dueDate := wf_core.translate('WFMON_DUE_DATE');
5698:
5699: -- Bug# 2358498 - flag to indicate if the sumamry is LOB
5700: lob := 'N';
5701:
5724: where NAME = templateName
5725: and TYPE = templateType;
5726: exception
5727: when no_data_found then
5728: wf_core.token('NAME', templateName);
5729: wf_core.token('TYPE', templateType);
5730: wf_core.raise('WFNTF_MESSAGE');
5731: end;
5732:
5725: and TYPE = templateType;
5726: exception
5727: when no_data_found then
5728: wf_core.token('NAME', templateName);
5729: wf_core.token('TYPE', templateType);
5730: wf_core.raise('WFNTF_MESSAGE');
5731: end;
5732:
5733: -- Retrieve role orig_system ids for index access
5726: exception
5727: when no_data_found then
5728: wf_core.token('NAME', templateName);
5729: wf_core.token('TYPE', templateType);
5730: wf_core.raise('WFNTF_MESSAGE');
5731: end;
5732:
5733: -- Retrieve role orig_system ids for index access
5734: -- <
5740: t_subject := substrb(replace(t_subject, '&'||'USER_NAME',
5741: r_displayName), 1, 240);
5742:
5743: if (rorig_system is null or rorig_system = '') then
5744: wf_core.token('ROLE', role);
5745: wf_core.raise('WFNTF_ROLE');
5746: end if;
5747:
5748: if contType = g_ntfDocHtml then
5741: r_displayName), 1, 240);
5742:
5743: if (rorig_system is null or rorig_system = '') then
5744: wf_core.token('ROLE', role);
5745: wf_core.raise('WFNTF_ROLE');
5746: end if;
5747:
5748: if contType = g_ntfDocHtml then
5749: if (t_html_body is null) then
5817: n_buf := lpad(to_char(nid), 7, ' ')||' '||
5818: rpad(substr(dname, 1, 42), 42, ' ')||' ';
5819: if (rec.priority > 66) then
5820: --Bug 2774891 fix - sacsharm
5821: --priority_text := wf_core.substitute('WFTKN', 'HIGH');
5822: priority_text := wf_core.substitute('WFTKN', 'LOW');
5823: elsif (rec.priority > 33) then
5824: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
5825: else
5818: rpad(substr(dname, 1, 42), 42, ' ')||' ';
5819: if (rec.priority > 66) then
5820: --Bug 2774891 fix - sacsharm
5821: --priority_text := wf_core.substitute('WFTKN', 'HIGH');
5822: priority_text := wf_core.substitute('WFTKN', 'LOW');
5823: elsif (rec.priority > 33) then
5824: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
5825: else
5826: --Bug 2774891 fix - sacsharm
5820: --Bug 2774891 fix - sacsharm
5821: --priority_text := wf_core.substitute('WFTKN', 'HIGH');
5822: priority_text := wf_core.substitute('WFTKN', 'LOW');
5823: elsif (rec.priority > 33) then
5824: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
5825: else
5826: --Bug 2774891 fix - sacsharm
5827: --priority_text := wf_core.substitute('WFTKN', 'LOW');
5828: priority_text := wf_core.substitute('WFTKN', 'HIGH');
5823: elsif (rec.priority > 33) then
5824: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
5825: else
5826: --Bug 2774891 fix - sacsharm
5827: --priority_text := wf_core.substitute('WFTKN', 'LOW');
5828: priority_text := wf_core.substitute('WFTKN', 'HIGH');
5829: end if;
5830:
5831: n_buf := n_buf||lpad(priority_text, 12, ' ');
5824: priority_text := wf_core.substitute('WFTKN', 'NORMAL');
5825: else
5826: --Bug 2774891 fix - sacsharm
5827: --priority_text := wf_core.substitute('WFTKN', 'LOW');
5828: priority_text := wf_core.substitute('WFTKN', 'HIGH');
5829: end if;
5830:
5831: n_buf := n_buf||lpad(priority_text, 12, ' ');
5832: n_buf := n_buf||' '||to_char(rec.due_date)||g_newLine;
5908:
5909: end if;
5910:
5911:
5912: wf_core.context('WF_MAIL', 'GetSummary2', role, node, contType);
5913: raise;
5914: end GetSummary2;
5915:
5916: -- GetSummary - get summary messages for one role
5936: begin
5937: GetSummary2(role, dname, node, 'Y', 'text/plain', subject, body_text, lob);
5938: exception
5939: when others then
5940: wf_core.context('WF_MAIL', 'GetSummary', role, node);
5941: raise;
5942: end GetSummary;
5943:
5944:
6009: end if;
6010: end if;
6011: exception
6012: when others then
6013: WF_CORE.Context('WF_MAIL','FetchLOBContent',doc_type,
6014: to_char(pos)||':'||buffer);
6015: raise;
6016: end FetchLOBContent;
6017:
6030: wf_temp_lob.releaseLob(g_LOBTable, g_text_messageIdx);
6031: end if;
6032: exception
6033: when others then
6034: WF_CORE.Context('WF_MAIL','CloseLOB', doc_type);
6035: raise;
6036: end;
6037:
6038: -- CloseLOB - Close the message LOBs ready for use again later
6043: WF_MAIL.CloseLOB(g_ntfDocText);
6044: WF_MAIL.CloseLOB(g_ntfDocHtml);
6045: exception
6046: when others then
6047: WF_CORE.Context('WF_MAIL','CloseLOB');
6048: raise;
6049: end;
6050:
6051:
6066: return('NO_DATA_FOUND');
6067:
6068: when others then
6069: error_result := sqlerrm;
6070: wf_core.context('WF_MAIL', 'FetchUrlContent', piece_count);
6071:
6072: end FetchUrlContent;
6073:
6074:
6107:
6108: when utl_http.init_failed then
6109: error_result := 'UTL_HTTP.INIT_FAILED';
6110: error_result := error_result || sqlerrm;
6111: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6112:
6113: when utl_http.request_failed then
6114: error_result := 'UTL_HTTP.REQUEST_FAILED';
6115: error_result := error_result || sqlerrm;
6112:
6113: when utl_http.request_failed then
6114: error_result := 'UTL_HTTP.REQUEST_FAILED';
6115: error_result := error_result || sqlerrm;
6116: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6117:
6118: when no_program_unit then
6119: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6120: raise;
6115: error_result := error_result || sqlerrm;
6116: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6117:
6118: when no_program_unit then
6119: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6120: raise;
6121: when others then
6122: error_result := sqlerrm;
6123: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6119: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6120: raise;
6121: when others then
6122: error_result := sqlerrm;
6123: wf_core.context('WF_MAIL', 'GetUrlContent', url);
6124:
6125: end GetUrlContent;
6126:
6127: -- GetDocContent - get Document content
6152: doccontent := Wf_Notification.GetAttrDoc(nid, docattrname, disptype);
6153:
6154: exception
6155: when no_program_unit then
6156: wf_core.context('WF_MAIL', 'GetDocContent', docattrname);
6157: raise;
6158: when others then
6159: -- First look for a wf_core error.
6160: wf_core.get_error(err_name, err_message, err_stack);
6155: when no_program_unit then
6156: wf_core.context('WF_MAIL', 'GetDocContent', docattrname);
6157: raise;
6158: when others then
6159: -- First look for a wf_core error.
6160: wf_core.get_error(err_name, err_message, err_stack);
6161:
6162: -- If no wf_core error look for a sql error.
6163: if (err_name is null) then
6156: wf_core.context('WF_MAIL', 'GetDocContent', docattrname);
6157: raise;
6158: when others then
6159: -- First look for a wf_core error.
6160: wf_core.get_error(err_name, err_message, err_stack);
6161:
6162: -- If no wf_core error look for a sql error.
6163: if (err_name is null) then
6164: err_message := sqlerrm;
6158: when others then
6159: -- First look for a wf_core error.
6160: wf_core.get_error(err_name, err_message, err_stack);
6161:
6162: -- If no wf_core error look for a sql error.
6163: if (err_name is null) then
6164: err_message := sqlerrm;
6165: end if;
6166:
6164: err_message := sqlerrm;
6165: end if;
6166:
6167: error_result := err_message;
6168: wf_core.context('WF_MAIL', 'GetDocContent', docattrname);
6169:
6170: end GetDocContent;
6171:
6172: -- GetLOBDocContent - get Document content
6196: Wf_Mail.GetLOBDocContent(nid, docattrname, disptype, doctype, error_result);
6197:
6198: exception
6199: when no_program_unit then
6200: wf_core.context('WF_MAIL', 'oldGetLOBDocContent', docattrname);
6201: raise;
6202: when others then
6203: -- First look for a wf_core error.
6204: wf_core.get_error(err_name, err_message, err_stack);
6199: when no_program_unit then
6200: wf_core.context('WF_MAIL', 'oldGetLOBDocContent', docattrname);
6201: raise;
6202: when others then
6203: -- First look for a wf_core error.
6204: wf_core.get_error(err_name, err_message, err_stack);
6205:
6206: -- If no wf_core error look for a sql error.
6207: if (err_name is null) then
6200: wf_core.context('WF_MAIL', 'oldGetLOBDocContent', docattrname);
6201: raise;
6202: when others then
6203: -- First look for a wf_core error.
6204: wf_core.get_error(err_name, err_message, err_stack);
6205:
6206: -- If no wf_core error look for a sql error.
6207: if (err_name is null) then
6208: err_message := sqlerrm;
6202: when others then
6203: -- First look for a wf_core error.
6204: wf_core.get_error(err_name, err_message, err_stack);
6205:
6206: -- If no wf_core error look for a sql error.
6207: if (err_name is null) then
6208: err_message := sqlerrm;
6209: end if;
6210:
6208: err_message := sqlerrm;
6209: end if;
6210:
6211: error_result := err_message;
6212: wf_core.context('WF_MAIL', 'oldGetDocLOBContent', docattrname);
6213: end GetLOBDocContent;
6214:
6215: -- GetLOBDocContent - get Document content
6216: --
6268:
6269:
6270: exception
6271: when no_program_unit then
6272: wf_core.context('WF_MAIL', 'GetLOBDocContent', docattrname);
6273: raise;
6274: when others then
6275: -- First look for a wf_core error.
6276: wf_core.get_error(err_name, err_message, err_stack);
6271: when no_program_unit then
6272: wf_core.context('WF_MAIL', 'GetLOBDocContent', docattrname);
6273: raise;
6274: when others then
6275: -- First look for a wf_core error.
6276: wf_core.get_error(err_name, err_message, err_stack);
6277:
6278: -- If no wf_core error look for a sql error.
6279: if (err_name is null) then
6272: wf_core.context('WF_MAIL', 'GetLOBDocContent', docattrname);
6273: raise;
6274: when others then
6275: -- First look for a wf_core error.
6276: wf_core.get_error(err_name, err_message, err_stack);
6277:
6278: -- If no wf_core error look for a sql error.
6279: if (err_name is null) then
6280: err_message := sqlerrm;
6274: when others then
6275: -- First look for a wf_core error.
6276: wf_core.get_error(err_name, err_message, err_stack);
6277:
6278: -- If no wf_core error look for a sql error.
6279: if (err_name is null) then
6280: err_message := sqlerrm;
6281: end if;
6282:
6280: err_message := sqlerrm;
6281: end if;
6282:
6283: error_result := err_message;
6284: wf_core.context('WF_MAIL', 'GetDocLOBContent', docattrname);
6285:
6286: end GetLOBDocContent;
6287:
6288: -- RemoveSpace (PRIVATE)
6361: end loop;
6362: return tmpBody;
6363: exception
6364: when others then
6365: wf_core.context('WF_MAIL', 'RemoveSpace');
6366: raise;
6367: end RemoveSpace;
6368:
6369: -- PutMessage
6440: from WF_NOTIFICATIONS
6441: where NOTIFICATION_ID = nid;
6442: exception
6443: when no_data_found then
6444: wf_core.token('NID', to_char(nid));
6445: wf_core.raise('WFNTF_NID');
6446: end;
6447: i := 1;
6448: -- collect all the response attributes and their details
6441: where NOTIFICATION_ID = nid;
6442: exception
6443: when no_data_found then
6444: wf_core.token('NID', to_char(nid));
6445: wf_core.raise('WFNTF_NID');
6446: end;
6447: i := 1;
6448: -- collect all the response attributes and their details
6449: -- for the notification
6459: -- raise error is the policy is invalid
6460: Wf_Mail.GetSignaturePolicy(nid, n_sig_policy);
6461: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6462: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6463: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6464: wf_core.token('NID', to_char(nid));
6465: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6466: else
6467: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6460: Wf_Mail.GetSignaturePolicy(nid, n_sig_policy);
6461: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6462: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6463: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6464: wf_core.token('NID', to_char(nid));
6465: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6466: else
6467: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6468: wf_core.token('NID', to_char(nid));
6461: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6462: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6463: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6464: wf_core.token('NID', to_char(nid));
6465: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6466: else
6467: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6468: wf_core.token('NID', to_char(nid));
6469: wf_core.token('POLICY', n_sig_policy);
6463: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6464: wf_core.token('NID', to_char(nid));
6465: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6466: else
6467: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6468: wf_core.token('NID', to_char(nid));
6469: wf_core.token('POLICY', n_sig_policy);
6470: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6471: end if;
6464: wf_core.token('NID', to_char(nid));
6465: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6466: else
6467: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6468: wf_core.token('NID', to_char(nid));
6469: wf_core.token('POLICY', n_sig_policy);
6470: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6471: end if;
6472: end if;
6465: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6466: else
6467: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6468: wf_core.token('NID', to_char(nid));
6469: wf_core.token('POLICY', n_sig_policy);
6470: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6471: end if;
6472: end if;
6473:
6466: else
6467: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6468: wf_core.token('NID', to_char(nid));
6469: wf_core.token('POLICY', n_sig_policy);
6470: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6471: end if;
6472: end if;
6473:
6474: -- all database-friendly RemoveSpace
6594: -- Complete the response.
6595: if response then
6596: Wf_Notification.Respond(nid, NULL, 'email:'||from_addr);
6597: else
6598: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6599: wf_core.raise('WFRSPR_NORESPONSE');
6600: end if;
6601:
6602: exception
6595: if response then
6596: Wf_Notification.Respond(nid, NULL, 'email:'||from_addr);
6597: else
6598: wf_core.context('WF_MAIL', 'PutMessage', to_char(nid), node, from_addr);
6599: wf_core.raise('WFRSPR_NORESPONSE');
6600: end if;
6601:
6602: exception
6603: when no_program_unit then
6600: end if;
6601:
6602: exception
6603: when no_program_unit then
6604: wf_core.context('WF_MAIL','PutMessage', to_char(nid));
6605: raise;
6606: when OTHERS then
6607: wf_core.context('WF_MAIL','PutMessage', to_char(nid));
6608: -- Save error message and set status to INVALID so mailer will
6603: when no_program_unit then
6604: wf_core.context('WF_MAIL','PutMessage', to_char(nid));
6605: raise;
6606: when OTHERS then
6607: wf_core.context('WF_MAIL','PutMessage', to_char(nid));
6608: -- Save error message and set status to INVALID so mailer will
6609: -- bounce an "invalid reply" message to sender.
6610: HandleResponseError(nid, lk_type, lk_meaning, error_result);
6611: end PutMessage;
6684: from WF_NOTIFICATIONS
6685: where NOTIFICATION_ID = nid;
6686: exception
6687: when no_data_found then
6688: wf_core.token('NID', to_char(nid));
6689: wf_core.raise('WFNTF_NID');
6690: end;
6691:
6692: -- Bug 2375920 get the signature policy for the notification and
6685: where NOTIFICATION_ID = nid;
6686: exception
6687: when no_data_found then
6688: wf_core.token('NID', to_char(nid));
6689: wf_core.raise('WFNTF_NID');
6690: end;
6691:
6692: -- Bug 2375920 get the signature policy for the notification and
6693: -- raise error is the policy is invalid
6693: -- raise error is the policy is invalid
6694: Wf_Mail.GetSignaturePolicy(nid, n_sig_policy);
6695: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6696: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6697: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6698: wf_core.token('NID', to_char(nid));
6699: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6700: else
6701: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6694: Wf_Mail.GetSignaturePolicy(nid, n_sig_policy);
6695: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6696: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6697: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6698: wf_core.token('NID', to_char(nid));
6699: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6700: else
6701: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6702: wf_core.token('NID', to_char(nid));
6695: if (n_sig_policy is not NULL and upper(n_sig_policy) <> 'DEFAULT') then
6696: if(upper(n_sig_policy) = 'PSIG_ONLY') then
6697: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6698: wf_core.token('NID', to_char(nid));
6699: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6700: else
6701: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6702: wf_core.token('NID', to_char(nid));
6703: wf_core.token('POLICY', n_sig_policy);
6697: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6698: wf_core.token('NID', to_char(nid));
6699: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6700: else
6701: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6702: wf_core.token('NID', to_char(nid));
6703: wf_core.token('POLICY', n_sig_policy);
6704: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6705: end if;
6698: wf_core.token('NID', to_char(nid));
6699: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6700: else
6701: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6702: wf_core.token('NID', to_char(nid));
6703: wf_core.token('POLICY', n_sig_policy);
6704: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6705: end if;
6706: end if;
6699: wf_core.raise('WFRSPR_PWD_SIGNATURE');
6700: else
6701: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6702: wf_core.token('NID', to_char(nid));
6703: wf_core.token('POLICY', n_sig_policy);
6704: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6705: end if;
6706: end if;
6707:
6700: else
6701: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid), node, from_addr);
6702: wf_core.token('NID', to_char(nid));
6703: wf_core.token('POLICY', n_sig_policy);
6704: wf_core.raise('WFMLR_INVALID_SIG_POLICY');
6705: end if;
6706: end if;
6707:
6708: -- Process all Response attributes.
6765: -- Complete the response.
6766: if response then
6767: Wf_Notification.Respond(nid, NULL, 'email:'||from_addr);
6768: else
6769: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid),
6770: node, from_addr);
6771: wf_core.raise('WFRSPR_NORESPONSE');
6772: end if;
6773: exception
6767: Wf_Notification.Respond(nid, NULL, 'email:'||from_addr);
6768: else
6769: wf_core.context('WF_MAIL', 'PutDirectMessage', to_char(nid),
6770: node, from_addr);
6771: wf_core.raise('WFRSPR_NORESPONSE');
6772: end if;
6773: exception
6774: when no_program_unit then
6775: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
6771: wf_core.raise('WFRSPR_NORESPONSE');
6772: end if;
6773: exception
6774: when no_program_unit then
6775: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
6776: raise;
6777: when OTHERS then
6778: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
6779: -- Save error message and set status to INVALID so mailer will
6774: when no_program_unit then
6775: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
6776: raise;
6777: when OTHERS then
6778: wf_core.context('WF_MAIL','PutDirectMessage', to_char(nid));
6779: -- Save error message and set status to INVALID so mailer will
6780: -- bounce an "invalid reply" message to sender.
6781: HandleResponseError(nid, lk_type, lk_meaning, error_result);
6782: end PutDirectMessage;
6855: wf_notification.UpdateInfo2(nid, to_user, from_addr, comment);
6856: end if;
6857: exception
6858: when no_program_unit then
6859: wf_core.context('WF_MAIL','PutMoreInfoRequest', to_char(nid));
6860: raise;
6861: when OTHERS then
6862: wf_core.context('WF_MAIL','PutMoreInfoRequest', to_char(nid));
6863: -- Save error message and set status to INVALID so mailer will
6858: when no_program_unit then
6859: wf_core.context('WF_MAIL','PutMoreInfoRequest', to_char(nid));
6860: raise;
6861: when OTHERS then
6862: wf_core.context('WF_MAIL','PutMoreInfoRequest', to_char(nid));
6863: -- Save error message and set status to INVALID so mailer will
6864: -- bounce an "invalid reply" message to sender.
6865: HandleResponseError(nid, dummy, dummy, error_result);
6866: end PutMoreInfoRequest;
6938: to_user := NULL;
6939: wf_notification.UpdateInfo2(nid, to_user, from_addr, comment);
6940: exception
6941: when no_program_unit then
6942: wf_core.context('WF_MAIL','PutMoreInfoMessage', to_char(nid));
6943: raise;
6944: when OTHERS then
6945: wf_core.context('WF_MAIL','PutMoreInfoMessage', to_char(nid));
6946: -- Save error message and set status to INVALID so mailer will
6941: when no_program_unit then
6942: wf_core.context('WF_MAIL','PutMoreInfoMessage', to_char(nid));
6943: raise;
6944: when OTHERS then
6945: wf_core.context('WF_MAIL','PutMoreInfoMessage', to_char(nid));
6946: -- Save error message and set status to INVALID so mailer will
6947: -- bounce an "invalid reply" message to sender.
6948: HandleResponseError(nid, dummy, dummy, error_result);
6949: end PutMoreInfoMessage;
7024: buffer := '';
7025: end if;
7026: exception
7027: when no_program_unit then
7028: wf_core.context('WF_MAIL', 'GetURLAttachment', to_char(nid));
7029: raise;
7030: when others then
7031: -- First look for a wf_core error.
7032: wf_core.get_error(err_name, err_message, err_stack);
7027: when no_program_unit then
7028: wf_core.context('WF_MAIL', 'GetURLAttachment', to_char(nid));
7029: raise;
7030: when others then
7031: -- First look for a wf_core error.
7032: wf_core.get_error(err_name, err_message, err_stack);
7033:
7034: -- If no wf_core error look for a sql error.
7035: if (err_name is null) then
7028: wf_core.context('WF_MAIL', 'GetURLAttachment', to_char(nid));
7029: raise;
7030: when others then
7031: -- First look for a wf_core error.
7032: wf_core.get_error(err_name, err_message, err_stack);
7033:
7034: -- If no wf_core error look for a sql error.
7035: if (err_name is null) then
7036: err_message := sqlerrm;
7030: when others then
7031: -- First look for a wf_core error.
7032: wf_core.get_error(err_name, err_message, err_stack);
7033:
7034: -- If no wf_core error look for a sql error.
7035: if (err_name is null) then
7036: err_message := sqlerrm;
7037: end if;
7038:
7036: err_message := sqlerrm;
7037: end if;
7038:
7039: error_result := err_message;
7040: wf_core.context('WF_MAIL', 'GetURLAttachment', to_char(nid));
7041:
7042: end;
7043:
7044:
7173: and rownum < 2;
7174: end;
7175: exception
7176: when OTHERS then
7177: wf_core.context('WF_MAIL', 'GetCharset', lang, terr);
7178: raise;
7179: end GetCharset;
7180:
7181: -- GetSessionLanguage
7207: codeset := substr(nls_str, dot+1);
7208:
7209: exception
7210: when others then
7211: wf_core.context('WF_MAIL', 'GetSessionLanguage');
7212: raise;
7213: end GetSessionLanguage;
7214:
7215: -- Bug 2375920
7230: sig_policy := Wf_Notification.GetAttrText(nid, '#WF_SIG_POLICY');
7231:
7232: exception
7233: when others then
7234: if (wf_core.error_name = 'WFNTF_ATTR') then
7235: wf_core.clear;
7236: sig_policy := 'DEFAULT';
7237: else
7238: raise;
7231:
7232: exception
7233: when others then
7234: if (wf_core.error_name = 'WFNTF_ATTR') then
7235: wf_core.clear;
7236: sig_policy := 'DEFAULT';
7237: else
7238: raise;
7239: end if;
7259: p_sec_policy := 'DEFAULT';
7260: end if;
7261: exception
7262: when others then
7263: if (wf_core.error_name = 'WFNTF_ATTR') then
7264: wf_core.clear;
7265: p_sec_policy := 'DEFAULT';
7266: else
7267: raise;
7260: end if;
7261: exception
7262: when others then
7263: if (wf_core.error_name = 'WFNTF_ATTR') then
7264: wf_core.clear;
7265: p_sec_policy := 'DEFAULT';
7266: else
7267: raise;
7268: end if;
7288: FROM wf_ntf_security_policies
7289: WHERE policy_name = l_sec_policy;
7290: exception
7291: when others then
7292: Wf_Core.Token('NID', to_char(p_nid));
7293: Wf_Core.Token('POLICY', l_sec_policy);
7294: Wf_Core.Raise('WFMLR_INVALID_SEC_POLICY');
7295: end;
7296:
7289: WHERE policy_name = l_sec_policy;
7290: exception
7291: when others then
7292: Wf_Core.Token('NID', to_char(p_nid));
7293: Wf_Core.Token('POLICY', l_sec_policy);
7294: Wf_Core.Raise('WFMLR_INVALID_SEC_POLICY');
7295: end;
7296:
7297: -- There should be a way to avoid hard-coding the values !!!
7290: exception
7291: when others then
7292: Wf_Core.Token('NID', to_char(p_nid));
7293: Wf_Core.Token('POLICY', l_sec_policy);
7294: Wf_Core.Raise('WFMLR_INVALID_SEC_POLICY');
7295: end;
7296:
7297: -- There should be a way to avoid hard-coding the values !!!
7298: p_email := l_email_allowed;
7312: end if;
7313:
7314: exception
7315: when others then
7316: Wf_Core.Context('Wf_Mail', 'ProcessSecurityPolicy', to_char(p_nid));
7317: raise;
7318: end ProcessSecurityPolicy;
7319:
7320: -- Set_FYI_Flag (Private)
7383: begin
7384: l_lang := upper(Wf_Notification.GetAttrText(p_nid, '#WFM_LANGUAGE'));
7385: exception
7386: when others then
7387: if (wf_core.error_name = 'WFNTF_ATTR') then
7388: wf_core.clear();
7389: l_lang := null;
7390: else
7391: raise;
7384: l_lang := upper(Wf_Notification.GetAttrText(p_nid, '#WFM_LANGUAGE'));
7385: exception
7386: when others then
7387: if (wf_core.error_name = 'WFNTF_ATTR') then
7388: wf_core.clear();
7389: l_lang := null;
7390: else
7391: raise;
7392: end if;
7436: begin
7437: l_terr := upper(Wf_Notification.GetAttrText(p_nid, '#WFM_TERRITORY'));
7438: exception
7439: when others then
7440: if (wf_core.error_name = 'WFNTF_ATTR') then
7441: wf_core.clear();
7442: l_terr := null;
7443: else
7444: raise;
7437: l_terr := upper(Wf_Notification.GetAttrText(p_nid, '#WFM_TERRITORY'));
7438: exception
7439: when others then
7440: if (wf_core.error_name = 'WFNTF_ATTR') then
7441: wf_core.clear();
7442: l_terr := null;
7443: else
7444: raise;
7445: end if;
7514: end if;
7515:
7516: exception
7517: when others then
7518: Wf_Core.Context('Wf_Mail', 'Get_Ntf_Language', to_char(p_nid), p_language, p_territory);
7519: raise;
7520: end Get_Ntf_Language;
7521:
7522: --
7608: 'wf.plsql.WF_MAIL.send',
7609: 'Recipient List is empty. ');
7610: end if;
7611:
7612: wf_core.raise('WFMLR_NO_RECIPIENTS');
7613: end if;
7614:
7615: -- At least subject or body is required
7616: if (p_subject is null and (p_message is null or dbms_lob.GetLength(p_message)=0)) then
7619: 'wf.plsql.WF_MAIL.send',
7620: 'Subject and Message Contents are blank or null. ');
7621: end if;
7622:
7623: wf_core.raise('WFMLR_MSG_INCOMPLETE');
7624: end if;
7625:
7626: -- For all e-mails, respone or FYI, module name is required
7627: if (p_module is null) then
7630: 'wf.plsql.WF_MAIL.send',
7631: 'Message module is not specified. ');
7632: end if;
7633:
7634: wf_core.raise('WFMLR_NO_MODULE');
7635: end if;
7636:
7637: dbms_lob.createTemporary(l_msg_doc, TRUE, dbms_lob.call);
7638: l_str := '';
7669: -- <
7670: -- Setting default parameter's value until ALR team starts to pass
7671: -- below parameter's values.
7672: -- TODO>>
7673: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
7674: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
7675: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7676: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7677:
7670: -- Setting default parameter's value until ALR team starts to pass
7671: -- below parameter's values.
7672: -- TODO>>
7673: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
7674: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
7675: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7676: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7677:
7678: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7671: -- below parameter's values.
7672: -- TODO>>
7673: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
7674: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
7675: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7676: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7677:
7678: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7679: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7672: -- TODO>>
7673: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
7674: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
7675: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
7676: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
7677:
7678: wf_xml.AddElementAttribute('priority', '50', l_attrlist);
7679: wf_xml.AddElementAttribute('accesskey', '0', l_attrlist);
7680: wf_xml.AddElementAttribute('node', l_nodename, l_attrlist);
7807: dbms_lob.append(dest_lob => g_LOBTable(l_messageIdx).temp_lob,
7808: src_lob => p_message);
7809:
7810: if l_idstr is not null and l_fyi_flag = false then
7811: l_idstr := wf_core.newline||l_idstr;
7812: l_idsize := length(l_idstr);
7813: dbms_lob.writeAppend(lob_loc => g_LOBTable(l_messageIdx).temp_lob,
7814: amount => l_idsize,
7815: buffer => l_idstr);
7884: wf_temp_lob.releaseLob(g_LOBTable, l_messageIdx);
7885: END if;
7886:
7887:
7888: wf_core.context('Wf_Mail', 'Send', p_idstring, p_subject);
7889: raise;
7890: end Send;
7891:
7892:
8068: WHERE NAME = 'WFNTF_CANNOT_REPLY'
8069: AND LANGUAGE = userenv('LANG');
8070: exception
8071: when NO_DATA_FOUND then
8072: wf_core.raise('WFCORE_NO_MESSAGE');
8073: end;
8074:
8075: l_nodename := wf_mailer_parameter.getvalueforcorr(
8076: l_msg_type||':'||l_msg_name,'NODENAME');
8127: -- <
8128: -- Setting default parameter's value as for warning, as these parameters
8129: -- won't be used to update AppsContext (non-OAF content)
8130: -- TODO>>
8131: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
8132: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
8133: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8134: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8135:
8128: -- Setting default parameter's value as for warning, as these parameters
8129: -- won't be used to update AppsContext (non-OAF content)
8130: -- TODO>>
8131: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
8132: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
8133: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8134: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8135:
8136: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8129: -- won't be used to update AppsContext (non-OAF content)
8130: -- TODO>>
8131: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
8132: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
8133: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8134: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8135:
8136: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8137: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8130: -- TODO>>
8131: wf_xml.AddElementAttribute('nlsDateformat', wf_core.nls_date_format, l_attrlist);
8132: wf_xml.AddElementAttribute('nlsDateLanguage', wf_core.nls_date_language, l_attrlist);
8133: wf_xml.AddElementAttribute('nlsNumericCharacters', wf_core.nls_numeric_characters, l_attrlist);
8134: wf_xml.AddElementAttribute('nlsSort', wf_core.nls_sort, l_attrlist);
8135:
8136: wf_xml.AddElementAttribute('priority','50',l_attrlist);
8137: wf_xml.AddElementAttribute('accesskey','0',l_attrlist);
8138: wf_xml.AddElementAttribute('node',l_nodename,l_attrlist);
8358: AND out_agent_guid
8359: IN (SELECT guid
8360: FROM wf_agents
8361: WHERE name = 'WF_NOTIFICATION_OUT'
8362: AND system_guid = hextoraw(wf_core.translate('WF_SYSTEM_GUID')))
8363: AND customization_level = 'L';
8364:
8365: -- Inform BES cache manager that BES meta-data state has changed
8366: wf_bes_cache.SetMetaDataUploaded;