32: begin
33:
34: -- Do nothing in any mode other than run mode
35: -- this includes timeout, cancel, etc.
36: if (funcmode <> wf_engine.eng_run) then
37: resultout := wf_engine.eng_null;
38: return;
39: end if;
40:
33:
34: -- Do nothing in any mode other than run mode
35: -- this includes timeout, cancel, etc.
36: if (funcmode <> wf_engine.eng_run) then
37: resultout := wf_engine.eng_null;
38: return;
39: end if;
40:
41:
39: end if;
40:
41:
42: begin
43: lastrun := wf_engine.getitemattrdate(itemtype,itemkey,'LAST_CHECKED');
44: exception when others then
45: if ( wf_core.error_name = 'WFENG_ITEM_ATTR' ) then
46: wf_engine.AddItemAttr(itemtype,itemkey,'LAST_CHECKED');
47: lastrun := null;
42: begin
43: lastrun := wf_engine.getitemattrdate(itemtype,itemkey,'LAST_CHECKED');
44: exception when others then
45: if ( wf_core.error_name = 'WFENG_ITEM_ATTR' ) then
46: wf_engine.AddItemAttr(itemtype,itemkey,'LAST_CHECKED');
47: lastrun := null;
48: else
49: raise;
50: end if;
56: fetch error_cursor into dummy;
57: close error_cursor;
58:
59: if dummy is null then
60: resultout := wf_engine.eng_completed||':F';
61: else
62: resultout := wf_engine.eng_completed||':T';
63: end if;
64:
58:
59: if dummy is null then
60: resultout := wf_engine.eng_completed||':F';
61: else
62: resultout := wf_engine.eng_completed||':T';
63: end if;
64:
65: -- store a value for when this was last run so that next time
66: -- we only examine events that occured in the delta
65: -- store a value for when this was last run so that next time
66: -- we only examine events that occured in the delta
67: -- This way we will only send a new notification (and so cancel the old one)
68: -- if new errors have since happened.
69: wf_engine.setitemattrdate(itemtype,itemkey,'LAST_CHECKED',sysdate);
70:
71:
72: exception
73: when others then
163: document := document||'