12: --
13: -- Error (PRIVATE)
14: -- Print a page with an error message.
15: -- Errors are retrieved from these sources in order:
16: -- 1. wf_core errors
17: -- 2. Oracle errors
18: -- 3. Unspecified INTERNAL error
19: --
20: procedure Error
24: error_stack varchar2(32000);
25: begin
26: htp.htmlOpen;
27: htp.headOpen;
28: htp.title(wf_core.translate('ERROR'));
29: htp.headClose;
30:
31: begin
32: wfa_sec.Header(TRUE);
34: when others then
35: htp.bodyOpen;
36: end;
37:
38: htp.header(nsize=>1, cheader=>wf_core.translate('ERROR'));
39:
40: wf_core.get_error(error_name, error_message, error_stack);
41:
42: if (error_name is not null) then
36: end;
37:
38: htp.header(nsize=>1, cheader=>wf_core.translate('ERROR'));
39:
40: wf_core.get_error(error_name, error_message, error_stack);
41:
42: if (error_name is not null) then
43: htp.p(error_message);
44: else
45: htp.p(sqlerrm);
46: end if;
47:
48: htp.hr;
49: htp.p(wf_core.translate('WFENG_ERRNAME')||': '||error_name);
50: htp.br;
51: htp.p(wf_core.translate('WFENG_ERRSTACK')||': '||
52: replace(error_stack,wf_plug.chr_newline,'
'));
53:
47:
48: htp.hr;
49: htp.p(wf_core.translate('WFENG_ERRNAME')||': '||error_name);
50: htp.br;
51: htp.p(wf_core.translate('WFENG_ERRSTACK')||': '||
52: replace(error_stack,wf_plug.chr_newline,'
'));
53:
54: wfa_sec.Footer;
55: htp.htmlClose;
68: begin
69: res := ICX_SEC.ValidatePlugSession(plug_id, session_id );
70: exception
71: when others then
72: wf_core.token('SQLCODE', SQLCODE);
73: wf_core.token('SQLERRM', SQLERRM);
74: wf_core.raise('WFSEC_GET_SESSION');
75: end;
76:
69: res := ICX_SEC.ValidatePlugSession(plug_id, session_id );
70: exception
71: when others then
72: wf_core.token('SQLCODE', SQLCODE);
73: wf_core.token('SQLERRM', SQLERRM);
74: wf_core.raise('WFSEC_GET_SESSION');
75: end;
76:
77: if (res = FALSE ) then
70: exception
71: when others then
72: wf_core.token('SQLCODE', SQLCODE);
73: wf_core.token('SQLERRM', SQLERRM);
74: wf_core.raise('WFSEC_GET_SESSION');
75: end;
76:
77: if (res = FALSE ) then
78: wf_core.raise('WFSEC_NO_SESSION');
74: wf_core.raise('WFSEC_GET_SESSION');
75: end;
76:
77: if (res = FALSE ) then
78: wf_core.raise('WFSEC_NO_SESSION');
79: end if;
80:
81: l_user_name := ICX_SEC.GetID(99, null, session_id);
82:
83: user_name := l_user_name;
84:
85: exception
86: when others then
87: wf_core.context('Wf_plug', 'GetPlugSession');
88: raise;
89: end GetPlugSession;
90:
91:
217:
218: exception
219: when others then
220: rollback;
221: wf_core.context('Wf_Plug', 'get_plug_definition');
222: wf_plug.Error;
223: end get_plug_definition;
224:
225:
282:
283:
284: -- From User Field
285: htp.tableRowOpen;
286: htp.tableData(cvalue=>wf_core.translate('NOTIF_FROM'), calign=>'right');
287:
288: IF (fromuser = '*') THEN
289:
290: htp.tableData(htf.formText(cname=>'fromuser', csize=>'30',
301:
302:
303: -- Type field
304: htp.tableRowOpen;
305: htp.tableData(cvalue=>wf_core.translate('NOTIF_TYPE'), calign=>'right');
306: htp.p('
324: end loop;
325:
326: IF (ittype = '*') THEN
327:
328: htp.formSelectOption(cvalue=>wf_core.translate('ALL'),
329: cselected => 'SELECTED',
330: cattributes=>'value=*');
331:
332: ELSE
330: cattributes=>'value=*');
331:
332: ELSE
333:
334: htp.formSelectOption(cvalue=>wf_core.translate('ALL'),
335: cattributes=>'value=*');
336:
337: END IF;
338:
341: htp.tableRowClose;
342:
343: -- Sent in the last N days field
344: htp.tableRowOpen;
345: htp.tableData(cvalue=>wf_core.translate('NOTIF_SENT'), calign=>'right');
346:
347: IF (beg_sent IS NOT NULL) THEN
348:
349: lbeg_sent := TO_DATE(beg_sent, 'MM/DD/YYYY') - TO_DATE('01/01/2000', 'MM/DD/YYYY');
387: cvalue=>htf.formcheckbox(
388: cname=>'HPRIORITY',
389: cvalue=>'H',
390: cchecked=>lchecked)||
391: ' '||wf_core.translate('HIGH_MESSAGES')||' ',
392: calign=>'left');
393:
394: htp.tableRowClose;
395:
412: cvalue=>htf.formcheckbox(
413: cname=>'MPRIORITY',
414: cvalue=>'M',
415: cchecked=>lchecked)||
416: ' '||wf_core.translate('MEDIUM_MESSAGES')||' ',
417: calign=>'left');
418:
419: htp.tableRowClose;
420:
437: cvalue=>htf.formcheckbox(
438: cname=>'LPRIORITY',
439: cvalue=>'L',
440: cchecked=>lchecked)||
441: ' '||wf_core.translate('LOW_MESSAGES')||' ',
442: calign=>'left');
443:
444: htp.tableRowClose;
445:
447:
448:
449: exception
450: when others then
451: Wf_Core.Context('wf_plug', 'find_criteria');
452: wf_plug.Error;
453:
454: END find_criteria;
455:
635:
636: -- See if user over-ride argument requested
637: if (luser is not null) then
638: -- Check that current user has WF_ADMIN_ROLE privileges
639: admin_role := wf_core.translate('WF_ADMIN_ROLE');
640: if (admin_role <> '*' and
641: not Wf_Directory.IsPerformer(username, admin_role)) then
642: Wf_Core.Token('UNAME', username);
643: Wf_Core.Token('ROLE', admin_role);
638: -- Check that current user has WF_ADMIN_ROLE privileges
639: admin_role := wf_core.translate('WF_ADMIN_ROLE');
640: if (admin_role <> '*' and
641: not Wf_Directory.IsPerformer(username, admin_role)) then
642: Wf_Core.Token('UNAME', username);
643: Wf_Core.Token('ROLE', admin_role);
644: Wf_Core.Raise('WFMON_ADMIN_ROLE');
645: end if;
646: -- Over-ride current user with argument
639: admin_role := wf_core.translate('WF_ADMIN_ROLE');
640: if (admin_role <> '*' and
641: not Wf_Directory.IsPerformer(username, admin_role)) then
642: Wf_Core.Token('UNAME', username);
643: Wf_Core.Token('ROLE', admin_role);
644: Wf_Core.Raise('WFMON_ADMIN_ROLE');
645: end if;
646: -- Over-ride current user with argument
647: username := luser;
640: if (admin_role <> '*' and
641: not Wf_Directory.IsPerformer(username, admin_role)) then
642: Wf_Core.Token('UNAME', username);
643: Wf_Core.Token('ROLE', admin_role);
644: Wf_Core.Raise('WFMON_ADMIN_ROLE');
645: end if;
646: -- Over-ride current user with argument
647: username := luser;
648: end if;
714: and WR.NAME = username;
715: end if;
716: exception
717: when no_data_found then
718: wf_core.token('ROLE', username);
719: wf_core.raise('WFNTF_ROLE');
720: end;
721:
722: /*
715: end if;
716: exception
717: when no_data_found then
718: wf_core.token('ROLE', username);
719: wf_core.raise('WFNTF_ROLE');
720: end;
721:
722: /*
723: ** This is a little confusing but its a pretty cool routine.
773: htp.tableRowOpen;
774: htp.p('
788: htp.p('
809: htp.tableRowOpen;
810: htp.p('
842:
843: IF (l_worklist_col_definition(l_record_num).column_name =
844: 'MESSAGE_TYPE') THEN
845:
846: htp.tableData(''||wf_core.translate('TYPE')||'', 'Left');
847:
848: END IF;
849:
850: IF (l_worklist_col_definition(l_record_num).column_name =
849:
850: IF (l_worklist_col_definition(l_record_num).column_name =
851: 'SUBJECT') THEN
852:
853: htp.tableData(''||wf_core.translate('SUBJECT')||'', 'Left');
854:
855: END IF;
856:
857: IF (l_worklist_col_definition(l_record_num).column_name =
856:
857: IF (l_worklist_col_definition(l_record_num).column_name =
858: 'BEGIN_DATE') THEN
859:
860: htp.tableData(''||wf_core.translate('BEGIN_DATE')||'', 'Left');
861:
862: END IF;
863:
864: IF (l_worklist_col_definition(l_record_num).column_name =
863:
864: IF (l_worklist_col_definition(l_record_num).column_name =
865: 'DUE_DATE') THEN
866:
867: htp.tableData(''||wf_core.translate('DUE_DATE')||'', 'Left');
868:
869: END IF;
870:
871: END LOOP;
986: end if;
987: if (attrs%isopen) then
988: close attrs;
989: end if;
990: wf_core.context('Wf_Plug','WorkList');
991: wf_plug.Error;
992: end Worklist;
993:
994:
1138: -- Must have either a plug_id or username passed in otherwise show an error
1139: ELSE
1140:
1141: l_no_parameters_passed := TRUE;
1142: Wf_Core.Context('wf_plug', 'edit_worklist_definition',
1143: 'missing parameter values');
1144: wf_plug.Error;
1145: return;
1146:
1148:
1149: -- Page title
1150: htp.htmlOpen;
1151: htp.headOpen;
1152: htp.title(ctitle=>wf_core.translate('WF_EDIT_WORKLIST_TITLE'));
1153:
1154: htp.headClose;
1155: htp.p('
1155: htp.p('
');
1170: htp.tablerowopen;
1171:
1172: htp.p('
1192: htp.formHidden(cname=>'plug_id', cvalue=>p_plug_id);
1193: htp.formHidden(cname=>'username', cvalue=>p_username);
1194: htp.formHidden(cname=>'definition_name', cvalue=>null);
1195:
1196: htp.bold(wf_core.translate('WF_EDIT_WORKLIST_COLUMNS'));
1197: htp.br;
1198: htp.br;
1199:
1200:
1217:
1218: FOR l_record_num IN 1..l_columns_to_show LOOP
1219:
1220: htp.p('
1254: END LOOP;
1255:
1256: IF (l_record_num > l_worklist_col_definition.count) THEN
1257:
1258: htp.formSelectOption(cvalue=>wf_core.translate('BLANK'),
1259: cselected => 'SELECTED',
1260: cattributes=>'value=NULL');
1261:
1262: ELSE
1260: cattributes=>'value=NULL');
1261:
1262: ELSE
1263:
1264: htp.formSelectOption(cvalue=>wf_core.translate('BLANK'),
1265: cattributes=>'value=NULL');
1266:
1267: END IF;
1268:
1284: htp.p('
'||wf_core.translate('ORDERBY')||''); 1289: 1290: htp.tableRowClose; 1291: 1292: htp.tableRowOpen; Line 1321: htp.bold(wf_core.translate('WF_EDIT_WORKLIST_CRITERIA')); | '); 1358: 1359: icx_plug_utilities.buttonleft(wf_core.translate('WF_EDIT_LONG_OK'),'javascript:document.WFPLUG.submit()', 'FNDJLFOK.gif'); 1360: -- htp.p(' OK '); 1361: 1362: htp.p(' | '); 1363: Line 1366: icx_plug_utilities.buttonright(wf_core.translate('CANCEL'),'javascript:history.back()', 'FNDJLFCN.gif'); | '); 1363: 1364: 1365: -- fixed bug for cancel button 1366: icx_plug_utilities.buttonright(wf_core.translate('CANCEL'),'javascript:history.back()', 'FNDJLFCN.gif'); 1367: -- icx_plug_utilities.buttonright(wf_core.translate('CANCEL'),icx_plug_utilities.MainMenulink, 'FNDJLFCN.gif'); 1368: 1369: htp.p(' | ');
---|