DBA Data[Home] [Help]

APPS.WF_ENGINE_UTIL dependencies on WF_ENGINE_UTIL

Line 1: package body WF_ENGINE_UTIL as

1: package body WF_ENGINE_UTIL as
2: /* $Header: wfengb.pls 120.38.12020000.3 2012/11/13 19:42:45 alsosa ship $ */
3:
4: type InstanceArrayTyp is table of pls_integer
5: index by binary_integer;

Line 56: wf_engine_util.app_itemtype := '';

52: -- Clear runtime cache
53: procedure ClearCache
54: is
55: begin
56: wf_engine_util.app_itemtype := '';
57: wf_engine_util.app_itemkey := '';
58: wf_engine_util.app_level := '';
59: exception
60: when others then

Line 57: wf_engine_util.app_itemkey := '';

53: procedure ClearCache
54: is
55: begin
56: wf_engine_util.app_itemtype := '';
57: wf_engine_util.app_itemkey := '';
58: wf_engine_util.app_level := '';
59: exception
60: when others then
61: Wf_Core.Context('Wf_Engine_Util', 'ClearCache');

Line 58: wf_engine_util.app_level := '';

54: is
55: begin
56: wf_engine_util.app_itemtype := '';
57: wf_engine_util.app_itemkey := '';
58: wf_engine_util.app_level := '';
59: exception
60: when others then
61: Wf_Core.Context('Wf_Engine_Util', 'ClearCache');
62: raise;

Line 61: Wf_Core.Context('Wf_Engine_Util', 'ClearCache');

57: wf_engine_util.app_itemkey := '';
58: wf_engine_util.app_level := '';
59: exception
60: when others then
61: Wf_Core.Context('Wf_Engine_Util', 'ClearCache');
62: raise;
63: end ClearCache;
64:
65: --

Line 95: ((nvl(wf_engine_util.app_itemtype, 'x') <> itemtype) or

91: -- because process 2 has trashed the stack. Can't think of a way to
92: -- detect the error directly here.
93: if (itemkey = wf_engine.eng_synch) then
94: if ((not rootflag) and
95: ((nvl(wf_engine_util.app_itemtype, 'x') <> itemtype) or
96: (nvl(wf_engine_util.app_itemkey, 'x') <> itemkey))) then
97: Wf_Core.Token('ITEMTYPE', itemtype);
98: Wf_Core.Token('ITEMKEY', itemkey);
99: Wf_Core.Raise('WFENG_SYNCH_ITEM');

Line 96: (nvl(wf_engine_util.app_itemkey, 'x') <> itemkey))) then

92: -- detect the error directly here.
93: if (itemkey = wf_engine.eng_synch) then
94: if ((not rootflag) and
95: ((nvl(wf_engine_util.app_itemtype, 'x') <> itemtype) or
96: (nvl(wf_engine_util.app_itemkey, 'x') <> itemkey))) then
97: Wf_Core.Token('ITEMTYPE', itemtype);
98: Wf_Core.Token('ITEMKEY', itemkey);
99: Wf_Core.Raise('WFENG_SYNCH_ITEM');
100: end if;

Line 106: (nvl(wf_engine_util.app_itemtype, 'x') <> itemtype) or

102:
103: -- If this is the root process, OR this is a different item,
104: -- then re-initialize the stack.
105: if ((rootflag) or
106: (nvl(wf_engine_util.app_itemtype, 'x') <> itemtype) or
107: (nvl(wf_engine_util.app_itemkey, 'x') <> itemkey)) then
108: wf_engine_util.app_itemtype := itemtype;
109: wf_engine_util.app_itemkey := itemkey;
110: wf_engine_util.app_level := 0;

Line 107: (nvl(wf_engine_util.app_itemkey, 'x') <> itemkey)) then

103: -- If this is the root process, OR this is a different item,
104: -- then re-initialize the stack.
105: if ((rootflag) or
106: (nvl(wf_engine_util.app_itemtype, 'x') <> itemtype) or
107: (nvl(wf_engine_util.app_itemkey, 'x') <> itemkey)) then
108: wf_engine_util.app_itemtype := itemtype;
109: wf_engine_util.app_itemkey := itemkey;
110: wf_engine_util.app_level := 0;
111: end if;

Line 108: wf_engine_util.app_itemtype := itemtype;

104: -- then re-initialize the stack.
105: if ((rootflag) or
106: (nvl(wf_engine_util.app_itemtype, 'x') <> itemtype) or
107: (nvl(wf_engine_util.app_itemkey, 'x') <> itemkey)) then
108: wf_engine_util.app_itemtype := itemtype;
109: wf_engine_util.app_itemkey := itemkey;
110: wf_engine_util.app_level := 0;
111: end if;
112:

Line 109: wf_engine_util.app_itemkey := itemkey;

105: if ((rootflag) or
106: (nvl(wf_engine_util.app_itemtype, 'x') <> itemtype) or
107: (nvl(wf_engine_util.app_itemkey, 'x') <> itemkey)) then
108: wf_engine_util.app_itemtype := itemtype;
109: wf_engine_util.app_itemkey := itemkey;
110: wf_engine_util.app_level := 0;
111: end if;
112:
113: -- Add the process to the stack

Line 110: wf_engine_util.app_level := 0;

106: (nvl(wf_engine_util.app_itemtype, 'x') <> itemtype) or
107: (nvl(wf_engine_util.app_itemkey, 'x') <> itemkey)) then
108: wf_engine_util.app_itemtype := itemtype;
109: wf_engine_util.app_itemkey := itemkey;
110: wf_engine_util.app_level := 0;
111: end if;
112:
113: -- Add the process to the stack
114: wf_engine_util.app_level := wf_engine_util.app_level + 1;

Line 114: wf_engine_util.app_level := wf_engine_util.app_level + 1;

110: wf_engine_util.app_level := 0;
111: end if;
112:
113: -- Add the process to the stack
114: wf_engine_util.app_level := wf_engine_util.app_level + 1;
115: wf_engine_util.app_parent_itemtype(wf_engine_util.app_level) := act_itemtype;
116: wf_engine_util.app_parent_name(wf_engine_util.app_level) := act_name;
117: wf_engine_util.app_parent_id(wf_engine_util.app_level) := actid;
118: exception

Line 115: wf_engine_util.app_parent_itemtype(wf_engine_util.app_level) := act_itemtype;

111: end if;
112:
113: -- Add the process to the stack
114: wf_engine_util.app_level := wf_engine_util.app_level + 1;
115: wf_engine_util.app_parent_itemtype(wf_engine_util.app_level) := act_itemtype;
116: wf_engine_util.app_parent_name(wf_engine_util.app_level) := act_name;
117: wf_engine_util.app_parent_id(wf_engine_util.app_level) := actid;
118: exception
119: when others then

Line 116: wf_engine_util.app_parent_name(wf_engine_util.app_level) := act_name;

112:
113: -- Add the process to the stack
114: wf_engine_util.app_level := wf_engine_util.app_level + 1;
115: wf_engine_util.app_parent_itemtype(wf_engine_util.app_level) := act_itemtype;
116: wf_engine_util.app_parent_name(wf_engine_util.app_level) := act_name;
117: wf_engine_util.app_parent_id(wf_engine_util.app_level) := actid;
118: exception
119: when others then
120: Wf_Core.Context('Wf_Engine_Util', 'AddProcessStack',

Line 117: wf_engine_util.app_parent_id(wf_engine_util.app_level) := actid;

113: -- Add the process to the stack
114: wf_engine_util.app_level := wf_engine_util.app_level + 1;
115: wf_engine_util.app_parent_itemtype(wf_engine_util.app_level) := act_itemtype;
116: wf_engine_util.app_parent_name(wf_engine_util.app_level) := act_name;
117: wf_engine_util.app_parent_id(wf_engine_util.app_level) := actid;
118: exception
119: when others then
120: Wf_Core.Context('Wf_Engine_Util', 'AddProcessStack',
121: itemtype, itemkey, act_itemtype, act_name, to_char(actid));

Line 120: Wf_Core.Context('Wf_Engine_Util', 'AddProcessStack',

116: wf_engine_util.app_parent_name(wf_engine_util.app_level) := act_name;
117: wf_engine_util.app_parent_id(wf_engine_util.app_level) := actid;
118: exception
119: when others then
120: Wf_Core.Context('Wf_Engine_Util', 'AddProcessStack',
121: itemtype, itemkey, act_itemtype, act_name, to_char(actid));
122: raise;
123: end AddProcessStack;
124:

Line 143: if (nvl(wf_engine_util.app_level, 0) > 0) then

139: begin
140: -- If this is the top process on the stack, pop it off.
141: -- Must check if type/key/actid match, in case items and processes
142: -- are being interwoven and this is not the correct stack.
143: if (nvl(wf_engine_util.app_level, 0) > 0) then
144: if ((wf_engine_util.app_itemtype = itemtype) and
145: (wf_engine_util.app_itemkey = itemkey) and
146: (wf_engine_util.app_parent_id(wf_engine_util.app_level) = actid)) then
147: wf_engine_util.app_level := wf_engine_util.app_level - 1;

Line 144: if ((wf_engine_util.app_itemtype = itemtype) and

140: -- If this is the top process on the stack, pop it off.
141: -- Must check if type/key/actid match, in case items and processes
142: -- are being interwoven and this is not the correct stack.
143: if (nvl(wf_engine_util.app_level, 0) > 0) then
144: if ((wf_engine_util.app_itemtype = itemtype) and
145: (wf_engine_util.app_itemkey = itemkey) and
146: (wf_engine_util.app_parent_id(wf_engine_util.app_level) = actid)) then
147: wf_engine_util.app_level := wf_engine_util.app_level - 1;
148: end if;

Line 145: (wf_engine_util.app_itemkey = itemkey) and

141: -- Must check if type/key/actid match, in case items and processes
142: -- are being interwoven and this is not the correct stack.
143: if (nvl(wf_engine_util.app_level, 0) > 0) then
144: if ((wf_engine_util.app_itemtype = itemtype) and
145: (wf_engine_util.app_itemkey = itemkey) and
146: (wf_engine_util.app_parent_id(wf_engine_util.app_level) = actid)) then
147: wf_engine_util.app_level := wf_engine_util.app_level - 1;
148: end if;
149: end if;

Line 146: (wf_engine_util.app_parent_id(wf_engine_util.app_level) = actid)) then

142: -- are being interwoven and this is not the correct stack.
143: if (nvl(wf_engine_util.app_level, 0) > 0) then
144: if ((wf_engine_util.app_itemtype = itemtype) and
145: (wf_engine_util.app_itemkey = itemkey) and
146: (wf_engine_util.app_parent_id(wf_engine_util.app_level) = actid)) then
147: wf_engine_util.app_level := wf_engine_util.app_level - 1;
148: end if;
149: end if;
150: exception

Line 147: wf_engine_util.app_level := wf_engine_util.app_level - 1;

143: if (nvl(wf_engine_util.app_level, 0) > 0) then
144: if ((wf_engine_util.app_itemtype = itemtype) and
145: (wf_engine_util.app_itemkey = itemkey) and
146: (wf_engine_util.app_parent_id(wf_engine_util.app_level) = actid)) then
147: wf_engine_util.app_level := wf_engine_util.app_level - 1;
148: end if;
149: end if;
150: exception
151: when others then

Line 152: Wf_Core.Context('Wf_Engine_Util', 'RemoveProcessStack', itemtype,

148: end if;
149: end if;
150: exception
151: when others then
152: Wf_Core.Context('Wf_Engine_Util', 'RemoveProcessStack', itemtype,
153: itemkey, to_char(actid));
154: raise;
155: end RemoveProcessStack;
156:

Line 196: if ((nvl(wf_engine_util.app_level, 0) > 0) and

192: -- 1. Itemtype and key
193: -- 2. Parent type and name
194: -- are the same, then the parent id must be the same.
195: -- Return it directly.
196: if ((nvl(wf_engine_util.app_level, 0) > 0) and
197: (itemtype = wf_engine_util.app_itemtype) and
198: (itemkey = wf_engine_util.app_itemkey)) then
199: for i in reverse 1 .. wf_engine_util.app_level loop
200: if ((WF_CACHE.ProcessActivities(actid).PROCESS_ITEM_TYPE =

Line 197: (itemtype = wf_engine_util.app_itemtype) and

193: -- 2. Parent type and name
194: -- are the same, then the parent id must be the same.
195: -- Return it directly.
196: if ((nvl(wf_engine_util.app_level, 0) > 0) and
197: (itemtype = wf_engine_util.app_itemtype) and
198: (itemkey = wf_engine_util.app_itemkey)) then
199: for i in reverse 1 .. wf_engine_util.app_level loop
200: if ((WF_CACHE.ProcessActivities(actid).PROCESS_ITEM_TYPE =
201: wf_engine_util.app_parent_itemtype(i)) and

Line 198: (itemkey = wf_engine_util.app_itemkey)) then

194: -- are the same, then the parent id must be the same.
195: -- Return it directly.
196: if ((nvl(wf_engine_util.app_level, 0) > 0) and
197: (itemtype = wf_engine_util.app_itemtype) and
198: (itemkey = wf_engine_util.app_itemkey)) then
199: for i in reverse 1 .. wf_engine_util.app_level loop
200: if ((WF_CACHE.ProcessActivities(actid).PROCESS_ITEM_TYPE =
201: wf_engine_util.app_parent_itemtype(i)) and
202: (WF_CACHE.ProcessActivities(actid).PROCESS_NAME =

Line 199: for i in reverse 1 .. wf_engine_util.app_level loop

195: -- Return it directly.
196: if ((nvl(wf_engine_util.app_level, 0) > 0) and
197: (itemtype = wf_engine_util.app_itemtype) and
198: (itemkey = wf_engine_util.app_itemkey)) then
199: for i in reverse 1 .. wf_engine_util.app_level loop
200: if ((WF_CACHE.ProcessActivities(actid).PROCESS_ITEM_TYPE =
201: wf_engine_util.app_parent_itemtype(i)) and
202: (WF_CACHE.ProcessActivities(actid).PROCESS_NAME =
203: wf_engine_util.app_parent_name(i))) then

Line 201: wf_engine_util.app_parent_itemtype(i)) and

197: (itemtype = wf_engine_util.app_itemtype) and
198: (itemkey = wf_engine_util.app_itemkey)) then
199: for i in reverse 1 .. wf_engine_util.app_level loop
200: if ((WF_CACHE.ProcessActivities(actid).PROCESS_ITEM_TYPE =
201: wf_engine_util.app_parent_itemtype(i)) and
202: (WF_CACHE.ProcessActivities(actid).PROCESS_NAME =
203: wf_engine_util.app_parent_name(i))) then
204: -- Found a match.
205: return(wf_engine_util.app_parent_id(i));

Line 203: wf_engine_util.app_parent_name(i))) then

199: for i in reverse 1 .. wf_engine_util.app_level loop
200: if ((WF_CACHE.ProcessActivities(actid).PROCESS_ITEM_TYPE =
201: wf_engine_util.app_parent_itemtype(i)) and
202: (WF_CACHE.ProcessActivities(actid).PROCESS_NAME =
203: wf_engine_util.app_parent_name(i))) then
204: -- Found a match.
205: return(wf_engine_util.app_parent_id(i));
206: end if;
207: end loop;

Line 205: return(wf_engine_util.app_parent_id(i));

201: wf_engine_util.app_parent_itemtype(i)) and
202: (WF_CACHE.ProcessActivities(actid).PROCESS_NAME =
203: wf_engine_util.app_parent_name(i))) then
204: -- Found a match.
205: return(wf_engine_util.app_parent_id(i));
206: end if;
207: end loop;
208: end if;
209:

Line 246: Wf_Engine_Util.AddProcessStack(itemtype, itemkey,

242: AND WIAS.ITEM_TYPE = activity_parent_process.itemtype
243: AND WIAS.ITEM_KEY = activity_parent_process.itemkey;
244:
245: -- Re-initialize process stack, starting with the new value
246: Wf_Engine_Util.AddProcessStack(itemtype, itemkey,
247: WF_CACHE.ProcessActivities(actid).PROCESS_ITEM_TYPE,
248: WF_CACHE.ProcessActivities(actid).PROCESS_NAME, parentid, TRUE);
249:
250: return parentid;

Line 253: Wf_Core.Context('Wf_Engine_Util', 'Activity_Parent_Process',

249:
250: return parentid;
251: exception
252: when no_data_found then
253: Wf_Core.Context('Wf_Engine_Util', 'Activity_Parent_Process',
254: to_char(actid));
255: Wf_Core.Token('ITEMTYPE', itemtype);
256: Wf_Core.Token('ITEMKEY', itemkey);
257: Wf_Core.Token('CHILDPROCESS', to_char(actid));

Line 261: Wf_Core.Context('Wf_Engine_Util', 'Activity_Parent_Process',

257: Wf_Core.Token('CHILDPROCESS', to_char(actid));
258: Wf_Core.Token('FUNCTION', 'Activity_Parent_Process');
259: Wf_Core.Raise('WFSQL_INTERNAL');
260: when others then
261: Wf_Core.Context('Wf_Engine_Util', 'Activity_Parent_Process',
262: to_char(actid));
263: raise;
264:
265: end activity_parent_process;

Line 344: Wf_Engine_Util.Execute_Post_NTF_Function(itemtype, itemkey, actid,

340:
341: if (runpntf and (acttype = wf_engine.eng_notification)) then
342: -- First execute possible post-notification function to see if activity
343: -- should really complete.
344: Wf_Engine_Util.Execute_Post_NTF_Function(itemtype, itemkey, actid,
345: wf_engine.eng_run, pntfstatus, pntfresult);
346:
347: if (pntfstatus = wf_engine.eng_waiting) then
348: -- Either post-notification function is not complete, or error occurred.

Line 355: -- Wf_Engine_Util.processtimeout

351: -- Bug 2078211
352: -- if the status is waiting and the input parameter result is
353: -- wf_engine.eng_timedout, continue executing as the activity
354: -- needs to be timedout as determined by the procedure
355: -- Wf_Engine_Util.processtimeout
356:
357: if (result = wf_engine.eng_timedout) then
358: lresult := result;
359: else

Line 381: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, actid);

377: wf_engine.eng_completed, lresult, '', SYSDATE);
378:
379: if (acttype = wf_engine.eng_process) then
380: -- If this activity is a process, kill any deferred children.
381: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, actid);
382:
383: -- Remove myself from the process call stack
384: Wf_Engine_Util.RemoveProcessStack(itemtype, itemkey, actid);
385: elsif (acttype = wf_engine.eng_notification) then

Line 384: Wf_Engine_Util.RemoveProcessStack(itemtype, itemkey, actid);

380: -- If this activity is a process, kill any deferred children.
381: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, actid);
382:
383: -- Remove myself from the process call stack
384: Wf_Engine_Util.RemoveProcessStack(itemtype, itemkey, actid);
385: elsif (acttype = wf_engine.eng_notification) then
386: -- Cancel any outstanding notifications for this activity if
387: -- a response is expected.
388: -- (Response expected is signalled by a non-null result)

Line 418: Wf_Engine_Util.Activity_Parent_Process(itemtype, itemkey, actid),

414: -- for activities following this one.
415: -- SYNCHMODE: No need to check, parent must always be active.
416: if (itemkey <> wf_engine.eng_synch) then
417: Wf_Item_Activity_Status.Status(itemtype, itemkey,
418: Wf_Engine_Util.Activity_Parent_Process(itemtype, itemkey, actid),
419: parent_status);
420: if (parent_status in (wf_engine.eng_completed, wf_engine.eng_error)) then
421: return;
422: end if;

Line 455: Wf_Engine_Util.Complete_Activity(itemtype, itemkey,

451:
452: end if;
453:
454: -- Complete the parent process and return immediately.
455: Wf_Engine_Util.Complete_Activity(itemtype, itemkey,
456: Wf_Engine_Util.Activity_Parent_Process(itemtype, itemkey, actid),
457: WF_CACHE.ProcessActivities(complete_activity.actid).DEFAULT_RESULT);
458: return;
459: end if;

Line 456: Wf_Engine_Util.Activity_Parent_Process(itemtype, itemkey, actid),

452: end if;
453:
454: -- Complete the parent process and return immediately.
455: Wf_Engine_Util.Complete_Activity(itemtype, itemkey,
456: Wf_Engine_Util.Activity_Parent_Process(itemtype, itemkey, actid),
457: WF_CACHE.ProcessActivities(complete_activity.actid).DEFAULT_RESULT);
458: return;
459: end if;
460:

Line 560: Wf_Engine_Util.Process_Activity(itemtype, itemkey,

556:
557: i := 0;
558: -- While loop to hande the next transition activities.
559: while (childarr(i) is not NULL) loop
560: Wf_Engine_Util.Process_Activity(itemtype, itemkey,
561: childarr(i),
562: WF_ENGINE.THRESHOLD);
563: i := i+1;
564: end loop;

Line 568: Wf_Core.Context('Wf_Engine_Util', 'Complete_Activity', itemtype, itemkey,

564: end loop;
565:
566: exception
567: when others then
568: Wf_Core.Context('Wf_Engine_Util', 'Complete_Activity', itemtype, itemkey,
569: actid, result);
570: raise;
571: end complete_activity;
572:

Line 664: Wf_Engine_Util.AddProcessStack(itemtype, itemkey, itemtype, process,

660: wf_engine.eng_active, wf_engine.eng_null, SYSDATE, null,
661: newStatus=>TRUE);
662:
663: -- Initialize process call stack with the root process.
664: Wf_Engine_Util.AddProcessStack(itemtype, itemkey, itemtype, process,
665: processid, TRUE);
666:
667: -- Get the cost of the parent process.
668: -- If the cost is over the threshold, then set a flag to immediately

Line 834: Wf_Engine_Util.Process_Activity(itemtype, itemkey, childarr(i),

830: else -- Must be START mode, and not deferred
831: -- Process start activity normally
832: if (itemkey = wf_engine.eng_synch) then
833: -- SYNCHMODE: No fancy error processing!
834: Wf_Engine_Util.Process_Activity(itemtype, itemkey, childarr(i),
835: WF_ENGINE.THRESHOLD);
836: else
837: begin
838: savepoint wf_savepoint;

Line 839: Wf_Engine_Util.Process_Activity(itemtype, itemkey, childarr(i),

835: WF_ENGINE.THRESHOLD);
836: else
837: begin
838: savepoint wf_savepoint;
839: Wf_Engine_Util.Process_Activity(itemtype, itemkey, childarr(i),
840: WF_ENGINE.THRESHOLD);
841: exception
842: when trig_savepoint or dist_savepoint then
843: -- Oops, you forgot to defer your trigger or distributed

Line 858: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, processid,

854: rollback to wf_savepoint;
855: Wf_Core.Context('Wf_Engine', 'Start_Process_Internal', itemtype, itemkey);
856: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, processid,
857: wf_engine.eng_exception, FALSE);
858: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, processid,
859: wf_engine.eng_exception);
860: Wf_Core.Clear;
861: return;
862: end;

Line 884: Wf_Core.Context('Wf_Engine_Util', 'Start_Process_Internal',

880: (not WF_ENGINE.debug)) then
881: Wf_Item.ClearCache;
882: end if;
883:
884: Wf_Core.Context('Wf_Engine_Util', 'Start_Process_Internal',
885: itemtype, itemkey);
886: raise;
887: end Start_Process_Internal;
888:

Line 952: Wf_Engine_Util.Activity_Parent_Process(itemtype, itemkey, actid),

948: -- Check this activity's parent process
949: -- SYNCHMODE: No need to check parent, will always be active.
950: if (itemkey <> wf_engine.eng_synch) then
951: Wf_Item_Activity_Status.Status(itemtype, itemkey,
952: Wf_Engine_Util.Activity_Parent_Process(itemtype, itemkey, actid),
953: status);
954:
955: if (status is null) then
956: -- return WF_PARENT_PROCESS_NOT_RUNNING;

Line 1022: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, actid, TRUE);

1018: -- No loop - do nothing
1019: return;
1020: elsif (rerun = wf_engine.eng_reset) then
1021: -- Reset activities, cancel mode
1022: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, actid, TRUE);
1023: elsif (rerun = wf_engine.eng_loop) then
1024: -- Reset activities, no-cancel mode
1025: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, actid, FALSE);
1026: end if;

Line 1025: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, actid, FALSE);

1021: -- Reset activities, cancel mode
1022: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, actid, TRUE);
1023: elsif (rerun = wf_engine.eng_loop) then
1024: -- Reset activities, no-cancel mode
1025: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, actid, FALSE);
1026: end if;
1027: elsif ((status = wf_engine.eng_suspended) AND
1028: (acttype <> wf_engine.eng_process))then
1029: -- Only the process type of activity can have a 'SUSPENDED' status

Line 1071: Wf_Engine_Util.AddProcessStack(itemtype, itemkey, act_itemtype,

1067: if (acttype = wf_engine.eng_process) then
1068: -- PROCESS activity
1069: -- Add this subprocess to the call stack
1070: Wf_Process_Activity.ActivityName(actid, act_itemtype, act_name);
1071: Wf_Engine_Util.AddProcessStack(itemtype, itemkey, act_itemtype,
1072: act_name, actid, FALSE);
1073:
1074: -- For loop to get all the start activities first.
1075: -- This is to avoid the maximum open cursor problem

Line 1092: Wf_Engine_Util.Process_Activity(itemtype, itemkey, childarr(i),

1088:
1089: -- While loop to handle all the start activities
1090: i := 0;
1091: while(childarr(i) is not null) loop
1092: Wf_Engine_Util.Process_Activity(itemtype, itemkey, childarr(i),
1093: threshold);
1094: i := i+1;
1095: end loop;
1096: else

Line 1099: Wf_Engine_Util.Execute_Activity(itemtype, itemkey, actid,

1095: end loop;
1096: else
1097: -- Function/Notification/Event type activities
1098: begin
1099: Wf_Engine_Util.Execute_Activity(itemtype, itemkey, actid,
1100: wf_engine.eng_run);
1101: exception
1102: when trig_savepoint or dist_savepoint then
1103: -- Oops, you forgot to defer your trigger or distributed

Line 1124: Wf_Core.Context('Wf_Engine_Util', 'Process_Activity', itemtype, itemkey,

1120:
1121: return;
1122: exception
1123: when others then
1124: Wf_Core.Context('Wf_Engine_Util', 'Process_Activity', itemtype, itemkey,
1125: to_char(actid), to_char(threshold));
1126: raise;
1127: end process_activity;
1128:

Line 1217: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, childarr(i), cancel);

1213:
1214: -- Reset all starting activities of child process.
1215: i := 0;
1216: while (childarr(i) is not null) loop
1217: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, childarr(i), cancel);
1218: i := i + 1;
1219: end loop;
1220: elsif (typ = wf_engine.eng_notification) then
1221: if (cancel) then

Line 1223: Wf_Engine_Util.Execute_Post_NTF_Function(itemtype, itemkey, actid,

1219: end loop;
1220: elsif (typ = wf_engine.eng_notification) then
1221: if (cancel) then
1222: -- Run post-notification function in cancel mode if there is one.
1223: Wf_Engine_Util.Execute_Post_NTF_Function(itemtype, itemkey, actid,
1224: wf_engine.eng_cancel, pntfstatus, pntfresult);
1225:
1226: -- Cancel any open notifications sent by this activity
1227: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,

Line 1241: Wf_Engine_Util.Execute_Activity(itemtype, itemkey, actid,

1237: end if;
1238: elsif (typ in (wf_engine.eng_function, wf_engine.eng_event)) then
1239: if (cancel) then
1240: -- Call function in cancel mode
1241: Wf_Engine_Util.Execute_Activity(itemtype, itemkey, actid,
1242: wf_engine.eng_cancel);
1243: end if;
1244: end if;
1245:

Line 1250: Wf_Engine_Util.Move_To_History(itemtype, itemkey, actid);

1246: -- Move the WIAS record to the history table.
1247: -- Note: Do NOT move this call. The move_to_history() must be before any
1248: -- recursive calls to reset_activities() in the current process,
1249: -- or infinite recursion will result.
1250: Wf_Engine_Util.Move_To_History(itemtype, itemkey, actid);
1251:
1252: -- Reset all activities following this one in current process,
1253: -- but only if this activity really completed.
1254: if (status = wf_engine.eng_completed) then

Line 1338: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, childarr(i), cancel);

1334: childarr(i) := '';
1335:
1336: i := 0;
1337: while (childarr(i) is not null) loop
1338: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, childarr(i), cancel);
1339: i := i + 1;
1340: end loop;
1341: end if;
1342:

Line 1354: Wf_Core.Context('Wf_Engine_Util', 'Reset_Activities', itemtype, itemkey,

1350: end if;
1351: --
1352: exception
1353: when others then
1354: Wf_Core.Context('Wf_Engine_Util', 'Reset_Activities', itemtype, itemkey,
1355: to_char(actid));
1356: raise;
1357: end reset_activities;
1358:

Line 1431: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, goalid, TRUE);

1427: begin
1428: -- Goal has been found. Reset the activity and all following it on this
1429: -- level, then set status to waiting for possible re-execution.
1430: if (rootid = goalid) then
1431: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, goalid, TRUE);
1432: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, goalid,
1433: wf_engine.eng_active, wf_engine.eng_null, sysdate, null);
1434: return(TRUE);
1435: end if;

Line 1447: if (Wf_Engine_Util.Reset_Tree(itemtype, itemkey, childarr(i), goalid,

1443:
1444: i := 0;
1445: while (childarr(i) is not null) loop
1446: -- Check if goal is in the subtree rooted at this child
1447: if (Wf_Engine_Util.Reset_Tree(itemtype, itemkey, childarr(i), goalid,
1448: actdate)) then
1449:
1450: -- Goal has been found in a child of this activity.
1451: Wf_Item_Activity_Status.Result(itemtype, itemkey, rootid,

Line 1545: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, actarr(j), TRUE);

1541: actarr(j) := '';
1542:
1543: j := 0;
1544: while (actarr(j) is not null) loop
1545: Wf_Engine_Util.Reset_Activities(itemtype, itemkey, actarr(j), TRUE);
1546: j := j + 1;
1547: end loop;
1548: end if;
1549:

Line 1577: Wf_Core.Context('Wf_Engine_Util', 'Reset_Tree', itemtype, itemkey,

1573: -- Goal not found anywhere.
1574: return(FALSE);
1575: exception
1576: when others then
1577: Wf_Core.Context('Wf_Engine_Util', 'Reset_Tree', itemtype, itemkey,
1578: to_char(rootid), to_char(goalid), to_char(actdate));
1579: raise;
1580: end Reset_Tree;
1581:

Line 1697: Wf_Core.Context('Wf_Engine_Util', 'Move_To_History', itemtype, itemkey,

1693: Wf_Item_Activity_Status.Delete_Status(itemtype, itemkey, actid);
1694:
1695: EXCEPTION
1696: when OTHERS then
1697: Wf_Core.Context('Wf_Engine_Util', 'Move_To_History', itemtype, itemkey,
1698: to_char(actid));
1699: raise;
1700:
1701: END move_to_history;

Line 1743: Wf_Engine_Util.Notification(itemtype, itemkey, actid, funmode, result);

1739: -- Execute the activity function
1740: Wf_Core.Clear;
1741: begin
1742: if (acttype = wf_engine.eng_notification) then
1743: Wf_Engine_Util.Notification(itemtype, itemkey, actid, funmode, result);
1744: elsif (acttype = wf_engine.eng_function) then
1745: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid,
1746: funmode, result);
1747: elsif (acttype = wf_engine.eng_event) then

Line 1745: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid,

1741: begin
1742: if (acttype = wf_engine.eng_notification) then
1743: Wf_Engine_Util.Notification(itemtype, itemkey, actid, funmode, result);
1744: elsif (acttype = wf_engine.eng_function) then
1745: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid,
1746: funmode, result);
1747: elsif (acttype = wf_engine.eng_event) then
1748: Wf_Engine_Util.Event_Activity(itemtype, itemkey, actid, funmode, result);
1749: else

Line 1748: Wf_Engine_Util.Event_Activity(itemtype, itemkey, actid, funmode, result);

1744: elsif (acttype = wf_engine.eng_function) then
1745: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid,
1746: funmode, result);
1747: elsif (acttype = wf_engine.eng_event) then
1748: Wf_Engine_Util.Event_Activity(itemtype, itemkey, actid, funmode, result);
1749: else
1750: -- Bad activity type, don't know how to execute.
1751: Wf_Core.Token('ITEM_TYPE', itemtype);
1752: Wf_Core.Token('ITEM_KEY', itemkey);

Line 1794: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid, id);

1790: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
1791: wf_engine.eng_error, id);
1792:
1793: -- Call error_process to execute any error processes.
1794: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid, id);
1795:
1796: elsif (result = wf_engine.eng_waiting) then
1797: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
1798: wf_engine.eng_waiting, '', to_date(NULL), to_date(NULL));

Line 1845: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);

1841: -- Call complete_activity here to continue processing immediately
1842: -- instead of just marking activity as notified.
1843:
1844: result := Wf_Engine.GetItemAttrText(itemtype, itemkey, 'RESULT');
1845: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
1846:
1847: else
1848: -- Notification not auto-routed, or pseudo-notification.
1849: -- In either case, mark status NOTIFIED to block execution.

Line 1863: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);

1859: else
1860: result := substr(result, 1, 30);
1861: end if;
1862:
1863: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
1864: end if;
1865:
1866: exception
1867: when others then

Line 1868: Wf_Core.Context('Wf_Engine_Util', 'Execute_Activity', itemtype, itemkey,

1864: end if;
1865:
1866: exception
1867: when others then
1868: Wf_Core.Context('Wf_Engine_Util', 'Execute_Activity', itemtype, itemkey,
1869: to_char(actid), funmode);
1870: raise;
1871: end execute_activity;
1872:

Line 1927: temp := Wf_Engine_Util.Execute_Selector_Function(itemtype, itemkey,

1923: wf_engine.setctx_itemtype := itemtype;
1924: wf_engine.setctx_itemkey := itemkey;
1925:
1926: -- check TEST_CTX
1927: temp := Wf_Engine_Util.Execute_Selector_Function(itemtype, itemkey,
1928: wf_engine.eng_testctx);
1929: if (nvl(temp, 'TRUE') = 'TRUE' ) then
1930: -- it does not care about the context (null)
1931: -- or the context is already correct ('TRUE')

Line 1959: temp := Wf_Engine_Util.Execute_Selector_Function(itemtype, itemkey,

1955: return;
1956: end if;
1957:
1958: if (setctx_mode) then
1959: temp := Wf_Engine_Util.Execute_Selector_Function(itemtype, itemkey,
1960: wf_engine.eng_setctx);
1961: end if;
1962: end if;
1963:

Line 1971: 'wf.plsql.wf_engine_util.function_call.actfunc_callout',

1967: '012345678901234567890123456789012345678901234567890123456789';
1968:
1969: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1970: wf_log_pkg.string2(wf_log_pkg.level_statement,
1971: 'wf.plsql.wf_engine_util.function_call.actfunc_callout',
1972: 'Start executing PLSQL procedure - '||funname, true);
1973: end if;
1974:
1975: Wf_Function_Call.Execute(funname, itemtype, itemkey, actid, funmode,

Line 1995: 'wf.plsql.wf_engine_util.function_call.actfunc_callout',

1991: end if;
1992:
1993: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1994: wf_log_pkg.string2(wf_log_pkg.level_statement,
1995: 'wf.plsql.wf_engine_util.function_call.actfunc_callout',
1996: 'End executing PLSQL procedure - '||funname, false);
1997: end if;
1998:
1999: -- Check for no return value error.

Line 2054: Wf_Core.Context('Wf_Engine_Util', 'Function_Call', funname, itemtype,

2050: when OTHERS then
2051: wf_engine.setctx_itemtype := '';
2052: wf_engine.setctx_itemkey := '';
2053: result := wf_engine.eng_error;
2054: Wf_Core.Context('Wf_Engine_Util', 'Function_Call', funname, itemtype,
2055: itemkey, to_char(actid), funmode);
2056: raise;
2057: end function_call;
2058:

Line 2108: Wf_Engine_Util.Function_Call(WF_CACHE.ItemTypes(witIND).WF_SELECTOR,

2104: end if;
2105:
2106: -- Call selector function
2107: begin
2108: Wf_Engine_Util.Function_Call(WF_CACHE.ItemTypes(witIND).WF_SELECTOR,
2109: itemtype, itemkey, null, runmode, result);
2110: exception
2111: when others then
2112: -- If this is setctx call and the function failed, unset the setctx

Line 2133: Wf_Core.Context('Wf_Engine_Util', 'Execute_Selector_Function',

2129: return(null);
2130: end if;
2131: exception
2132: when others then
2133: Wf_Core.Context('Wf_Engine_Util', 'Execute_Selector_Function',
2134: itemtype, itemkey, runmode);
2135: raise;
2136: end Execute_Selector_Function;
2137:

Line 2163: root := Wf_Engine_Util.Execute_Selector_Function(itemtype, itemkey,

2159: process varchar2(30); -- Start activity parent process
2160: label varchar2(30); -- Start activity instance label
2161: begin
2162: -- Look for selector function to execute
2163: root := Wf_Engine_Util.Execute_Selector_Function(itemtype, itemkey,
2164: wf_engine.eng_run);
2165:
2166: -- Return root function if one found
2167: if (root is not null) then

Line 2238: Wf_Core.Context('Wf_Engine_Util', 'Get_Root_Process', itemtype, itemkey,

2234:
2235: return(root);
2236: exception
2237: when others then
2238: Wf_Core.Context('Wf_Engine_Util', 'Get_Root_Process', itemtype, itemkey,
2239: activity);
2240: raise;
2241: end Get_Root_Process;
2242:

Line 2299: Wf_Core.Context('Wf_Engine_Util', 'Process_kill_childprocess', itemtype, itemkey);

2295: end loop;
2296: */
2297: exception
2298: when others then
2299: Wf_Core.Context('Wf_Engine_Util', 'Process_kill_childprocess', itemtype, itemkey);
2300: raise;
2301: end Process_kill_childprocess;
2302:
2303: --

Line 2376: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, childid);

2372:
2373: if (Wf_Activity.Instance_Type(childid, actdate) =
2374: wf_engine.eng_process) then
2375: -- If child is a process then recursively kill its children
2376: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, childid);
2377: else
2378: -- Cancel any open notifications sent by this activity
2379: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey,
2380: childid, notid, user);

Line 2411: Wf_Core.Context('Wf_Engine_Util', 'Process_Kill_Children', itemtype,

2407: end loop;
2408:
2409: exception
2410: when others then
2411: Wf_Core.Context('Wf_Engine_Util', 'Process_Kill_Children', itemtype,
2412: itemkey, to_char(processid));
2413: raise;
2414:
2415: end process_kill_children;

Line 2480: Wf_Core.Context('Wf_Engine_Util', 'Suspend_Child_Processes', itemtype,

2476: end loop;
2477:
2478: exception
2479: when others then
2480: Wf_Core.Context('Wf_Engine_Util', 'Suspend_Child_Processes', itemtype,
2481: itemkey, to_char(processid));
2482: raise;
2483: end suspend_child_processes;
2484:

Line 2544: Wf_Core.Context('Wf_Engine_Util', 'Resume_Child_Processes', itemtype,

2540: end loop;
2541:
2542: exception
2543: when others then
2544: Wf_Core.Context('Wf_Engine_Util', 'Resume_Child_Processes', itemtype,
2545: itemkey, to_char(processid));
2546: raise;
2547: end resume_child_processes;
2548:

Line 2585: Wf_Engine_Util.Notification_Send(itemtype, itemkey, actid, msg, msgtype,

2581: Wf_Activity.Notification_Info(itemtype, itemkey, actid, msg, msgtype,
2582: expand_role);
2583: prole := Wf_Activity.Perform_Role(itemtype, itemkey, actid);
2584:
2585: Wf_Engine_Util.Notification_Send(itemtype, itemkey, actid, msg, msgtype,
2586: prole, expand_role, result);
2587:
2588: exception
2589: when others then

Line 2590: wf_core.context('Wf_Engine_Util', 'Notification', itemtype, itemkey,

2586: prole, expand_role, result);
2587:
2588: exception
2589: when others then
2590: wf_core.context('Wf_Engine_Util', 'Notification', itemtype, itemkey,
2591: to_char(actid), funcmode);
2592: raise;
2593: end Notification;
2594:

Line 2717: Wf_Core.Context('Wf_Engine_Util', 'Notification_Send', itemtype, itemkey,

2713: Wf_Engine.g_text := performer;
2714:
2715: exception
2716: when others then
2717: Wf_Core.Context('Wf_Engine_Util', 'Notification_Send', itemtype, itemkey,
2718: to_char(actid), msgtype||':'||msg);
2719: raise;
2720: end Notification_Send;
2721:

Line 2850: Wf_Core.Context('Wf_Engine_Util', 'Notification_Copy');

2846: nid:=gid;
2847:
2848: exception
2849: when others then
2850: Wf_Core.Context('Wf_Engine_Util', 'Notification_Copy');
2851: raise;
2852: end notification_copy;
2853:
2854: --Notification_refresh (PRIVATE)

Line 2923: Wf_Core.Context('Wf_Engine_Util', 'Notification_refresh');

2919:
2920:
2921: exception
2922: when others then
2923: Wf_Core.Context('Wf_Engine_Util', 'Notification_refresh');
2924: raise;
2925: end notification_refresh;
2926:
2927:

Line 2984: erractid := Wf_Engine_Util.Activity_Parent_Process(itemtype, itemkey,

2980:
2981: Wf_Activity.Error_Process(erractid, actdate, errortype, errorprocess);
2982:
2983: while ((errorprocess is null) and (erractid <> rootid)) loop
2984: erractid := Wf_Engine_Util.Activity_Parent_Process(itemtype, itemkey,
2985: erractid);
2986: Wf_Activity.Error_Process(erractid, actdate, errortype, errorprocess);
2987: end loop;
2988:

Line 3042: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3038: x_admin_mode => 'YES');
3039: -- look up the user key
3040: err_userkey := Wf_Engine.GetItemUserKey(itemtype, itemkey);
3041:
3042: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3043: 'ERROR_ITEM_TYPE', itemtype);
3044: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3045: 'ERROR_ITEM_KEY', itemkey);
3046: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

Line 3044: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3040: err_userkey := Wf_Engine.GetItemUserKey(itemtype, itemkey);
3041:
3042: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3043: 'ERROR_ITEM_TYPE', itemtype);
3044: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3045: 'ERROR_ITEM_KEY', itemkey);
3046: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3047: 'ERROR_ACTIVITY_LABEL', label);
3048: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',

Line 3046: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3042: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3043: 'ERROR_ITEM_TYPE', itemtype);
3044: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3045: 'ERROR_ITEM_KEY', itemkey);
3046: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3047: 'ERROR_ACTIVITY_LABEL', label);
3048: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',
3049: 'ERROR_ACTIVITY_ID', actid);
3050: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

Line 3048: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',

3044: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3045: 'ERROR_ITEM_KEY', itemkey);
3046: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3047: 'ERROR_ACTIVITY_LABEL', label);
3048: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',
3049: 'ERROR_ACTIVITY_ID', actid);
3050: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3051: 'ERROR_RESULT_CODE', result);
3052: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',

Line 3050: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3046: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3047: 'ERROR_ACTIVITY_LABEL', label);
3048: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',
3049: 'ERROR_ACTIVITY_ID', actid);
3050: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3051: 'ERROR_RESULT_CODE', result);
3052: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',
3053: 'ERROR_NOTIFICATION_ID', to_char(notid));
3054: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

Line 3052: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',

3048: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',
3049: 'ERROR_ACTIVITY_ID', actid);
3050: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3051: 'ERROR_RESULT_CODE', result);
3052: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',
3053: 'ERROR_NOTIFICATION_ID', to_char(notid));
3054: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3055: 'ERROR_ASSIGNED_USER', user);
3056: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

Line 3054: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3050: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3051: 'ERROR_RESULT_CODE', result);
3052: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',
3053: 'ERROR_NOTIFICATION_ID', to_char(notid));
3054: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3055: 'ERROR_ASSIGNED_USER', user);
3056: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3057: 'ERROR_NAME', errname);
3058: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

Line 3056: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3052: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'NUMBER',
3053: 'ERROR_NOTIFICATION_ID', to_char(notid));
3054: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3055: 'ERROR_ASSIGNED_USER', user);
3056: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3057: 'ERROR_NAME', errname);
3058: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3059: 'ERROR_MESSAGE', errmsg);
3060: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

Line 3058: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3054: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3055: 'ERROR_ASSIGNED_USER', user);
3056: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3057: 'ERROR_NAME', errname);
3058: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3059: 'ERROR_MESSAGE', errmsg);
3060: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3061: 'ERROR_STACK', errstack);
3062: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

Line 3060: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3056: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3057: 'ERROR_NAME', errname);
3058: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3059: 'ERROR_MESSAGE', errmsg);
3060: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3061: 'ERROR_STACK', errstack);
3062: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3063: 'ERROR_MONITOR_URL', err_url);
3064: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

Line 3062: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3058: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3059: 'ERROR_MESSAGE', errmsg);
3060: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3061: 'ERROR_STACK', errstack);
3062: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3063: 'ERROR_MONITOR_URL', err_url);
3064: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3065: 'ERROR_USER_KEY', err_userkey);
3066:

Line 3064: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',

3060: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3061: 'ERROR_STACK', errstack);
3062: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3063: 'ERROR_MONITOR_URL', err_url);
3064: Wf_Engine_Util.SetErrorItemAttr(errortype, errkey, 'TEXT',
3065: 'ERROR_USER_KEY', err_userkey);
3066:
3067: -- Run the error process.
3068: Wf_Engine.StartProcess(errortype, errkey);

Line 3174: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid, funmode,

3170:
3171:
3172: -- There is a post-notification function. Execute it.
3173: begin
3174: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid, funmode,
3175: result);
3176: exception
3177: -- Set error info columns if post-notification function raised exception,
3178: -- unless running in cancel mode.

Line 3212: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid, errcode);

3208: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
3209: wf_engine.eng_error, errcode);
3210:
3211: -- Call error_process to execute any error processes.
3212: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid, errcode);
3213:
3214: -- Return status waiting to prevent activity from completing.
3215: pntfstatus := wf_engine.eng_waiting;
3216: pntfresult := null;

Line 3239: Wf_Core.Context('Wf_Engine_Util', 'Execute_Post_NTF_Function', itemtype,

3235: end if;
3236: return;
3237: exception
3238: when others then
3239: Wf_Core.Context('Wf_Engine_Util', 'Execute_Post_NTF_Function', itemtype,
3240: itemkey, to_char(actid), funmode);
3241: raise;
3242: end Execute_Post_NTF_Function;
3243:

Line 3297: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid,

3293:
3294: wf_engine.context_user_key := wf_engine.GetItemUserKey(itemtype, itemkey);
3295:
3296: -- Call function in requested mode
3297: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid,
3298: funcmode, result);
3299:
3300: -- Error handling...
3301: -- 1. If function raises its own exception, let it trickle up.

Line 3343: Wf_Core.Context('Wf_Engine_Util', 'Execute_Notification_Callback',

3339: wf_engine.context_more_info_role := '';
3340: wf_engine.context_user_key := '';
3341: wf_engine.context_proxy := '';
3342:
3343: Wf_Core.Context('Wf_Engine_Util', 'Execute_Notification_Callback',
3344: funcmode, itemtype, itemkey, to_char(actid),
3345: to_char(ctx_nid)||':'||ctx_text);
3346: raise;
3347: end Execute_Notification_Callback;

Line 3841: Wf_Core.Context('Wf_Engine_Util', 'Event_Activity', itemtype,

3837: end if;
3838:
3839: exception
3840: when others then
3841: Wf_Core.Context('Wf_Engine_Util', 'Event_Activity', itemtype,
3842: itemkey, to_char(actid), funcmode);
3843: raise;
3844: end Event_Activity;
3845:

Line 3846: end Wf_Engine_Util;

3842: itemkey, to_char(actid), funcmode);
3843: raise;
3844: end Event_Activity;
3845:
3846: end Wf_Engine_Util;