DBA Data[Home] [Help]

APPS.WF_EVENT dependencies on WF_EVENT

Line 1: package body WF_EVENT as

1: package body WF_EVENT as
2: /* $Header: WFEVENTB.pls 120.12.12010000.3 2009/01/08 11:03:31 skandepu ship $ */
3: --------------------------------------------------------------------------
4: /*
5: ** PRIVATE global variables

Line 53: PROCEDURE setMessage(p_event in out nocopy wf_event_t)

49: /*
50: ** setMessage (PRIVATE) - Generate the Message for this event
51: ** if necessary
52: */
53: PROCEDURE setMessage(p_event in out nocopy wf_event_t)
54: is
55: msg clob;
56: func varchar2(240);
57: cmd varchar2(1000);

Line 68: l_event_obj wf_event_obj;

64: plsql_error EXCEPTION;
65: PRAGMA EXCEPTION_INIT(plsql_error, -06550);
66:
67: -- bes caching implementation
68: l_event_obj wf_event_obj;
69: begin
70: /*
71: ** mjc We are now going to call this from the dispatcher
72: ** if the subscription rule data is MESSAGE

Line 74: --if (wf_event.test(ename) = 'MESSAGE') then

70: /*
71: ** mjc We are now going to call this from the dispatcher
72: ** if the subscription rule data is MESSAGE
73: */
74: --if (wf_event.test(ename) = 'MESSAGE') then
75:
76: l_event_obj := wf_bes_cache.GetEventByName(ename);
77:
78: if (l_event_obj is null) then

Line 79: wf_core.context('Wf_Event', 'setMessage', ename, ekey);

75:
76: l_event_obj := wf_bes_cache.GetEventByName(ename);
77:
78: if (l_event_obj is null) then
79: wf_core.context('Wf_Event', 'setMessage', ename, ekey);
80: wf_core.raise('WFE_EVENT_NOTEXIST');
81: end if;
82:
83: func := l_event_obj.GENERATE_FUNCTION;

Line 89: 'wf.plsql.wf_event.SetMessage.genfunc_callout',

85: if (func is not null) then
86:
87: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
88: wf_log_pkg.string2(wf_log_pkg.level_statement,
89: 'wf.plsql.wf_event.SetMessage.genfunc_callout',
90: 'Start executing generate function - '||func, true);
91: end if;
92:
93: WF_BES_DYN_FUNCS.Generate(func,

Line 105: -- func came from WF_EVENTS.GENERATE_FUNCTION

101: of the parameter list as well. To make sure we are compatible
102: with 2.6.0, we catch any error if there are too many parameters
103: and try again with the old API signature (eventname, eventkey)
104: **/
105: -- func came from WF_EVENTS.GENERATE_FUNCTION
106: -- BINDVAR_SCAN_IGNORE
107: cmd := 'begin :v1 := '||func||'(:v2, :v3, :v4); end;';
108: begin
109: execute immediate cmd using in out msg, in ename, in ekey, in eplist;

Line 120: 'wf.plsql.wf_event.SetMessage.genfunc_callout',

116: end if;
117:
118: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
119: wf_log_pkg.string2(wf_log_pkg.level_statement,
120: 'wf.plsql.wf_event.SetMessage.genfunc_callout',
121: 'End executing generate function - '||func, false);
122: end if;
123:
124: else

Line 139: wf_core.context('Wf_Event', 'setMessage', ename, ekey, func);

135: when others then
136: if (Wf_Core.Error_Name = 'WFE_EVENT_NOTEXIST') then
137: raise;
138: else
139: wf_core.context('Wf_Event', 'setMessage', ename, ekey, func);
140: WF_CORE.Token('ENAME', p_event.event_name);
141: wf_core.token('FUNCTION_NAME', func);
142: WF_CORE.Token('SQLCODE', to_char(sqlcode));
143: WF_CORE.Token('SQLERRM', sqlerrm);

Line 151: PROCEDURE setErrorInfo(p_event in out nocopy wf_event_t,

147: -----------------------------------------------------------------------
148: /*
149: ** setErrorInfo -
150: */
151: PROCEDURE setErrorInfo(p_event in out nocopy wf_event_t,
152: p_type in varchar2)
153: is
154: err_name varchar2(30);
155: err_msg varchar2(2000);

Line 161: 'wf.plsql.WF_EVENT.setErrorInfo.begin',

157: begin
158:
159: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
160: wf_log_pkg.string(wf_log_pkg.level_procedure,
161: 'wf.plsql.WF_EVENT.setErrorInfo.begin',
162: 'Setting Error Info');
163: end if;
164:
165: -- First look for a standard WF_CORE exception.

Line 181: wf_core.context('Wf_Event', 'setErrorInfo', p_event.getEventName());

177: p_event.addParameterToList('ERROR_NAME', err_name);
178: p_event.addParameterToList('ERROR_TYPE', p_type);
179: exception
180: when others then
181: wf_core.context('Wf_Event', 'setErrorInfo', p_event.getEventName());
182: raise;
183: end;
184: -----------------------------------------------------------------------
185: /*

Line 188: PROCEDURE saveErrorToQueue(p_event in out nocopy wf_event_t)

184: -----------------------------------------------------------------------
185: /*
186: ** saveErrorToQueue (PRIVATE) - Save the event to the WF_ERROR queue.
187: */
188: PROCEDURE saveErrorToQueue(p_event in out nocopy wf_event_t)
189: is
190: erragt wf_agent_t;
191: cmd varchar2(1000);
192: begin

Line 196: 'wf.plsql.WF_EVENT.saveErrorToQueue.Begin',

192: begin
193:
194: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
195: wf_log_pkg.string(wf_log_pkg.level_procedure,
196: 'wf.plsql.WF_EVENT.saveErrorToQueue.Begin',
197: 'saving event to WF_ERROR on '|| wf_event.local_system_name);
198: end if;
199:
200: erragt := wf_agent_t('WF_ERROR', wf_event.local_system_name);

Line 197: 'saving event to WF_ERROR on '|| wf_event.local_system_name);

193:
194: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
195: wf_log_pkg.string(wf_log_pkg.level_procedure,
196: 'wf.plsql.WF_EVENT.saveErrorToQueue.Begin',
197: 'saving event to WF_ERROR on '|| wf_event.local_system_name);
198: end if;
199:
200: erragt := wf_agent_t('WF_ERROR', wf_event.local_system_name);
201:

Line 200: erragt := wf_agent_t('WF_ERROR', wf_event.local_system_name);

196: 'wf.plsql.WF_EVENT.saveErrorToQueue.Begin',
197: 'saving event to WF_ERROR on '|| wf_event.local_system_name);
198: end if;
199:
200: erragt := wf_agent_t('WF_ERROR', wf_event.local_system_name);
201:
202: --
203: -- mjc - lets just call the API directly
204: --

Line 212: 'wf.plsql.WF_EVENT.saveErrorToQueue.End',

208: --execute immediate cmd using in p_event,
209: -- in erragt;
210: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
211: wf_log_pkg.string(wf_log_pkg.level_procedure,
212: 'wf.plsql.WF_EVENT.saveErrorToQueue.End',
213: 'error info saved');
214: end if;
215: exception
216: when others then

Line 217: wf_core.context('Wf_Event', 'saveErrorToQueue', p_event.getEventName());

213: 'error info saved');
214: end if;
215: exception
216: when others then
217: wf_core.context('Wf_Event', 'saveErrorToQueue', p_event.getEventName());
218: wf_core.token('FUNCTION_NAME', 'WF_ERROR_QH.enqueue()');
219: --wf_core.raise('WF_EXT_FUNCTION');
220: raise;
221: end;

Line 227: PROCEDURE saveErrorToJavaQueue(p_event in out nocopy wf_event_t)

223: -----------------------------------------------------------------------
224: /*
225: ** saveErrorToJavaQueue (PRIVATE) - Save the event to the WF_JAVA_ERROR queue.
226: */
227: PROCEDURE saveErrorToJavaQueue(p_event in out nocopy wf_event_t)
228: is
229: erragt wf_agent_t;
230: cmd varchar2(1000);
231: begin

Line 235: 'wf.plsql.WF_EVENT.saveErrorToJavaQueue.Begin',

231: begin
232:
233: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
234: wf_log_pkg.string(wf_log_pkg.level_procedure,
235: 'wf.plsql.WF_EVENT.saveErrorToJavaQueue.Begin',
236: 'saving event to WF_JAVA_ERROR on '|| wf_event.local_system_name);
237: end if;
238:
239: erragt := wf_agent_t('WF_JAVA_ERROR', wf_event.local_system_name);

Line 236: 'saving event to WF_JAVA_ERROR on '|| wf_event.local_system_name);

232:
233: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
234: wf_log_pkg.string(wf_log_pkg.level_procedure,
235: 'wf.plsql.WF_EVENT.saveErrorToJavaQueue.Begin',
236: 'saving event to WF_JAVA_ERROR on '|| wf_event.local_system_name);
237: end if;
238:
239: erragt := wf_agent_t('WF_JAVA_ERROR', wf_event.local_system_name);
240:

Line 239: erragt := wf_agent_t('WF_JAVA_ERROR', wf_event.local_system_name);

235: 'wf.plsql.WF_EVENT.saveErrorToJavaQueue.Begin',
236: 'saving event to WF_JAVA_ERROR on '|| wf_event.local_system_name);
237: end if;
238:
239: erragt := wf_agent_t('WF_JAVA_ERROR', wf_event.local_system_name);
240:
241: --
242: -- mjc - lets just call the API directly
243: --

Line 244: WF_EVENT_OJMSTEXT_QH.enqueue(p_event, erragt);

240:
241: --
242: -- mjc - lets just call the API directly
243: --
244: WF_EVENT_OJMSTEXT_QH.enqueue(p_event, erragt);
245:
246: --cmd := 'begin WF_ERROR_QH.enqueue(:v1, :v2); end;';
247: --execute immediate cmd using in p_event,
248: -- in erragt;

Line 251: 'wf.plsql.WF_EVENT.saveErrorToJavaQueue.End',

247: --execute immediate cmd using in p_event,
248: -- in erragt;
249: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
250: wf_log_pkg.string(wf_log_pkg.level_procedure,
251: 'wf.plsql.WF_EVENT.saveErrorToJavaQueue.End',
252: 'error info saved');
253: end if;
254: exception
255: when others then

Line 256: wf_core.context('Wf_Event', 'saveErrorToQueue', p_event.getEventName());

252: 'error info saved');
253: end if;
254: exception
255: when others then
256: wf_core.context('Wf_Event', 'saveErrorToQueue', p_event.getEventName());
257: wf_core.token('FUNCTION_NAME', 'WF_EVENT_OJMSTEXT_QH.enqueue()');
258: --wf_core.raise('WF_EXT_FUNCTION');
259: raise;
260: end;

Line 257: wf_core.token('FUNCTION_NAME', 'WF_EVENT_OJMSTEXT_QH.enqueue()');

253: end if;
254: exception
255: when others then
256: wf_core.context('Wf_Event', 'saveErrorToQueue', p_event.getEventName());
257: wf_core.token('FUNCTION_NAME', 'WF_EVENT_OJMSTEXT_QH.enqueue()');
258: --wf_core.raise('WF_EXT_FUNCTION');
259: raise;
260: end;
261: --------------------------------------------------------------------------

Line 278: l_event_obj wf_event_obj;

274: p_phase in pls_integer)
275: return boolean
276: is
277: -- bes caching implementation
278: l_event_obj wf_event_obj;
279: l_subs_list wf_event_subs_tab;
280: l_java_defer boolean;
281: l_java_gen boolean;
282: l_phase number;

Line 279: l_subs_list wf_event_subs_tab;

275: return boolean
276: is
277: -- bes caching implementation
278: l_event_obj wf_event_obj;
279: l_subs_list wf_event_subs_tab;
280: l_java_defer boolean;
281: l_java_gen boolean;
282: l_phase number;
283: l_rule_func varchar2(240);

Line 288: 'wf.plsql.WF_EVENT.isDeferToJava.begin',

284: l_rule_data varchar2(8);
285: begin
286: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
287: wf_log_pkg.string(wf_log_pkg.level_procedure,
288: 'wf.plsql.WF_EVENT.isDeferToJava.begin',
289: 'Checking for Java subscription/generate');
290: end if;
291:
292: if (p_rule_func is not null AND

Line 297: 'wf.plsql.WF_EVENT.isDeferToJava.Subscription',

293: UPPER(substr(p_rule_func, 0, length(java_sub))) = UPPER(java_sub)) then
294: -- this is a Java subscription. Return true
295: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
296: wf_log_pkg.string(wf_log_pkg.level_statement,
297: 'wf.plsql.WF_EVENT.isDeferToJava.Subscription',
298: 'found a Java subscription');
299: end if;
300: return true;
301: end if;

Line 325: 'wf.plsql.WF_EVENT.isDeferToJava.Subscription',

321: p_rule_data = 'MESSAGE' and p_source_type = 'LOCAL') then
322: -- this is a Java generate function.
323: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
324: wf_log_pkg.string(wf_log_pkg.level_statement,
325: 'wf.plsql.WF_EVENT.isDeferToJava.Subscription',
326: 'found a Java generate function');
327: end if;
328: return true;
329: else

Line 361: 'wf.plsql.WF_EVENT.isDeferToJava.Subscription',

357:
358: if(l_java_defer) then
359: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
360: wf_log_pkg.string(wf_log_pkg.level_statement,
361: 'wf.plsql.WF_EVENT.isDeferToJava.Subscription',
362: 'found subsequent Java sub or java generate');
363: end if;
364: return true;
365: else

Line 368: 'wf.plsql.WF_EVENT.isDeferToJava.Subscription',

364: return true;
365: else
366: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
367: wf_log_pkg.string(wf_log_pkg.level_statement,
368: 'wf.plsql.WF_EVENT.isDeferToJava.Subscription',
369: 'No Java sub found or Java Generate Found');
370: end if;
371: return false;
372: end if;

Line 377: 'wf.plsql.WF_EVENT.isDeferToJava.end',

373: end if;
374:
375: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
376: wf_log_pkg.string(wf_log_pkg.level_procedure,
377: 'wf.plsql.WF_EVENT.isDeferToJava.end',
378: 'Checked for Java subscription/generate');
379: end if;
380:
381: return false;

Line 384: wf_core.context('Wf_Event', 'isDeferToJava', p_event_name);

380:
381: return false;
382: exception
383: when others then
384: wf_core.context('Wf_Event', 'isDeferToJava', p_event_name);
385: raise;
386: end isDeferToJava;
387:
388: --------------------------------------------------------------------------

Line 402: 'wf.plsql.WF_EVENT.isSaveToJavaError.begin',

398:
399: begin
400: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
401: wf_log_pkg.string(wf_log_pkg.level_procedure,
402: 'wf.plsql.WF_EVENT.isSaveToJavaError.begin',
403: 'Checking Java Error subscription for ' || p_event_name);
404: end if;
405:
406: if (p_rule_func is not null AND

Line 411: 'wf.plsql.WF_EVENT.isSaveToJavaError.Subscription',

407: UPPER(substr(p_rule_func, 0, length(java_sub))) = UPPER(java_sub)) then
408: -- this is a Java subscription. Return true
409: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
410: wf_log_pkg.string(wf_log_pkg.level_statement,
411: 'wf.plsql.WF_EVENT.isSaveToJavaError.Subscription',
412: 'found a Java subscription');
413: end if;
414: return true;
415: end if;

Line 422: function GetSkippedSub(p_event in wf_event_t)

418: /*
419: ** GetSkippedSub - utility function to get the subscription has skip onerror
420: ** type
421: */
422: function GetSkippedSub(p_event in wf_event_t)
423: return RAW is
424: l_skip_sub_str VARCHAR2(300);
425: begin
426: l_skip_sub_str := p_event.GETVALUEFORPARAMETER('SKIP_ERROR_SUB');

Line 444: p_event in out nocopy wf_event_t,

440: p_sub_guid in raw,
441: p_source_agent_guid in raw,
442: p_phase in number,
443: p_priority in number,
444: p_event in out nocopy wf_event_t,
445: p_on_error in varchar2)
446: return varchar2
447: is
448: res varchar2(20);

Line 471: if ((wf_event.local_system_status = 'ENABLED'

467: l_rule_func VARCHAR2(240);
468: executed boolean;
469: begin
470: -- Verify if the subscription is eligible for execution.
471: if ((wf_event.local_system_status = 'ENABLED'
472: OR wf_event.local_system_status = p_source_type)
473: OR (wf_event.local_system_status <> 'DISABLED'
474: AND p_source_type = 'ERROR'))
475: AND (p_phase >= wf_event.phase_minthreshold) then

Line 472: OR wf_event.local_system_status = p_source_type)

468: executed boolean;
469: begin
470: -- Verify if the subscription is eligible for execution.
471: if ((wf_event.local_system_status = 'ENABLED'
472: OR wf_event.local_system_status = p_source_type)
473: OR (wf_event.local_system_status <> 'DISABLED'
474: AND p_source_type = 'ERROR'))
475: AND (p_phase >= wf_event.phase_minthreshold) then
476:

Line 473: OR (wf_event.local_system_status <> 'DISABLED'

469: begin
470: -- Verify if the subscription is eligible for execution.
471: if ((wf_event.local_system_status = 'ENABLED'
472: OR wf_event.local_system_status = p_source_type)
473: OR (wf_event.local_system_status <> 'DISABLED'
474: AND p_source_type = 'ERROR'))
475: AND (p_phase >= wf_event.phase_minthreshold) then
476:
477: --Bug 2519183

Line 475: AND (p_phase >= wf_event.phase_minthreshold) then

471: if ((wf_event.local_system_status = 'ENABLED'
472: OR wf_event.local_system_status = p_source_type)
473: OR (wf_event.local_system_status <> 'DISABLED'
474: AND p_source_type = 'ERROR'))
475: AND (p_phase >= wf_event.phase_minthreshold) then
476:
477: --Bug 2519183
478: --If we are in the deferred processing of an
479: --event we will set back the minthreshold so that its

Line 485: if ((wf_event.phase_minthreshold > 0) AND

481: --This is after all processed subscriptions have been
482: --discarded hence its fine to set the phase_minthreshold
483: --to zero.
484:
485: if ((wf_event.phase_minthreshold > 0) AND
486: (p_event.from_agent is NOT NULL)) then
487: --Bug 3451981
488: --In the case of EXTERNAL events the from_agent will
489: --not be WF_DEFERRED , in this case no further event

Line 499: wf_event.phase_minthreshold := 0;

495: --So we can possibly check if it is 'EXTERNAL'
496: --and as we know from the check of min_threshold
497: --that we are deferprocessing lets re-set it.
498: if ((p_event.from_agent.getName = 'WF_DEFERRED') OR (p_source_type = 'EXTERNAL')) then
499: wf_event.phase_minthreshold := 0;
500: end if ;
501: end if;
502:
503: --

Line 512: if (wf_event.phase_maxthreshold is not null) AND

508: -- the deferred queue.
509: --
510: -- YOHUANG Bug 4227307
511: -- Error Subscription should never be deferred.
512: if (wf_event.phase_maxthreshold is not null) AND
513: (p_phase >= wf_event.phase_maxthreshold) AND
514: (p_source_type <> 'ERROR')
515: then
516: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then

Line 513: (p_phase >= wf_event.phase_maxthreshold) AND

509: --
510: -- YOHUANG Bug 4227307
511: -- Error Subscription should never be deferred.
512: if (wf_event.phase_maxthreshold is not null) AND
513: (p_phase >= wf_event.phase_maxthreshold) AND
514: (p_source_type <> 'ERROR')
515: then
516: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
517: wf_log_pkg.string(wf_log_pkg.level_statement,

Line 518: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',

514: (p_source_type <> 'ERROR')
515: then
516: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
517: wf_log_pkg.string(wf_log_pkg.level_statement,
518: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',
519: 'max threshold reached');
520: end if;
521: max_threshold_reached := true;
522: end if;

Line 538: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',

534:
535: if(defer_to_java OR max_threshold_reached ) then
536: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
537: wf_log_pkg.string(wf_log_pkg.level_statement,
538: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',
539: 'detected as deferred');
540: end if;
541: --
542: -- mjc Set action priority now, if we defer, this can be used

Line 563: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',

559:
560: if(defer_to_java) then
561: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
562: wf_log_pkg.string(wf_log_pkg.level_statement,
563: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',
564: 'deferring to WF_JAVA_DEFERRED');
565: end if;
566: wf_event.DeferEventToJava(p_source_type, p_event);
567: else

Line 566: wf_event.DeferEventToJava(p_source_type, p_event);

562: wf_log_pkg.string(wf_log_pkg.level_statement,
563: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',
564: 'deferring to WF_JAVA_DEFERRED');
565: end if;
566: wf_event.DeferEventToJava(p_source_type, p_event);
567: else
568: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
569: wf_log_pkg.string(wf_log_pkg.level_statement,
570: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',

Line 570: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',

566: wf_event.DeferEventToJava(p_source_type, p_event);
567: else
568: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
569: wf_log_pkg.string(wf_log_pkg.level_statement,
570: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',
571: 'deferring to WF_DEFERRED');
572: end if;
573: wf_event.deferevent(p_source_type, p_event);
574: end if;

Line 573: wf_event.deferevent(p_source_type, p_event);

569: wf_log_pkg.string(wf_log_pkg.level_statement,
570: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',
571: 'deferring to WF_DEFERRED');
572: end if;
573: wf_event.deferevent(p_source_type, p_event);
574: end if;
575: res := 'DEFER';
576:
577: elsif (save_to_java_error) then

Line 580: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',

576:
577: elsif (save_to_java_error) then
578: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
579: wf_log_pkg.string(wf_log_pkg.level_statement,
580: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',
581: 'save to java error queue');
582: end if;
583: p_event.error_subscription := p_sub_guid;
584: wf_event.saveErrorToJavaQueue(p_event);

Line 584: wf_event.saveErrorToJavaQueue(p_event);

580: 'wf.plsql.WF_EVENT.dispatch_internal.Subscription',
581: 'save to java error queue');
582: end if;
583: p_event.error_subscription := p_sub_guid;
584: wf_event.saveErrorToJavaQueue(p_event);
585: res := 'DEFER';
586: else
587: -- Generate Method is irrelavant to subscription.
588: -- Exception happened in Generate Method should be thrown

Line 600: 'wf.plsql.WF_EVENT.dispatch_internal.Rule_Data',

596: (p_rule_data = 'MESSAGE') AND
597: (p_source_type = 'LOCAL') then
598: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
599: wf_log_pkg.string(wf_log_pkg.level_statement,
600: 'wf.plsql.WF_EVENT.dispatch_internal.Rule_Data',
601: 'Rule Data is MESSAGE and Source is LOCAL');
602: end if;
603: -- if dbms_lob.istemporary(p_event.GetEventData()) = 0 then
604: -- Bug Fix for 4286207

Line 610: 'wf.plsql.WF_EVENT.dispatch_internal.generate',

606: if (p_event.GetEventData() is null) or
607: (p_event.GetEventData() is not null and dbms_lob.getlength(p_event.GetEventData()) = 0) then
608: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
609: wf_log_pkg.string(wf_log_pkg.level_statement,
610: 'wf.plsql.WF_EVENT.dispatch_internal.generate',
611: 'Need to Generate Message');
612: end if;
613: wf_event.setMessage(p_event);
614: genmsg := TRUE;

Line 613: wf_event.setMessage(p_event);

609: wf_log_pkg.string(wf_log_pkg.level_statement,
610: 'wf.plsql.WF_EVENT.dispatch_internal.generate',
611: 'Need to Generate Message');
612: end if;
613: wf_event.setMessage(p_event);
614: genmsg := TRUE;
615: end if;
616: exception
617: when empty_lob_locator then

Line 621: 'wf.plsql.WF_EVENT.dispatch_internal.generate',

617: when empty_lob_locator then
618: -- The lob locator is invalid, probably pointing to a empty_clob();
619: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
620: wf_log_pkg.string(wf_log_pkg.level_statement,
621: 'wf.plsql.WF_EVENT.dispatch_internal.generate',
622: 'Invalid Lob Locator Passed, Generate the Message');
623: end if;
624: wf_event.setMessage(p_event);
625: genmsg := TRUE;

Line 624: wf_event.setMessage(p_event);

620: wf_log_pkg.string(wf_log_pkg.level_statement,
621: 'wf.plsql.WF_EVENT.dispatch_internal.generate',
622: 'Invalid Lob Locator Passed, Generate the Message');
623: end if;
624: wf_event.setMessage(p_event);
625: genmsg := TRUE;
626: end;
627: end if;
628: exception

Line 632: wf_event.wf_exception_source := 'RULE';

628: exception
629: when others then
630: rollback to wf_dispatch_savepoint;
631: p_event.setErrorSubscription(p_sub_guid);
632: wf_event.wf_exception_source := 'RULE';
633: raise;
634: end;
635:
636: --If we came here now we can start processing the

Line 665: 'wf.plsql.wf_event.dispatch_internal.rulefunc_callout',

661: begin
662:
663: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
664: wf_log_pkg.string2(wf_log_pkg.level_statement,
665: 'wf.plsql.wf_event.dispatch_internal.rulefunc_callout',
666: 'Start executing rule function - '||p_rule_func, true);
667: end if;
668:
669: if (p_rule_func is not null) then

Line 676: -- p_rule_func came from WF_EVENT_SUBSCRIPTIONS.Rule_Function or

672: p_event,
673: res,
674: executed);
675: if (not executed) then
676: -- p_rule_func came from WF_EVENT_SUBSCRIPTIONS.Rule_Function or
677: -- WF_EVENT_SUBSCRIPTIONS.Java_Rule_Func
678: myfunc := p_rule_func;
679: -- BINDVAR_SCAN_IGNORE
680: cmd := 'begin :v1 := '||myfunc||'(:v2, :v3); end;';

Line 677: -- WF_EVENT_SUBSCRIPTIONS.Java_Rule_Func

673: res,
674: executed);
675: if (not executed) then
676: -- p_rule_func came from WF_EVENT_SUBSCRIPTIONS.Rule_Function or
677: -- WF_EVENT_SUBSCRIPTIONS.Java_Rule_Func
678: myfunc := p_rule_func;
679: -- BINDVAR_SCAN_IGNORE
680: cmd := 'begin :v1 := '||myfunc||'(:v2, :v3); end;';
681: execute immediate cmd using in out res,

Line 689: 'wf.plsql.wf_event.dispatch_internal.rulefunc_callout',

685: end if;
686:
687: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
688: wf_log_pkg.string2(wf_log_pkg.level_statement,
689: 'wf.plsql.wf_event.dispatch_internal.rulefunc_callout',
690: 'End executing rule function - '||p_rule_func, false);
691: end if;
692:
693: exception

Line 703: wf_event.wf_exception_source := 'RULE';

699: else
700: rollback to wf_dispatch_savepoint;
701: p_event.setErrorSubscription(p_sub_guid);
702: p_event.addParameterToList('ERROR_TYPE', 'UNEXPECTED');
703: wf_event.wf_exception_source := 'RULE';
704: WF_CORE.Token('ENAME', p_event.event_name);
705: WF_CORE.Token('EKEY', p_event.event_key);
706: WF_CORE.Token('RULE', myfunc);
707: WF_CORE.Token('SQLCODE', to_char(sqlcode));

Line 717: 'wf.plsql.WF_EVENT.dispatch_internal.rule_function',

713:
714: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
715: -- BINDVAR_SCAN_IGNORE[3]
716: wf_log_pkg.string(wf_log_pkg.level_statement,
717: 'wf.plsql.WF_EVENT.dispatch_internal.rule_function',
718: 'Executed Rule Function '||myfunc||' and returned '||res);
719: end if;
720:
721: end if; -- End of "defer_to_java OR max_threshold_reached"

Line 727: 'wf.plsql.wf_event.dispatch_internal.subs_ignore',

723: -- Bug 4227307
724: -- Handle the subscriptions that are not eligible for execution.
725: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
726: wf_log_pkg.string(wf_log_pkg.level_statement,
727: 'wf.plsql.wf_event.dispatch_internal.subs_ignore',
728: 'Subscription not executed. Sub Phase='||p_phase||
729: ', Min threshold='||wf_event.phase_minthreshold);
730: end if;
731: return 'SUCCESS';

Line 729: ', Min threshold='||wf_event.phase_minthreshold);

725: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
726: wf_log_pkg.string(wf_log_pkg.level_statement,
727: 'wf.plsql.wf_event.dispatch_internal.subs_ignore',
728: 'Subscription not executed. Sub Phase='||p_phase||
729: ', Min threshold='||wf_event.phase_minthreshold);
730: end if;
731: return 'SUCCESS';
732: end if;
733:

Line 745: wf_event.wf_exception_source := 'RULE';

741: if (p_source_type = 'ERROR') then
742: -- If subscription returns error when listener listens on error agent.
743: -- Bug 4207885: Set the exception source to Rule when
744: -- Raising exceptions.
745: wf_event.wf_exception_source := 'RULE';
746: wf_core.token('ENAME', p_event.event_name);
747: wf_core.token('EKEY', p_event.event_key);
748: wf_core.token('SQLERRM', null);
749: wf_core.token('SQLCODE', null);

Line 755: if (WF_EVENT.g_message_grouping = 'TRANSACTIONAL') then

751: end if;
752:
753: if (res = 'ERROR') then
754:
755: if (WF_EVENT.g_message_grouping = 'TRANSACTIONAL') then
756: raise dispatch_error;
757: end if;
758:
759: begin

Line 781: wf_event.saveErrorToQueue(p_event);

777: end;
778: end if;
779:
780:
781: wf_event.saveErrorToQueue(p_event);
782: p_event.AddParameterToList('SKIP_ERROR_SUB', null);
783: return (res);
784:
785: exception

Line 787: wf_core.context('Wf_Event', 'dispatch_internal');

783: return (res);
784:
785: exception
786: when others then
787: wf_core.context('Wf_Event', 'dispatch_internal');
788: raise;
789: end;
790: ---------------------------------------------------------------------------
791: /*

Line 815: wf_core.context('Wf_Event', 'newAgent', p_agent_guid);

811: wf_core.raise('WFE_AGENT_NOTEXIST');
812: end if;
813: exception
814: when others then
815: wf_core.context('Wf_Event', 'newAgent', p_agent_guid);
816: raise;
817: end;
818: ---------------------------------------------------------------------------
819: /*

Line 828: l_event_obj wf_event_obj;

824: event_guid raw(16);
825: result varchar2(10) := 'NONE';
826:
827: -- bes caching implementation
828: l_event_obj wf_event_obj;
829: l_subs_list wf_event_subs_tab;
830:
831: begin
832:

Line 829: l_subs_list wf_event_subs_tab;

825: result varchar2(10) := 'NONE';
826:
827: -- bes caching implementation
828: l_event_obj wf_event_obj;
829: l_subs_list wf_event_subs_tab;
830:
831: begin
832:
833: l_event_obj := wf_bes_cache.GetEventByName(p_event_name);

Line 854: wf_core.context('Wf_Event', 'Test', p_event_name);

850: return result;
851:
852: exception
853: when others then
854: wf_core.context('Wf_Event', 'Test', p_event_name);
855: raise;
856: end;
857: ---------------------------------------------------------------------------
858: /*

Line 861: PROCEDURE send(p_event in out nocopy wf_event_t) is

857: ---------------------------------------------------------------------------
858: /*
859: ** send -
860: */
861: PROCEDURE send(p_event in out nocopy wf_event_t) is
862: outguid WF_AGENTS.GUID%TYPE;
863: toagtname WF_AGENTS.NAME%TYPE;
864: toagtsys WF_SYSTEMS.NAME%TYPE;
865: outagtname WF_AGENTS.NAME%TYPE;

Line 885: wf_core.context('Wf_Event', 'Send', p_event.getEventName());

881: --
882: if (p_event.GetToAgent() is null AND p_event.GetFromAgent() is null) then
883: -- Either source or destination must be defined.
884: -- Raise Error.
885: wf_core.context('Wf_Event', 'Send', p_event.getEventName());
886: wf_core.raise('Either source or destination must be defined.'); -- wfsql.msg
887: end if;
888:
889: if p_event.GetToAgent() is not null then

Line 901: 'wf.plsql.WF_EVENT.Send.info',

897: end if;
898:
899: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
900: wf_log_pkg.string(wf_log_pkg.level_statement,
901: 'wf.plsql.WF_EVENT.Send.info',
902: 'To Agt: '||toagtname||' To Agt Sys:'||toagtsys||
903: 'Out Agt: '||outagtname||' Out Agt Sys:'||outagtsys);
904: end if;
905:

Line 943: p_event.setFromAgent(wf_event.newAgent(outguid));

939: else
940: raise no_data_found;
941: end if;
942:
943: p_event.setFromAgent(wf_event.newAgent(outguid));
944: end if;
945:
946: if (p_event.getSendDate() is NULL) then
947: p_event.setSendDate(sysdate);

Line 952: 'wf.plsql.WF_EVENT.send.enqueue',

948: end if;
949:
950: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
951: wf_log_pkg.string(wf_log_pkg.level_statement,
952: 'wf.plsql.WF_EVENT.send.enqueue',
953: 'Sending from '||outagtname||' to '||toagtname);
954: end if;
955:
956: wf_event.enqueue(p_event);

Line 956: wf_event.enqueue(p_event);

952: 'wf.plsql.WF_EVENT.send.enqueue',
953: 'Sending from '||outagtname||' to '||toagtname);
954: end if;
955:
956: wf_event.enqueue(p_event);
957: exception
958: when no_data_found then
959: wf_core.context('Wf_Event', 'Send', p_event.getEventName());
960: wf_core.token('AGENT', toagtname);

Line 959: wf_core.context('Wf_Event', 'Send', p_event.getEventName());

955:
956: wf_event.enqueue(p_event);
957: exception
958: when no_data_found then
959: wf_core.context('Wf_Event', 'Send', p_event.getEventName());
960: wf_core.token('AGENT', toagtname);
961: wf_core.raise('WFE_AGENT_NOMATCH');
962: when others then
963: wf_core.context('Wf_Event', 'Send', p_event.getEventName());

Line 963: wf_core.context('Wf_Event', 'Send', p_event.getEventName());

959: wf_core.context('Wf_Event', 'Send', p_event.getEventName());
960: wf_core.token('AGENT', toagtname);
961: wf_core.raise('WFE_AGENT_NOMATCH');
962: when others then
963: wf_core.context('Wf_Event', 'Send', p_event.getEventName());
964: raise;
965: end;
966: ---------------------------------------------------------------------------
967: /*

Line 1024: 'wf.plsql.WF_EVENT.Get_Recipient',

1020: end if;
1021:
1022: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1023: wf_log_pkg.string(wf_log_pkg.level_statement,
1024: 'wf.plsql.WF_EVENT.Get_Recipient',
1025: 'Recipient is name: ' || p_to_agent_name ||
1026: ' address: ' || l_to_address || ' protocol: ' ||l_to_protocol);
1027: end if;
1028:

Line 1035: wf_core.context('WF_EVENT', 'Get_Recipient', 'Bad Protocol',

1031: -- from protocol names as used in the event manager and the
1032: -- protocol numbers used by AQ.
1033:
1034: if((l_to_protocol is null) or (l_to_protocol not in ('SQLNET'))) then
1035: wf_core.context('WF_EVENT', 'Get_Recipient', 'Bad Protocol',
1036: l_to_protocol, l_to_queue_name);
1037: end if;
1038:
1039: return sys.aq$_agent(p_to_agent_name,

Line 1053: PROCEDURE Set_Recipient_List(p_event in wf_event_t,

1049: ** If the ToAgent of event is not null(send), set the recipient list
1050: ** address.
1051: ** Only be called if the event.getToAgent() is not null.
1052: */
1053: PROCEDURE Set_Recipient_List(p_event in wf_event_t,
1054: p_out_agent_name in varchar2,
1055: p_out_system_name in varchar2,
1056: x_message_properties in out nocopy dbms_aq.message_properties_t) IS
1057: l_to_type WF_AGENTS.TYPE%TYPE;

Line 1081: 'wf.plsql.WF_EVENT.setRecieptList',

1077: l_to_system_name := p_event.getToAgent().getSystem();
1078:
1079: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1080: wf_log_pkg.string(wf_log_pkg.level_statement,
1081: 'wf.plsql.WF_EVENT.setRecieptList',
1082: 'Setting Recipient List: ' || l_to_agent_name);
1083: end if;
1084:
1085: l_to_agt_obj := wf_bes_cache.GetAgentByName(l_to_agent_name, l_to_system_name);

Line 1157: wf_event.raise3(p_event_name,

1153: else
1154: l_parameters := wf_parameter_list_t();
1155: end if;
1156: --Raise the event
1157: wf_event.raise3(p_event_name,
1158: p_event_key,
1159: p_event_data,
1160: l_parameters,
1161: p_send_date);

Line 1205: evt wf_event_t;

1201: qh varchar2(240);
1202: stat varchar2(10);
1203: agt raw(16);
1204: sagt raw(16);
1205: evt wf_event_t;
1206: evt_name VARCHAR2(240); /* Bug 2032654 */
1207: evt_errmsg VARCHAR2(4000);
1208: l_lsn_msg_count NUMBER := 0; -- Local Variable, reset everytime the method is called.
1209: l_error_count NUMBER := 0;

Line 1242: WF_CORE.Context('WF_EVENT', 'Listen', p_agent_name, p_correlation,

1238: p_max_error_count := 0;
1239: end if;
1240:
1241: if ((p_correlation is not NULL) and (p_deq_condition is not NULL)) then
1242: WF_CORE.Context('WF_EVENT', 'Listen', p_agent_name, p_correlation,
1243: p_deq_condition);
1244: WF_CORE.Raise('WFE_CORRID_VS_CONDITION');
1245:
1246: end if;

Line 1251: if (WF_EVENT.g_local_system_guid is NULL) then

1247:
1248: -- lookup agent info --
1249: -- Tuned and separated sql statement for better performance
1250: -- restricting Listen() to local system.
1251: if (WF_EVENT.g_local_system_guid is NULL) then
1252: g_local_system_guid := hextoraw(WF_CORE.Translate('WF_SYSTEM_GUID'));
1253: end if;
1254:
1255: -- get the agent information for the local system

Line 1270: if (WF_EVENT.g_message_grouping = 'TRANSACTIONAL') then

1266: -- StartAgent becomes the single source to start a particular agent
1267: -- and can be called without worrying about fixed name queues.
1268: StartAgent(p_agent_name);
1269:
1270: if (WF_EVENT.g_message_grouping = 'TRANSACTIONAL') then
1271: if ((p_correlation is NULL) and (p_deq_condition is NULL)) then
1272: --This is a transactional queue, we will go ahead and call
1273: --the proper api.
1274: WF_EVENT.Listen_GRP(p_agent_name, p_wait);

Line 1274: WF_EVENT.Listen_GRP(p_agent_name, p_wait);

1270: if (WF_EVENT.g_message_grouping = 'TRANSACTIONAL') then
1271: if ((p_correlation is NULL) and (p_deq_condition is NULL)) then
1272: --This is a transactional queue, we will go ahead and call
1273: --the proper api.
1274: WF_EVENT.Listen_GRP(p_agent_name, p_wait);
1275: return;
1276:
1277: else
1278: --This is a transactional queue, but since there was a correlation id

Line 1281: wf_core.context('Wf_Event', 'Listen', p_agent_name);

1277: else
1278: --This is a transactional queue, but since there was a correlation id
1279: --passed, we cannot call Listen_GRP, so we will raise an error to the
1280: --caller to resolve.
1281: wf_core.context('Wf_Event', 'Listen', p_agent_name);
1282: wf_core.token('AGENT', p_agent_name);
1283: wf_core.token('API', 'WF_EVENT.Listen_GRP');
1284: wf_core.raise('WFE_TRXN_QUEUE');
1285:

Line 1283: wf_core.token('API', 'WF_EVENT.Listen_GRP');

1279: --passed, we cannot call Listen_GRP, so we will raise an error to the
1280: --caller to resolve.
1281: wf_core.context('Wf_Event', 'Listen', p_agent_name);
1282: wf_core.token('AGENT', p_agent_name);
1283: wf_core.token('API', 'WF_EVENT.Listen_GRP');
1284: wf_core.raise('WFE_TRXN_QUEUE');
1285:
1286: end if;
1287: end if;

Line 1300: wf_event.SetAccountName;

1296: -- check system status --
1297: -- stat := wf_core.translate('WF_SYSTEM_STATUS');
1298:
1299: -- Set the account name - only need this for WF_DEFERRED
1300: wf_event.SetAccountName;
1301:
1302: if (wf_event.local_system_status = 'DISABLED') then
1303: return;
1304: end if;

Line 1302: if (wf_event.local_system_status = 'DISABLED') then

1298:
1299: -- Set the account name - only need this for WF_DEFERRED
1300: wf_event.SetAccountName;
1301:
1302: if (wf_event.local_system_status = 'DISABLED') then
1303: return;
1304: end if;
1305:
1306: if (wf_event.local_system_status in ('LOCAL','EXTERNAL')) then

Line 1306: if (wf_event.local_system_status in ('LOCAL','EXTERNAL')) then

1302: if (wf_event.local_system_status = 'DISABLED') then
1303: return;
1304: end if;
1305:
1306: if (wf_event.local_system_status in ('LOCAL','EXTERNAL')) then
1307: if (st = wf_event.local_system_status
1308: OR st = 'ERROR'
1309: OR p_agent_name = 'WF_DEFERRED') then
1310: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then

Line 1307: if (st = wf_event.local_system_status

1303: return;
1304: end if;
1305:
1306: if (wf_event.local_system_status in ('LOCAL','EXTERNAL')) then
1307: if (st = wf_event.local_system_status
1308: OR st = 'ERROR'
1309: OR p_agent_name = 'WF_DEFERRED') then
1310: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1311: wf_log_pkg.string(wf_log_pkg.level_statement,

Line 1312: 'wf.plsql.WF_EVENT.listen.Check1',

1308: OR st = 'ERROR'
1309: OR p_agent_name = 'WF_DEFERRED') then
1310: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1311: wf_log_pkg.string(wf_log_pkg.level_statement,
1312: 'wf.plsql.WF_EVENT.listen.Check1',
1313: 'Source type is equal to system status '||
1314: 'or ERROR or Deferred Processing');
1315: end if;
1316: else

Line 1319: 'wf.plsql.WF_EVENT.listen.Check2',

1315: end if;
1316: else
1317: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1318: wf_log_pkg.string(wf_log_pkg.level_statement,
1319: 'wf.plsql.WF_EVENT.listen.Check2',
1320: 'Source type not valid for current system status');
1321: end if;
1322: return;
1323: end if;

Line 1327: wf_event.navigation := dbms_aq.first_message;

1323: end if;
1324: end if;
1325:
1326: -- Set the dequeue navigation option to be DBMS_AQ.FIRST_MESSAGE
1327: wf_event.navigation := dbms_aq.first_message;
1328: /*
1329: ** We need to explicitly make sure that if someones Queue Handler
1330: ** blows up we rollback the transaction, just in case they don't
1331: */

Line 1335: wf_event.dequeue(agt, evt, qh, p_wait, p_correlation, p_deq_condition);

1331: */
1332:
1333: begin
1334: savepoint bes_before_dequeue_qh;
1335: wf_event.dequeue(agt, evt, qh, p_wait, p_correlation, p_deq_condition);
1336:
1337: exception
1338: when others then
1339: wf_event.wf_exception_source := 'QH';

Line 1339: wf_event.wf_exception_source := 'QH';

1335: wf_event.dequeue(agt, evt, qh, p_wait, p_correlation, p_deq_condition);
1336:
1337: exception
1338: when others then
1339: wf_event.wf_exception_source := 'QH';
1340: rollback to bes_before_dequeue_qh;
1341: raise;
1342: end;
1343:

Line 1360: 'wf.plsql.WF_EVENT.listen',

1356: from_agt_sys := evt.getFromAgent().getSystem();
1357:
1358: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1359: wf_log_pkg.string(wf_log_pkg.level_statement,
1360: 'wf.plsql.WF_EVENT.listen',
1361: 'Event '||evt.getEventName()||
1362: ', hailing from '||from_agt_name||'@'||from_agt_sys||
1363: ' was dequeued from '||p_agent_name);
1364: end if;

Line 1400: 'wf.plsql.WF_EVENT.listen.Deferred',

1396: begin
1397: if p_agent_name = 'WF_DEFERRED' then
1398: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1399: wf_log_pkg.string(wf_log_pkg.level_statement,
1400: 'wf.plsql.WF_EVENT.listen.Deferred',
1401: 'Processing Deferred Event');
1402: end if;
1403:
1404: wf_event.GetDeferEventCtx(st,from_agt_name,from_agt_sys,evt);

Line 1404: wf_event.GetDeferEventCtx(st,from_agt_name,from_agt_sys,evt);

1400: 'wf.plsql.WF_EVENT.listen.Deferred',
1401: 'Processing Deferred Event');
1402: end if;
1403:
1404: wf_event.GetDeferEventCtx(st,from_agt_name,from_agt_sys,evt);
1405: -- dispatcher should process all subscriptions
1406: wf_event.phase_maxthreshold := null;
1407: end if;
1408:

Line 1406: wf_event.phase_maxthreshold := null;

1402: end if;
1403:
1404: wf_event.GetDeferEventCtx(st,from_agt_name,from_agt_sys,evt);
1405: -- dispatcher should process all subscriptions
1406: wf_event.phase_maxthreshold := null;
1407: end if;
1408:
1409: begin
1410: -- Dispatcher will throw exception in the following unexpected errors

Line 1419: wf_event.dispatch(st, sagt, evt);

1415: -- Unable to rollback to savepoint.
1416: -- Listen will swallow all of these exceptions unless the unexpected
1417: -- exception happened when processing error queue
1418:
1419: wf_event.dispatch(st, sagt, evt);
1420: l_error_count := 0; -- We only count consecutive unexpected errors
1421: commit;
1422: exception
1423: when others then

Line 1424: if (wf_event.wf_exception_source = 'RULE') then

1420: l_error_count := 0; -- We only count consecutive unexpected errors
1421: commit;
1422: exception
1423: when others then
1424: if (wf_event.wf_exception_source = 'RULE') then
1425: if (st = 'ERROR') then
1426: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1427: wf_log_pkg.string(wf_log_pkg.level_error,
1428: 'wf.plsql.WF_EVENT.listen.dispatch_error',

Line 1428: 'wf.plsql.WF_EVENT.listen.dispatch_error',

1424: if (wf_event.wf_exception_source = 'RULE') then
1425: if (st = 'ERROR') then
1426: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1427: wf_log_pkg.string(wf_log_pkg.level_error,
1428: 'wf.plsql.WF_EVENT.listen.dispatch_error',
1429: 'Rule Function with Source Error Exception');
1430: end if;
1431: raise;
1432: else

Line 1435: 'wf.plsql.WF_EVENT.listen.dispatch_error',

1431: raise;
1432: else
1433: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1434: wf_log_pkg.string(wf_log_pkg.level_error,
1435: 'wf.plsql.WF_EVENT.listen.dispatch_error',
1436: 'Rule Function Error');
1437: end if;
1438: wf_event.setErrorInfo(evt, 'ERROR');
1439: wf_event.saveErrorToQueue(evt);

Line 1438: wf_event.setErrorInfo(evt, 'ERROR');

1434: wf_log_pkg.string(wf_log_pkg.level_error,
1435: 'wf.plsql.WF_EVENT.listen.dispatch_error',
1436: 'Rule Function Error');
1437: end if;
1438: wf_event.setErrorInfo(evt, 'ERROR');
1439: wf_event.saveErrorToQueue(evt);
1440: commit;
1441: l_error_count := l_error_count + 1;
1442: end if;

Line 1439: wf_event.saveErrorToQueue(evt);

1435: 'wf.plsql.WF_EVENT.listen.dispatch_error',
1436: 'Rule Function Error');
1437: end if;
1438: wf_event.setErrorInfo(evt, 'ERROR');
1439: wf_event.saveErrorToQueue(evt);
1440: commit;
1441: l_error_count := l_error_count + 1;
1442: end if;
1443: else

Line 1446: 'wf.plsql.WF_EVENT.listen.dispatch_error',

1442: end if;
1443: else
1444: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1445: wf_log_pkg.string(wf_log_pkg.level_error,
1446: 'wf.plsql.WF_EVENT.listen.dispatch_error',
1447: 'Non Rule Function Error');
1448: end if;
1449: -- Bug 4207885: Set the exception source to be WF.
1450: wf_event.wf_exception_source := 'WF';

Line 1450: wf_event.wf_exception_source := 'WF';

1446: 'wf.plsql.WF_EVENT.listen.dispatch_error',
1447: 'Non Rule Function Error');
1448: end if;
1449: -- Bug 4207885: Set the exception source to be WF.
1450: wf_event.wf_exception_source := 'WF';
1451: commit;
1452: raise;
1453: end if;
1454: end;

Line 1464: if (( wf_event.wf_exception_source = 'RULE') and (st = 'ERROR')) then

1460: -- agent is the error queue then there is no point in enqueueing
1461: -- the event again into the error queue.
1462: -- In this case we just rollback the dequeue and raise the
1463: -- exception to the user.
1464: if (( wf_event.wf_exception_source = 'RULE') and (st = 'ERROR')) then
1465: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1466: wf_log_pkg.string(wf_log_pkg.level_error,
1467: 'wf.plsql.WF_EVENT.listen.dispatch_error',
1468: 'Error executing Rule Function with Source Type Error');

Line 1467: 'wf.plsql.WF_EVENT.listen.dispatch_error',

1463: -- exception to the user.
1464: if (( wf_event.wf_exception_source = 'RULE') and (st = 'ERROR')) then
1465: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1466: wf_log_pkg.string(wf_log_pkg.level_error,
1467: 'wf.plsql.WF_EVENT.listen.dispatch_error',
1468: 'Error executing Rule Function with Source Type Error');
1469: end if;
1470: rollback to bes_before_dequeue_qh;
1471:

Line 1482: elsif (wf_event.wf_exception_source = 'WF') then

1478: wf_core.token('SQLERRM', sqlerrm);
1479: wf_core.token('SQLCODE', sqlcode);
1480: wf_core.raise('WFE_UNHANDLED_ERROR');
1481: end if;
1482: elsif (wf_event.wf_exception_source = 'WF') then
1483: -- Bug 4207885: Add the handler of exception with source WF
1484: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1485: wf_log_pkg.string(wf_log_pkg.level_error,
1486: 'wf.plsql.WF_EVENT.listen.dispatch_error',

Line 1486: 'wf.plsql.WF_EVENT.listen.dispatch_error',

1482: elsif (wf_event.wf_exception_source = 'WF') then
1483: -- Bug 4207885: Add the handler of exception with source WF
1484: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1485: wf_log_pkg.string(wf_log_pkg.level_error,
1486: 'wf.plsql.WF_EVENT.listen.dispatch_error',
1487: 'Unexpected Function Error');
1488: end if;
1489: wf_core.token('ENAME', evt.event_name);
1490: wf_core.token('EKEY', evt.event_key);

Line 1497: 'wf.plsql.WF_EVENT.listen.error',

1493: wf_core.raise('WFE_UNHANDLED_ERROR');
1494: else
1495: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1496: wf_log_pkg.string(wf_log_pkg.level_error,
1497: 'wf.plsql.WF_EVENT.listen.error',
1498: 'GetDeferEventCtx Error');
1499: end if;
1500: wf_event.setErrorInfo(evt,'ERROR');
1501: wf_event.saveErrorToQueue(evt);

Line 1500: wf_event.setErrorInfo(evt,'ERROR');

1496: wf_log_pkg.string(wf_log_pkg.level_error,
1497: 'wf.plsql.WF_EVENT.listen.error',
1498: 'GetDeferEventCtx Error');
1499: end if;
1500: wf_event.setErrorInfo(evt,'ERROR');
1501: wf_event.saveErrorToQueue(evt);
1502: commit;
1503: l_error_count := l_error_count + 1;
1504: end if;

Line 1501: wf_event.saveErrorToQueue(evt);

1497: 'wf.plsql.WF_EVENT.listen.error',
1498: 'GetDeferEventCtx Error');
1499: end if;
1500: wf_event.setErrorInfo(evt,'ERROR');
1501: wf_event.saveErrorToQueue(evt);
1502: commit;
1503: l_error_count := l_error_count + 1;
1504: end if;
1505: end;

Line 1514: wf_event.InitPhaseMinThreshold;

1510: exit;
1511: end if;
1512:
1513: evt := null;
1514: wf_event.InitPhaseMinThreshold;
1515: wf_event.SetDispatchMode('SYNC');
1516:
1517: if (p_message_count > 0 AND l_lsn_msg_count >= p_message_count ) then
1518: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then

Line 1515: wf_event.SetDispatchMode('SYNC');

1511: end if;
1512:
1513: evt := null;
1514: wf_event.InitPhaseMinThreshold;
1515: wf_event.SetDispatchMode('SYNC');
1516:
1517: if (p_message_count > 0 AND l_lsn_msg_count >= p_message_count ) then
1518: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1519: wf_log_pkg.string(wf_log_pkg.level_statement,

Line 1520: 'wf.plsql.WF_EVENT.listen.maxMsgCount',

1516:
1517: if (p_message_count > 0 AND l_lsn_msg_count >= p_message_count ) then
1518: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1519: wf_log_pkg.string(wf_log_pkg.level_statement,
1520: 'wf.plsql.WF_EVENT.listen.maxMsgCount',
1521: 'Read the specified maximum number of messages');
1522: end if;
1523: exit;
1524: end if;

Line 1529: 'wf.plsql.WF_EVENT.listen.maxErrCount',

1525:
1526: if (p_max_error_count > 0 AND l_error_count >= p_max_error_count ) then
1527: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1528: wf_log_pkg.string(wf_log_pkg.level_error,
1529: 'wf.plsql.WF_EVENT.listen.maxErrCount',
1530: 'Encountered the specified maximum number of errors');
1531: end if;
1532: exit;
1533: end if;

Line 1542: wf_event.dequeue(agt, evt, qh, p_wait, p_correlation, p_deq_condition);

1538: */
1539:
1540: begin
1541: savepoint bes_before_dequeue_qh;
1542: wf_event.dequeue(agt, evt, qh, p_wait, p_correlation, p_deq_condition);
1543: exception
1544: when others then
1545: wf_event.wf_exception_source := 'QH';
1546: rollback to bes_before_dequeue_qh;

Line 1545: wf_event.wf_exception_source := 'QH';

1541: savepoint bes_before_dequeue_qh;
1542: wf_event.dequeue(agt, evt, qh, p_wait, p_correlation, p_deq_condition);
1543: exception
1544: when others then
1545: wf_event.wf_exception_source := 'QH';
1546: rollback to bes_before_dequeue_qh;
1547: raise;
1548: end;
1549: end loop;

Line 1555: if (wf_event.wf_exception_source = 'WF'

1551: p_max_error_count := l_error_count; -- return back the actual error message count
1552: -- Normally l_lsn_msg_count >= l_error_count;
1553: exception
1554: when no_data_found then
1555: if (wf_event.wf_exception_source = 'WF'
1556: OR wf_event.wf_exception_source = 'QH') then
1557: raise;
1558: else
1559: wf_core.context('Wf_Event', 'Listen', p_agent_name);

Line 1556: OR wf_event.wf_exception_source = 'QH') then

1552: -- Normally l_lsn_msg_count >= l_error_count;
1553: exception
1554: when no_data_found then
1555: if (wf_event.wf_exception_source = 'WF'
1556: OR wf_event.wf_exception_source = 'QH') then
1557: raise;
1558: else
1559: wf_core.context('Wf_Event', 'Listen', p_agent_name);
1560: wf_core.raise('WFE_AGENT_NOTEXIST');

Line 1559: wf_core.context('Wf_Event', 'Listen', p_agent_name);

1555: if (wf_event.wf_exception_source = 'WF'
1556: OR wf_event.wf_exception_source = 'QH') then
1557: raise;
1558: else
1559: wf_core.context('Wf_Event', 'Listen', p_agent_name);
1560: wf_core.raise('WFE_AGENT_NOTEXIST');
1561: end if;
1562: when others then
1563: wf_core.context('Wf_Event', 'Listen', p_agent_name);

Line 1563: wf_core.context('Wf_Event', 'Listen', p_agent_name);

1559: wf_core.context('Wf_Event', 'Listen', p_agent_name);
1560: wf_core.raise('WFE_AGENT_NOTEXIST');
1561: end if;
1562: when others then
1563: wf_core.context('Wf_Event', 'Listen', p_agent_name);
1564: raise;
1565: end;
1566: ---------------------------------------------------------------------------
1567: /*

Line 1608: wf_event.listen(p_agent_name => p_agent_name,

1604:
1605: --Bug 2649327
1606: --The deq condition is not used at present for dequeuing
1607: -- Hence setting it to NULL.
1608: wf_event.listen(p_agent_name => p_agent_name,
1609: p_wait => l_p_wait,
1610: p_correlation => l_correlation,
1611: p_deq_condition=>NULL);
1612:

Line 1643: evt wf_event_t;

1639: qh varchar2(240);
1640: stat varchar2(10);
1641: agt raw(16);
1642: sagt raw(16);
1643: evt wf_event_t;
1644: err_evt wf_event_t;
1645: evt_errmsg VARCHAR2(4000);
1646: l_queueTable VARCHAR2(30); --
1647: end_of_transaction exception;

Line 1644: err_evt wf_event_t;

1640: stat varchar2(10);
1641: agt raw(16);
1642: sagt raw(16);
1643: evt wf_event_t;
1644: err_evt wf_event_t;
1645: evt_errmsg VARCHAR2(4000);
1646: l_queueTable VARCHAR2(30); --
1647: end_of_transaction exception;
1648: pragma exception_init (end_of_transaction, -25235);

Line 1657: if (WF_EVENT.g_local_system_guid is NULL) then

1653:
1654: -- Confirm that p_agent_name includes a transactional queue.
1655: -- Tuned and separated sql statement for better performance
1656: -- restricting Listen() to local system.
1657: if (WF_EVENT.g_local_system_guid is NULL) then
1658: g_local_system_guid := hextoraw(WF_CORE.Translate('WF_SYSTEM_GUID'));
1659: end if;
1660:
1661: GetAgentDetails(p_agent_name);

Line 1666: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);

1662:
1663: -- get agent details for local system
1664: l_agent_obj := wf_bes_cache.GetAgentByName(p_agent_name, null);
1665: if (l_agent_obj is null) then
1666: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);
1667: wf_core.raise('WFE_AGENT_NOTEXIST');
1668: end if;
1669:
1670: if (WF_EVENT.g_message_grouping <> 'TRANSACTIONAL') then

Line 1670: if (WF_EVENT.g_message_grouping <> 'TRANSACTIONAL') then

1666: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);
1667: wf_core.raise('WFE_AGENT_NOTEXIST');
1668: end if;
1669:
1670: if (WF_EVENT.g_message_grouping <> 'TRANSACTIONAL') then
1671: --This is not a transactional queue.
1672: WF_CORE.Context('Wf_Event', 'Listen_GRP', p_agent_name);
1673: WF_CORE.Token('AGENT', p_agent_name);
1674: WF_CORE.Token('API', 'WF_EVENT.Listen');

Line 1672: WF_CORE.Context('Wf_Event', 'Listen_GRP', p_agent_name);

1668: end if;
1669:
1670: if (WF_EVENT.g_message_grouping <> 'TRANSACTIONAL') then
1671: --This is not a transactional queue.
1672: WF_CORE.Context('Wf_Event', 'Listen_GRP', p_agent_name);
1673: WF_CORE.Token('AGENT', p_agent_name);
1674: WF_CORE.Token('API', 'WF_EVENT.Listen');
1675: WF_CORE.Raise('WFE_NONTRXN_QUEUE');
1676: end if;

Line 1674: WF_CORE.Token('API', 'WF_EVENT.Listen');

1670: if (WF_EVENT.g_message_grouping <> 'TRANSACTIONAL') then
1671: --This is not a transactional queue.
1672: WF_CORE.Context('Wf_Event', 'Listen_GRP', p_agent_name);
1673: WF_CORE.Token('AGENT', p_agent_name);
1674: WF_CORE.Token('API', 'WF_EVENT.Listen');
1675: WF_CORE.Raise('WFE_NONTRXN_QUEUE');
1676: end if;
1677:
1678: --Verifying that the system is not disabled.

Line 1679: if (wf_event.local_system_status = 'DISABLED') then

1675: WF_CORE.Raise('WFE_NONTRXN_QUEUE');
1676: end if;
1677:
1678: --Verifying that the system is not disabled.
1679: if (wf_event.local_system_status = 'DISABLED') then
1680: return;
1681: end if;
1682:
1683: -- Set the dequeue navigation option to be DBMS_AQ.FIRST_MESSAGE

Line 1684: wf_event.navigation := dbms_aq.first_message;

1680: return;
1681: end if;
1682:
1683: -- Set the dequeue navigation option to be DBMS_AQ.FIRST_MESSAGE
1684: wf_event.navigation := dbms_aq.first_message;
1685: /*
1686: ** We need to explicitly make sure that if someones Queue Handler
1687: ** blows up we rollback the transaction, just in case they don't
1688: */

Line 1698: 'wf.plsql.WF_EVENT.Listen_GRP.processing',

1694: savepoint trxn_start;
1695:
1696: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1697: wf_log_pkg.string(wf_log_pkg.level_statement,
1698: 'wf.plsql.WF_EVENT.Listen_GRP.processing',
1699: 'Begin processing transaction');
1700: end if;
1701:
1702: begin

Line 1706: wf_event.dequeue(agt, evt, qh,p_wait);

1702: begin
1703:
1704: -- Dequeue the first message in the transaction
1705: savepoint bes_before_dequeue_qh;
1706: wf_event.dequeue(agt, evt, qh,p_wait);
1707:
1708: exception
1709: when end_of_transaction then
1710: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then

Line 1712: 'wf.plsql.WF_EVENT.Listen_GRP.complete',

1708: exception
1709: when end_of_transaction then
1710: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then
1711: wf_log_pkg.string(wf_log_pkg.level_event,
1712: 'wf.plsql.WF_EVENT.Listen_GRP.complete',
1713: 'End of the transaction');
1714: end if;
1715: wf_event.navigation := dbms_aq.next_transaction;
1716: commit;

Line 1715: wf_event.navigation := dbms_aq.next_transaction;

1711: wf_log_pkg.string(wf_log_pkg.level_event,
1712: 'wf.plsql.WF_EVENT.Listen_GRP.complete',
1713: 'End of the transaction');
1714: end if;
1715: wf_event.navigation := dbms_aq.next_transaction;
1716: commit;
1717:
1718: when others then
1719: wf_event.wf_exception_source := 'QH';

Line 1719: wf_event.wf_exception_source := 'QH';

1715: wf_event.navigation := dbms_aq.next_transaction;
1716: commit;
1717:
1718: when others then
1719: wf_event.wf_exception_source := 'QH';
1720: rollback to bes_before_dequeue_qh;
1721: raise;
1722:
1723: end;

Line 1735: 'wf.plsql.WF_EVENT.Listen_GRP.event_dequeued',

1731: from_agt_sys := evt.getFromAgent().getSystem();
1732:
1733: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1734: wf_log_pkg.string(wf_log_pkg.level_statement,
1735: 'wf.plsql.WF_EVENT.Listen_GRP.event_dequeued',
1736: 'Event '||evt.getEventName()||', hailing from '||from_agt_name||'@'||
1737: from_agt_sys|| ' was dequeued from '|| p_agent_name);
1738: end if;
1739:

Line 1766: wf_event.dispatch(st, sagt, evt);

1762:
1763: -- Begin Dispatching the event message.
1764:
1765: begin
1766: wf_event.dispatch(st, sagt, evt);
1767:
1768: exception
1769: when others then
1770: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then

Line 1772: 'wf.plsql.WF_EVENT.Listen_GRP.dispatch_error',

1768: exception
1769: when others then
1770: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
1771: wf_log_pkg.string(wf_log_pkg.level_error,
1772: 'wf.plsql.WF_EVENT.Listen_GRP.dispatch_error',
1773: 'Dispatch Error when dispatching Event '||evt.getEventName);
1774: end if;
1775: raise dispatch_error;
1776:

Line 1786: wf_event.InitPhaseMinThreshold;

1782: exit;
1783: end if;
1784:
1785: evt := null;
1786: wf_event.InitPhaseMinThreshold;
1787: wf_event.SetDispatchMode('SYNC');
1788:
1789: begin
1790: savepoint bes_before_dequeue_qh;

Line 1787: wf_event.SetDispatchMode('SYNC');

1783: end if;
1784:
1785: evt := null;
1786: wf_event.InitPhaseMinThreshold;
1787: wf_event.SetDispatchMode('SYNC');
1788:
1789: begin
1790: savepoint bes_before_dequeue_qh;
1791: wf_event.dequeue(agt, evt, qh,p_wait);

Line 1791: wf_event.dequeue(agt, evt, qh,p_wait);

1787: wf_event.SetDispatchMode('SYNC');
1788:
1789: begin
1790: savepoint bes_before_dequeue_qh;
1791: wf_event.dequeue(agt, evt, qh,p_wait);
1792:
1793: exception
1794: when end_of_transaction then
1795: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then

Line 1797: 'wf.plsql.WF_EVENT.Listen_GRP.complete',

1793: exception
1794: when end_of_transaction then
1795: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then
1796: wf_log_pkg.string(wf_log_pkg.level_event,
1797: 'wf.plsql.WF_EVENT.Listen_GRP.complete',
1798: 'End of the transaction');
1799: end if;
1800:
1801: wf_event.navigation := dbms_aq.next_transaction;

Line 1801: wf_event.navigation := dbms_aq.next_transaction;

1797: 'wf.plsql.WF_EVENT.Listen_GRP.complete',
1798: 'End of the transaction');
1799: end if;
1800:
1801: wf_event.navigation := dbms_aq.next_transaction;
1802: commit;
1803:
1804: when others then
1805: wf_event.wf_exception_source := 'QH';

Line 1805: wf_event.wf_exception_source := 'QH';

1801: wf_event.navigation := dbms_aq.next_transaction;
1802: commit;
1803:
1804: when others then
1805: wf_event.wf_exception_source := 'QH';
1806: rollback to bes_before_dequeue_qh;
1807: raise;
1808:
1809: end;

Line 1820: wf_event.dequeue(agt, err_evt, qh,p_wait);

1816: when dispatch_error then
1817: --Dequeue the rest of the transaction
1818: begin
1819: loop
1820: wf_event.dequeue(agt, err_evt, qh,p_wait);
1821:
1822: end loop;
1823:
1824: exception

Line 1828: 'wf.plsql.WF_EVENT.Listen_GRP.complete',

1824: exception
1825: when end_of_transaction then
1826: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then
1827: wf_log_pkg.string(wf_log_pkg.level_event,
1828: 'wf.plsql.WF_EVENT.Listen_GRP.complete',
1829: 'End of the transaction after dispatch error');
1830: end if;
1831:
1832: wf_event.navigation := dbms_aq.next_transaction;

Line 1832: wf_event.navigation := dbms_aq.next_transaction;

1828: 'wf.plsql.WF_EVENT.Listen_GRP.complete',
1829: 'End of the transaction after dispatch error');
1830: end if;
1831:
1832: wf_event.navigation := dbms_aq.next_transaction;
1833:
1834: end;
1835:
1836: --Rollback the whole transaction, which will update the retry count

Line 1842: wf_event.setErrorInfo(evt, 'ERROR');

1838: rollback to trxn_start;
1839:
1840: --We will save the current message to the Error Queue.
1841: if ((evt.getValueForParameter('ERROR_NAME')) is NULL) then
1842: wf_event.setErrorInfo(evt, 'ERROR');
1843:
1844: end if;
1845:
1846: evt.addParameterToList('DEQUEUE_MODE', 'TRANSACTIONAL');

Line 1847: wf_event.saveErrorToQueue(evt);

1843:
1844: end if;
1845:
1846: evt.addParameterToList('DEQUEUE_MODE', 'TRANSACTIONAL');
1847: wf_event.saveErrorToQueue(evt);
1848:
1849:
1850: when others then
1851: raise;

Line 1854: if (wf_event.navigation = dbms_aq.first_message) then

1850: when others then
1851: raise;
1852:
1853: end;
1854: if (wf_event.navigation = dbms_aq.first_message) then
1855: exit; --Outer Loop.
1856: --The queue handler must have reached the last message and
1857: --reset the navigation back to the beginning.
1858:

Line 1864: if (wf_event.wf_exception_source = 'WF'

1860:
1861: end loop; --Outer loop to process all transactions in the queue.
1862: exception
1863: when no_data_found then
1864: if (wf_event.wf_exception_source = 'WF'
1865: OR wf_event.wf_exception_source = 'QH') then
1866: raise;
1867: else
1868: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);

Line 1865: OR wf_event.wf_exception_source = 'QH') then

1861: end loop; --Outer loop to process all transactions in the queue.
1862: exception
1863: when no_data_found then
1864: if (wf_event.wf_exception_source = 'WF'
1865: OR wf_event.wf_exception_source = 'QH') then
1866: raise;
1867: else
1868: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);
1869: wf_core.raise('WFE_AGENT_NOTEXIST');

Line 1868: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);

1864: if (wf_event.wf_exception_source = 'WF'
1865: OR wf_event.wf_exception_source = 'QH') then
1866: raise;
1867: else
1868: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);
1869: wf_core.raise('WFE_AGENT_NOTEXIST');
1870: end if;
1871: when others then
1872: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);

Line 1872: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);

1868: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);
1869: wf_core.raise('WFE_AGENT_NOTEXIST');
1870: end if;
1871: when others then
1872: wf_core.context('Wf_Event', 'Listen_GRP', p_agent_name);
1873: raise;
1874: end;
1875:
1876: ---------------------------------------------------------------------------

Line 1887: wf_event.listen_grp(p_agent_name);

1883: errname varchar2(30);
1884: errmsg varchar2(2000);
1885: errstack varchar2(4000);
1886: begin
1887: wf_event.listen_grp(p_agent_name);
1888:
1889: -- Return 0 for successful completion --
1890: errbuf := '';
1891: retcode := '0';

Line 1911: p_event in out nocopy wf_event_t)

1907: ** dispatch -
1908: */
1909: PROCEDURE dispatch(p_source_type in varchar2,
1910: p_source_agent_guid in raw,
1911: p_event in out nocopy wf_event_t)
1912: is
1913: res varchar2(20);
1914: cmd varchar2(1000);
1915: stat varchar2(10);

Line 1924: l_source_type wf_event_subscriptions.source_type%type;

1920: eguid raw(16);
1921: l_skip_sub raw(16);
1922: event_count NUMBER;
1923: l_rule_func varchar2(300);
1924: l_source_type wf_event_subscriptions.source_type%type;
1925: l_phase wf_event_subscriptions.phase%type;
1926: l_rule_data wf_event_subscriptions.rule_data%type;
1927: l_priority wf_event_subscriptions.priority%type;
1928: l_on_error wf_event_subscriptions.on_error_code%type;

Line 1925: l_phase wf_event_subscriptions.phase%type;

1921: l_skip_sub raw(16);
1922: event_count NUMBER;
1923: l_rule_func varchar2(300);
1924: l_source_type wf_event_subscriptions.source_type%type;
1925: l_phase wf_event_subscriptions.phase%type;
1926: l_rule_data wf_event_subscriptions.rule_data%type;
1927: l_priority wf_event_subscriptions.priority%type;
1928: l_on_error wf_event_subscriptions.on_error_code%type;
1929: --Bug 2437354

Line 1926: l_rule_data wf_event_subscriptions.rule_data%type;

1922: event_count NUMBER;
1923: l_rule_func varchar2(300);
1924: l_source_type wf_event_subscriptions.source_type%type;
1925: l_phase wf_event_subscriptions.phase%type;
1926: l_rule_data wf_event_subscriptions.rule_data%type;
1927: l_priority wf_event_subscriptions.priority%type;
1928: l_on_error wf_event_subscriptions.on_error_code%type;
1929: --Bug 2437354
1930: trig_savepoint exception;

Line 1927: l_priority wf_event_subscriptions.priority%type;

1923: l_rule_func varchar2(300);
1924: l_source_type wf_event_subscriptions.source_type%type;
1925: l_phase wf_event_subscriptions.phase%type;
1926: l_rule_data wf_event_subscriptions.rule_data%type;
1927: l_priority wf_event_subscriptions.priority%type;
1928: l_on_error wf_event_subscriptions.on_error_code%type;
1929: --Bug 2437354
1930: trig_savepoint exception;
1931: pragma exception_init(trig_savepoint, -04092);

Line 1928: l_on_error wf_event_subscriptions.on_error_code%type;

1924: l_source_type wf_event_subscriptions.source_type%type;
1925: l_phase wf_event_subscriptions.phase%type;
1926: l_rule_data wf_event_subscriptions.rule_data%type;
1927: l_priority wf_event_subscriptions.priority%type;
1928: l_on_error wf_event_subscriptions.on_error_code%type;
1929: --Bug 2437354
1930: trig_savepoint exception;
1931: pragma exception_init(trig_savepoint, -04092);
1932:

Line 1935: l_event_obj wf_event_obj;

1931: pragma exception_init(trig_savepoint, -04092);
1932:
1933: -- bes caching implementation
1934: l_event_name varchar2(240);
1935: l_event_obj wf_event_obj;
1936: l_subs_list wf_event_subs_tab;
1937: l_sub wf_event_subs_obj;
1938: begin
1939: l_event_name := p_event.Event_Name;

Line 1936: l_subs_list wf_event_subs_tab;

1932:
1933: -- bes caching implementation
1934: l_event_name varchar2(240);
1935: l_event_obj wf_event_obj;
1936: l_subs_list wf_event_subs_tab;
1937: l_sub wf_event_subs_obj;
1938: begin
1939: l_event_name := p_event.Event_Name;
1940:

Line 1937: l_sub wf_event_subs_obj;

1933: -- bes caching implementation
1934: l_event_name varchar2(240);
1935: l_event_obj wf_event_obj;
1936: l_subs_list wf_event_subs_tab;
1937: l_sub wf_event_subs_obj;
1938: begin
1939: l_event_name := p_event.Event_Name;
1940:
1941: -- Deleting any previous Event parameter indexes.

Line 1942: WF_EVENT.evt_param_index.DELETE;

1938: begin
1939: l_event_name := p_event.Event_Name;
1940:
1941: -- Deleting any previous Event parameter indexes.
1942: WF_EVENT.evt_param_index.DELETE;
1943:
1944: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1945: wf_log_pkg.string(wf_log_pkg.level_procedure,
1946: 'wf.plsql.WF_EVENT.dispatch.Begin',

Line 1946: 'wf.plsql.WF_EVENT.dispatch.Begin',

1942: WF_EVENT.evt_param_index.DELETE;
1943:
1944: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1945: wf_log_pkg.string(wf_log_pkg.level_procedure,
1946: 'wf.plsql.WF_EVENT.dispatch.Begin',
1947: 'Dispatching event '||l_event_name);
1948: end if;
1949:
1950: l_event_obj := wf_bes_cache.GetEventByName(l_event_name);

Line 1954: 'wf.plsql.WF_EVENT.dispatch.no_event',

1950: l_event_obj := wf_bes_cache.GetEventByName(l_event_name);
1951: if (l_event_obj is null) then
1952: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1953: wf_log_pkg.string(wf_log_pkg.level_statement,
1954: 'wf.plsql.WF_EVENT.dispatch.no_event',
1955: 'Event is either disabled or product not licensed '||
1956: 'or event not registered');
1957: end if;
1958: end if;

Line 1960: wf_event.wf_exception_source := 'NONE';

1956: 'or event not registered');
1957: end if;
1958: end if;
1959:
1960: wf_event.wf_exception_source := 'NONE';
1961:
1962: --
1963: -- mjc If Source Type is LOCAL and Phase Threshold is less than zero,
1964: -- the raise is to be deferred. Then we immediately return to

Line 1967: -- The wf_event.deferevent is called within a new block

1963: -- mjc If Source Type is LOCAL and Phase Threshold is less than zero,
1964: -- the raise is to be deferred. Then we immediately return to
1965: -- calling subprogram
1966: --
1967: -- The wf_event.deferevent is called within a new block
1968: -- Make sure only defer event when event exists.
1969: begin
1970: if (p_source_type = 'LOCAL' AND
1971: (wf_event.phase_maxthreshold < 0 OR p_event.send_date > sysdate) AND

Line 1971: (wf_event.phase_maxthreshold < 0 OR p_event.send_date > sysdate) AND

1967: -- The wf_event.deferevent is called within a new block
1968: -- Make sure only defer event when event exists.
1969: begin
1970: if (p_source_type = 'LOCAL' AND
1971: (wf_event.phase_maxthreshold < 0 OR p_event.send_date > sysdate) AND
1972: l_event_obj is not null) then
1973:
1974: if(isDeferToJava(true, l_event_name, p_source_type,
1975: null, null, null)) then

Line 1978: 'wf.plsql.WF_EVENT.dispatch.Defer',

1974: if(isDeferToJava(true, l_event_name, p_source_type,
1975: null, null, null)) then
1976: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1977: wf_log_pkg.string(wf_log_pkg.level_statement,
1978: 'wf.plsql.WF_EVENT.dispatch.Defer',
1979: 'Detected as deferred raise. Deferring to ' ||
1980: 'WF_JAVA_DEFERRED');
1981: end if;
1982: wf_event.DeferEventToJava(p_source_type, p_event);

Line 1982: wf_event.DeferEventToJava(p_source_type, p_event);

1978: 'wf.plsql.WF_EVENT.dispatch.Defer',
1979: 'Detected as deferred raise. Deferring to ' ||
1980: 'WF_JAVA_DEFERRED');
1981: end if;
1982: wf_event.DeferEventToJava(p_source_type, p_event);
1983: else
1984: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1985: wf_log_pkg.string(wf_log_pkg.level_statement,
1986: 'wf.plsql.WF_EVENT.dispatch.Defer',

Line 1986: 'wf.plsql.WF_EVENT.dispatch.Defer',

1982: wf_event.DeferEventToJava(p_source_type, p_event);
1983: else
1984: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1985: wf_log_pkg.string(wf_log_pkg.level_statement,
1986: 'wf.plsql.WF_EVENT.dispatch.Defer',
1987: 'Detected as deferred raise. Deferring to ' ||
1988: 'WF_DEFERRED');
1989: end if;
1990: wf_event.deferevent(p_source_type, p_event);

Line 1990: wf_event.deferevent(p_source_type, p_event);

1986: 'wf.plsql.WF_EVENT.dispatch.Defer',
1987: 'Detected as deferred raise. Deferring to ' ||
1988: 'WF_DEFERRED');
1989: end if;
1990: wf_event.deferevent(p_source_type, p_event);
1991: end if;
1992: return;
1993: end if;
1994: exception

Line 1996: wf_event.setErrorInfo(p_event, 'ERROR');

1992: return;
1993: end if;
1994: exception
1995: when others then
1996: wf_event.setErrorInfo(p_event, 'ERROR');
1997: wf_event.saveErrorToQueue(p_event);
1998: wf_core.context('Wf_Event', 'Dispatch', l_event_name);
1999: raise;
2000: end;

Line 1997: wf_event.saveErrorToQueue(p_event);

1993: end if;
1994: exception
1995: when others then
1996: wf_event.setErrorInfo(p_event, 'ERROR');
1997: wf_event.saveErrorToQueue(p_event);
1998: wf_core.context('Wf_Event', 'Dispatch', l_event_name);
1999: raise;
2000: end;
2001:

Line 1998: wf_core.context('Wf_Event', 'Dispatch', l_event_name);

1994: exception
1995: when others then
1996: wf_event.setErrorInfo(p_event, 'ERROR');
1997: wf_event.saveErrorToQueue(p_event);
1998: wf_core.context('Wf_Event', 'Dispatch', l_event_name);
1999: raise;
2000: end;
2001:
2002: --

Line 2025: wf_event.deferevent(p_source_type,p_event);

2021: exception
2022: when trig_savepoint then
2023: --If the event has not been deferred, defer the event now.
2024: begin
2025: wf_event.deferevent(p_source_type,p_event);
2026: return;
2027: exception
2028: --Incase deferreing of event fails, save the error to queue.
2029: --Should we save the error to queue since it is WF error?

Line 2031: wf_event.setErrorInfo(p_event, 'ERROR');

2027: exception
2028: --Incase deferreing of event fails, save the error to queue.
2029: --Should we save the error to queue since it is WF error?
2030: when others then
2031: wf_event.setErrorInfo(p_event, 'ERROR');
2032: wf_event.saveErrorToQueue(p_event);
2033: wf_core.context('Wf_Event', 'Dispatch', l_event_name);
2034: raise;
2035: end;

Line 2032: wf_event.saveErrorToQueue(p_event);

2028: --Incase deferreing of event fails, save the error to queue.
2029: --Should we save the error to queue since it is WF error?
2030: when others then
2031: wf_event.setErrorInfo(p_event, 'ERROR');
2032: wf_event.saveErrorToQueue(p_event);
2033: wf_core.context('Wf_Event', 'Dispatch', l_event_name);
2034: raise;
2035: end;
2036: end;

Line 2033: wf_core.context('Wf_Event', 'Dispatch', l_event_name);

2029: --Should we save the error to queue since it is WF error?
2030: when others then
2031: wf_event.setErrorInfo(p_event, 'ERROR');
2032: wf_event.saveErrorToQueue(p_event);
2033: wf_core.context('Wf_Event', 'Dispatch', l_event_name);
2034: raise;
2035: end;
2036: end;
2037:

Line 2048: res := wf_event.dispatch_internal(p_source_type => l_sub.SOURCE_TYPE,

2044: if (l_skip_sub is not null AND p_source_type = 'LOCAL') then
2045:
2046: l_sub := wf_bes_cache.GetSubscriptionByGUID(l_event_name, l_skip_sub);
2047: if (l_sub is not null) then
2048: res := wf_event.dispatch_internal(p_source_type => l_sub.SOURCE_TYPE,
2049: p_rule_data => l_sub.RULE_DATA,
2050: p_rule_func => trim(l_sub.RULE_FUNCTION),
2051: p_sub_guid => l_skip_sub,
2052: p_source_agent_guid => l_sub.SOURCE_AGENT_GUID,

Line 2076: 'wf.plsql.WF_EVENT.dispatch.Subscriptions',

2072:
2073: for i in 1..l_subs_list.COUNT loop
2074: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2075: wf_log_pkg.string(wf_log_pkg.level_statement,
2076: 'wf.plsql.WF_EVENT.dispatch.Subscriptions',
2077: 'Dispatching '||l_subs_list(i).SOURCE_TYPE||' subscription '||
2078: 'with Phase '||l_subs_list(i).PHASE);
2079: end if;
2080:

Line 2084: res := wf_event.dispatch_internal(p_source_type => l_subs_list(i).SOURCE_TYPE,

2080:
2081: eguid := l_subs_list(i).GUID;
2082: subs_found := TRUE;
2083:
2084: res := wf_event.dispatch_internal(p_source_type => l_subs_list(i).SOURCE_TYPE,
2085: p_rule_data => l_subs_list(i).RULE_DATA,
2086: p_rule_func => trim(l_subs_list(i).RULE_FUNCTION),
2087: p_sub_guid => l_subs_list(i).GUID,
2088: p_source_agent_guid => p_source_agent_guid,

Line 2105: l_subs_list := wf_bes_cache.GetSubscriptions(p_event_name => 'oracle.apps.wf.event.any',

2101: else
2102:
2103: -- dispatch subscriptions to Any event. this call does not execute the
2104: -- cursor with union all
2105: l_subs_list := wf_bes_cache.GetSubscriptions(p_event_name => 'oracle.apps.wf.event.any',
2106: p_source_type => dispatch.p_source_type,
2107: p_source_agent => dispatch.p_source_agent_guid);
2108: -- dispatching all matching subscriptions for Any event
2109: if (l_subs_list is not null) then

Line 2114: 'wf.plsql.WF_EVENT.dispatch.Any',

2110:
2111: for i in 1..l_subs_list.COUNT loop
2112: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2113: wf_log_pkg.string(wf_log_pkg.level_statement,
2114: 'wf.plsql.WF_EVENT.dispatch.Any',
2115: 'Dispatching '||l_subs_list(i).SOURCE_TYPE||' subscription '||
2116: 'with Phase '||l_subs_list(i).PHASE);
2117: end if;
2118:

Line 2122: res := wf_event.dispatch_internal(p_source_type => l_subs_list(i).SOURCE_TYPE,

2118:
2119: eguid := l_subs_list(i).GUID;
2120: subs_found := TRUE;
2121:
2122: res := wf_event.dispatch_internal(p_source_type => l_subs_list(i).SOURCE_TYPE,
2123: p_rule_data => l_subs_list(i).RULE_DATA,
2124: p_rule_func => trim(l_subs_list(i).RULE_FUNCTION),
2125: p_sub_guid => l_subs_list(i).GUID,
2126: p_source_agent_guid => p_source_agent_guid,

Line 2143: l_subs_list := wf_bes_cache.GetSubscriptions(p_event_name => 'oracle.apps.wf.event.unexpected',

2139: -- If no subscriptions dispatched, dispatch subscriptions for Unexpected event.
2140: -- Unexpected event is dispatched only for non-workflow events
2141: if ((not subs_found) and (l_event_name not like 'oracle.apps.wf%')) then
2142:
2143: l_subs_list := wf_bes_cache.GetSubscriptions(p_event_name => 'oracle.apps.wf.event.unexpected',
2144: p_source_type => dispatch.p_source_type,
2145: p_source_agent => dispatch.p_source_agent_guid);
2146: if (l_subs_list is not null) then
2147:

Line 2151: 'wf.plsql.WF_EVENT.dispatch.Unexpected',

2147:
2148: for i in 1..l_subs_list.COUNT loop
2149: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2150: wf_log_pkg.string(wf_log_pkg.level_statement,
2151: 'wf.plsql.WF_EVENT.dispatch.Unexpected',
2152: 'Dispatching '||l_subs_list(i).SOURCE_TYPE||' subscription '||
2153: 'with Phase '||l_subs_list(i).PHASE);
2154: end if;
2155:

Line 2157: res := wf_event.dispatch_internal(p_source_type => l_subs_list(i).SOURCE_TYPE,

2153: 'with Phase '||l_subs_list(i).PHASE);
2154: end if;
2155:
2156: eguid := l_subs_list(i).GUID;
2157: res := wf_event.dispatch_internal(p_source_type => l_subs_list(i).SOURCE_TYPE,
2158: p_rule_data => l_subs_list(i).RULE_DATA,
2159: p_rule_func => trim(l_subs_list(i).RULE_FUNCTION),
2160: p_sub_guid => l_subs_list(i).GUID,
2161: p_source_agent_guid => p_source_agent_guid,

Line 2176: if (WF_EVENT.g_message_grouping = 'TRANSACTIONAL') then

2172: end if;
2173: exception
2174: when others then
2175: -- Unexpected Error happened in dispatch_internal
2176: if (WF_EVENT.g_message_grouping = 'TRANSACTIONAL') then
2177: WF_CORE.Context('Wf_Event', 'Dispatch', l_event_name);
2178: else
2179: rollback to wf_dispatch_savepoint;
2180: p_event.setErrorSubscription(eguid);

Line 2177: WF_CORE.Context('Wf_Event', 'Dispatch', l_event_name);

2173: exception
2174: when others then
2175: -- Unexpected Error happened in dispatch_internal
2176: if (WF_EVENT.g_message_grouping = 'TRANSACTIONAL') then
2177: WF_CORE.Context('Wf_Event', 'Dispatch', l_event_name);
2178: else
2179: rollback to wf_dispatch_savepoint;
2180: p_event.setErrorSubscription(eguid);
2181: if (wf_event.wf_exception_source <> 'RULE') then

Line 2181: if (wf_event.wf_exception_source <> 'RULE') then

2177: WF_CORE.Context('Wf_Event', 'Dispatch', l_event_name);
2178: else
2179: rollback to wf_dispatch_savepoint;
2180: p_event.setErrorSubscription(eguid);
2181: if (wf_event.wf_exception_source <> 'RULE') then
2182: wf_event.wf_exception_source := 'WF';
2183: wf_event.setErrorInfo(p_event, 'UNEXPECTED');
2184: -- Unexpected Exception should be thrown up instead of
2185: -- being enqueued to error queue.

Line 2182: wf_event.wf_exception_source := 'WF';

2178: else
2179: rollback to wf_dispatch_savepoint;
2180: p_event.setErrorSubscription(eguid);
2181: if (wf_event.wf_exception_source <> 'RULE') then
2182: wf_event.wf_exception_source := 'WF';
2183: wf_event.setErrorInfo(p_event, 'UNEXPECTED');
2184: -- Unexpected Exception should be thrown up instead of
2185: -- being enqueued to error queue.
2186: -- wf_event.saveErrorToQueue(p_event);

Line 2183: wf_event.setErrorInfo(p_event, 'UNEXPECTED');

2179: rollback to wf_dispatch_savepoint;
2180: p_event.setErrorSubscription(eguid);
2181: if (wf_event.wf_exception_source <> 'RULE') then
2182: wf_event.wf_exception_source := 'WF';
2183: wf_event.setErrorInfo(p_event, 'UNEXPECTED');
2184: -- Unexpected Exception should be thrown up instead of
2185: -- being enqueued to error queue.
2186: -- wf_event.saveErrorToQueue(p_event);
2187: wf_core.context('Wf_Event', 'Dispatch', l_event_name);

Line 2186: -- wf_event.saveErrorToQueue(p_event);

2182: wf_event.wf_exception_source := 'WF';
2183: wf_event.setErrorInfo(p_event, 'UNEXPECTED');
2184: -- Unexpected Exception should be thrown up instead of
2185: -- being enqueued to error queue.
2186: -- wf_event.saveErrorToQueue(p_event);
2187: wf_core.context('Wf_Event', 'Dispatch', l_event_name);
2188: end if;
2189: end if;
2190: raise;

Line 2187: wf_core.context('Wf_Event', 'Dispatch', l_event_name);

2183: wf_event.setErrorInfo(p_event, 'UNEXPECTED');
2184: -- Unexpected Exception should be thrown up instead of
2185: -- being enqueued to error queue.
2186: -- wf_event.saveErrorToQueue(p_event);
2187: wf_core.context('Wf_Event', 'Dispatch', l_event_name);
2188: end if;
2189: end if;
2190: raise;
2191: end;

Line 2199: PROCEDURE enqueue(p_event in wf_event_t,

2195: ---------------------------------------------------------------------------
2196: /*
2197: ** enqueue -
2198: */
2199: PROCEDURE enqueue(p_event in wf_event_t,
2200: p_out_agent_override in wf_agent_t)
2201: is
2202: cmd varchar2(1000);
2203: qh varchar2(240);

Line 2233: 'wf.plsql.wf_event.enqueue.qhandler_callout',

2229: p_executed := false;
2230:
2231: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2232: wf_log_pkg.string2(wf_log_pkg.level_statement,
2233: 'wf.plsql.wf_event.enqueue.qhandler_callout',
2234: 'Start executing queue handler - '||qh, true);
2235: end if;
2236:
2237: WF_AGT_DYN_FUNCS.StaticEnqueue(qh, p_event, p_out_agent_override, p_executed);

Line 2249: 'wf.plsql.wf_event.enqueue.qhandler_callout',

2245: end if;
2246:
2247: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2248: wf_log_pkg.string2(wf_log_pkg.level_statement,
2249: 'wf.plsql.wf_event.enqueue.qhandler_callout',
2250: 'End executing queue handler - '||qh, false);
2251: end if;
2252: exception
2253: when others then

Line 2254: wf_core.context('Wf_Event', 'Enqueue', p_event.getEventName(), qh);

2250: 'End executing queue handler - '||qh, false);
2251: end if;
2252: exception
2253: when others then
2254: wf_core.context('Wf_Event', 'Enqueue', p_event.getEventName(), qh);
2255: wf_core.token('FUNCTION_NAME', qh||'.enqueue()');
2256: --wf_core.raise('WF_EXT_FUNCTION');
2257: raise;
2258: end;

Line 2264: p_event out nocopy wf_event_t,

2260: /*
2261: ** dequeue -
2262: */
2263: PROCEDURE dequeue(p_agent_guid in raw,
2264: p_event out nocopy wf_event_t,
2265: p_queue_handler in out nocopy varchar2,
2266: p_wait in binary_integer,
2267: p_correlation in varchar2,
2268: p_deq_condition in varchar2)

Line 2290: WF_EVENT.g_correlation := p_correlation;

2286: qh := p_queue_handler;
2287: end if;
2288:
2289: -- Set globals so the queue handlers can reference them.
2290: WF_EVENT.g_correlation := p_correlation;
2291: WF_EVENT.g_deq_condition := p_deq_condition;
2292:
2293: -- Call the static calls implementation first
2294: p_executed := false;

Line 2291: WF_EVENT.g_deq_condition := p_deq_condition;

2287: end if;
2288:
2289: -- Set globals so the queue handlers can reference them.
2290: WF_EVENT.g_correlation := p_correlation;
2291: WF_EVENT.g_deq_condition := p_deq_condition;
2292:
2293: -- Call the static calls implementation first
2294: p_executed := false;
2295:

Line 2298: 'wf.plsql.wf_event.dequeue.qhandler_callout',

2294: p_executed := false;
2295:
2296: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2297: wf_log_pkg.string2(wf_log_pkg.level_statement,
2298: 'wf.plsql.wf_event.dequeue.qhandler_callout',
2299: 'Start executing queue handler - '||qh, true);
2300: end if;
2301:
2302: WF_AGT_DYN_FUNCS.StaticDequeue(qh, p_agent_guid, p_event, p_wait, p_executed);

Line 2314: 'wf.plsql.wf_event.dequeue.qhandler_callout',

2310: end if;
2311:
2312: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2313: wf_log_pkg.string2(wf_log_pkg.level_statement,
2314: 'wf.plsql.wf_event.dequeue.qhandler_callout',
2315: 'End executing queue handler - '||qh, false);
2316: end if;
2317:
2318: p_queue_handler := qh;

Line 2321: wf_core.context('Wf_Event', 'Dequeue', p_agent_guid);

2317:
2318: p_queue_handler := qh;
2319: exception
2320: when others then
2321: wf_core.context('Wf_Event', 'Dequeue', p_agent_guid);
2322: wf_core.token('FUNCTION_NAME', qh||'.dequeue()');
2323: --wf_core.raise('WF_EXT_FUNCTION');
2324: raise;
2325: end;

Line 2331: -- Share the same logic as WF_EVENT_T.AddParameterToList

2327: /*
2328: ** AddParameterToList -
2329: */
2330: -- YOHUANG 3571176
2331: -- Share the same logic as WF_EVENT_T.AddParameterToList
2332: -- If there is any change of logic in this method, the change
2333: -- should be propagated over to WF_EVENT_T.
2334: PROCEDURE AddParameterToList(p_name in varchar2,
2335: p_value in varchar2,

Line 2333: -- should be propagated over to WF_EVENT_T.

2329: */
2330: -- YOHUANG 3571176
2331: -- Share the same logic as WF_EVENT_T.AddParameterToList
2332: -- If there is any change of logic in this method, the change
2333: -- should be propagated over to WF_EVENT_T.
2334: PROCEDURE AddParameterToList(p_name in varchar2,
2335: p_value in varchar2,
2336: p_parameterlist in out nocopy wf_parameter_list_t)
2337: is

Line 2425: 'wf.plsql.WF_EVENT.getValueForParam.get',

2421: if (myList(pos).getName() = p_Name) then
2422:
2423: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2424: wf_log_pkg.string(wf_log_pkg.level_statement,
2425: 'wf.plsql.WF_EVENT.getValueForParam.get',
2426: 'Name:'||p_Name||' Value:'||myList(pos).getValue());
2427: end if;
2428:
2429: return myList(pos).getValue();

Line 2461: wf_event.phase_maxthreshold := -1;

2457: PROCEDURE SetDispatchMode (p_mode in varchar2)
2458: is
2459: begin
2460: if p_mode = 'ASYNC' then
2461: wf_event.phase_maxthreshold := -1;
2462: else
2463: wf_event.phase_maxthreshold := 100;
2464: end if;
2465: exception

Line 2463: wf_event.phase_maxthreshold := 100;

2459: begin
2460: if p_mode = 'ASYNC' then
2461: wf_event.phase_maxthreshold := -1;
2462: else
2463: wf_event.phase_maxthreshold := 100;
2464: end if;
2465: exception
2466: when others then
2467: wf_core.context('Wf_Event', 'SetDispatchMode', p_mode);

Line 2467: wf_core.context('Wf_Event', 'SetDispatchMode', p_mode);

2463: wf_event.phase_maxthreshold := 100;
2464: end if;
2465: exception
2466: when others then
2467: wf_core.context('Wf_Event', 'SetDispatchMode', p_mode);
2468: raise;
2469: end SetDispatchMode;
2470: ---------------------------------------------------------------------------
2471: /*

Line 2477: wf_event.phase_minthreshold := 0;

2473: */
2474: PROCEDURE InitPhaseMinThreshold
2475: is
2476: begin
2477: wf_event.phase_minthreshold := 0;
2478: end InitPhaseMinThreshold;
2479: ---------------------------------------------------------------------------
2480: /*
2481: ** DeferEvent -

Line 2484: p_event in out nocopy wf_event_t)

2480: /*
2481: ** DeferEvent -
2482: */
2483: PROCEDURE DeferEvent(p_source_type in varchar2,
2484: p_event in out nocopy wf_event_t)
2485: is
2486: defagent wf_agent_t;
2487:
2488: begin

Line 2492: 'wf.plsql.WF_EVENT.DeferEvent.Begin',

2488: begin
2489:
2490: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
2491: wf_log_pkg.string(wf_log_pkg.level_procedure,
2492: 'wf.plsql.WF_EVENT.DeferEvent.Begin',
2493: 'Deferring Event: '||p_event.getEventName());
2494: end if;
2495: --
2496: -- Get the Local System Name and set the deferred agent

Line 2499: defagent := wf_agent_t('WF_DEFERRED',wf_event.local_system_name);

2495: --
2496: -- Get the Local System Name and set the deferred agent
2497: --
2498:
2499: defagent := wf_agent_t('WF_DEFERRED',wf_event.local_system_name);
2500:
2501: --
2502: -- If the defer is for a local event, set the
2503: -- Deferred Agent/System into the message for

Line 2509: 'wf.plsql.WF_EVENT.DeferEvent.Local',

2505: --
2506: if p_source_type = 'LOCAL' then
2507: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2508: wf_log_pkg.string(wf_log_pkg.level_statement,
2509: 'wf.plsql.WF_EVENT.DeferEvent.Local',
2510: 'Detected as Local, setting From Agent:'||
2511: 'WF_DEFERRED@'||wf_event.local_system_name);
2512: end if;
2513: p_event.From_Agent := defagent;

Line 2511: 'WF_DEFERRED@'||wf_event.local_system_name);

2507: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2508: wf_log_pkg.string(wf_log_pkg.level_statement,
2509: 'wf.plsql.WF_EVENT.DeferEvent.Local',
2510: 'Detected as Local, setting From Agent:'||
2511: 'WF_DEFERRED@'||wf_event.local_system_name);
2512: end if;
2513: p_event.From_Agent := defagent;
2514: end if;
2515:

Line 2521: 'wf.plsql.WF_EVENT.DeferEvent.done',

2517: -- Enqueue onto the deferred agent
2518: --
2519: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2520: wf_log_pkg.string(wf_log_pkg.level_statement,
2521: 'wf.plsql.WF_EVENT.DeferEvent.done',
2522: 'Enqueuing on Deferred Queue');
2523: end if;
2524:
2525: wf_event.enqueue(p_event,defagent);

Line 2525: wf_event.enqueue(p_event,defagent);

2521: 'wf.plsql.WF_EVENT.DeferEvent.done',
2522: 'Enqueuing on Deferred Queue');
2523: end if;
2524:
2525: wf_event.enqueue(p_event,defagent);
2526:
2527: exception
2528: when others then
2529: wf_core.context('Wf_Event', 'DeferEvent', p_event.getEventName(),

Line 2529: wf_core.context('Wf_Event', 'DeferEvent', p_event.getEventName(),

2525: wf_event.enqueue(p_event,defagent);
2526:
2527: exception
2528: when others then
2529: wf_core.context('Wf_Event', 'DeferEvent', p_event.getEventName(),
2530: p_event.getEventKey());
2531: raise;
2532: end DeferEvent;
2533: ---------------------------------------------------------------------------

Line 2538: p_event in out nocopy wf_event_t)

2534: /*
2535: ** DeferEventToJava -
2536: */
2537: PROCEDURE DeferEventToJava(p_source_type in varchar2,
2538: p_event in out nocopy wf_event_t)
2539: is
2540: defagent wf_agent_t;
2541:
2542: begin

Line 2545: 'wf.plsql.WF_EVENT.DeferEventToJava.Begin',

2541:
2542: begin
2543: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
2544: wf_log_pkg.string(wf_log_pkg.level_procedure,
2545: 'wf.plsql.WF_EVENT.DeferEventToJava.Begin',
2546: 'Deferring Event: '|| p_event.getEventName());
2547: end if;
2548: --
2549: -- Get the Local System Name and set the deferred agent

Line 2551: defagent := wf_agent_t('WF_JAVA_DEFERRED', wf_event.local_system_name);

2547: end if;
2548: --
2549: -- Get the Local System Name and set the deferred agent
2550: --
2551: defagent := wf_agent_t('WF_JAVA_DEFERRED', wf_event.local_system_name);
2552:
2553: --
2554: -- If the defer is for a local event, set the
2555: -- Deferred Agent/System into the message for

Line 2561: 'wf.plsql.WF_EVENT.DeferEventToJava.Local',

2557: --
2558: if p_source_type = 'LOCAL' then
2559: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2560: wf_log_pkg.string(wf_log_pkg.level_statement,
2561: 'wf.plsql.WF_EVENT.DeferEventToJava.Local',
2562: 'Detected as Local, setting From Agent:'||
2563: 'WF_JAVA_DEFERRED@'|| wf_event.local_system_name);
2564: end if;
2565: p_event.From_Agent := defagent;

Line 2563: 'WF_JAVA_DEFERRED@'|| wf_event.local_system_name);

2559: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2560: wf_log_pkg.string(wf_log_pkg.level_statement,
2561: 'wf.plsql.WF_EVENT.DeferEventToJava.Local',
2562: 'Detected as Local, setting From Agent:'||
2563: 'WF_JAVA_DEFERRED@'|| wf_event.local_system_name);
2564: end if;
2565: p_event.From_Agent := defagent;
2566: end if;
2567:

Line 2576: wf_event_ojmstext_qh.enqueue(p_event, defagent);

2572: --
2573: -- NOTE: Since we know that we need to defer to WF_JAVA_DEFERRED, we will
2574: -- directly invoke enqueue on the PL/SQL queue handler
2575: --
2576: wf_event_ojmstext_qh.enqueue(p_event, defagent);
2577:
2578: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2579: wf_log_pkg.string(wf_log_pkg.level_statement,
2580: 'wf.plsql.WF_EVENT.DeferEventToJava.done',

Line 2580: 'wf.plsql.WF_EVENT.DeferEventToJava.done',

2576: wf_event_ojmstext_qh.enqueue(p_event, defagent);
2577:
2578: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2579: wf_log_pkg.string(wf_log_pkg.level_statement,
2580: 'wf.plsql.WF_EVENT.DeferEventToJava.done',
2581: 'Enqueuing on Java Deferred Queue');
2582: end if;
2583:
2584: exception

Line 2586: wf_core.context('Wf_Event', 'DeferEventToJava', p_event.getEventName(),

2582: end if;
2583:
2584: exception
2585: when others then
2586: wf_core.context('Wf_Event', 'DeferEventToJava', p_event.getEventName(),
2587: p_event.getEventKey());
2588: raise;
2589: end DeferEventToJava;
2590: ---------------------------------------------------------------------------

Line 2597: p_event in wf_event_t)

2593: */
2594: PROCEDURE GetDeferEventCtx (p_source_type in out nocopy varchar2,
2595: p_agent_name in varchar2,
2596: p_system_name in varchar2,
2597: p_event in wf_event_t)
2598: is
2599: subguid raw(16);
2600: lphasestart number;
2601: lsrc varchar2(10);

Line 2604: l_sub wf_event_subs_obj;

2600: lphasestart number;
2601: lsrc varchar2(10);
2602:
2603: -- bes caching implementation
2604: l_sub wf_event_subs_obj;
2605: l_event_name varchar2(240);
2606: begin
2607:
2608: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then

Line 2610: 'wf.plsql.WF_EVENT.DeferEventCtx.Begin',

2606: begin
2607:
2608: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
2609: wf_log_pkg.string(wf_log_pkg.level_procedure,
2610: 'wf.plsql.WF_EVENT.DeferEventCtx.Begin',
2611: 'Getting Defer Event Ctx');
2612: end if;
2613: --
2614: -- Determine the Start Phase, and sourec type

Line 2619: 'wf.plsql.WF_EVENT.DeferEventCtx.sub_guid',

2615: --
2616: subguid := p_event.Error_Subscription;
2617: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2618: wf_log_pkg.string(wf_log_pkg.level_statement,
2619: 'wf.plsql.WF_EVENT.DeferEventCtx.sub_guid',
2620: 'Sub Guid is '||subguid);
2621: end if;
2622:
2623: l_event_name := p_event.GetEventName();

Line 2640: wf_event.phase_minthreshold := lphasestart;

2636: END if;
2637:
2638: end if;
2639:
2640: wf_event.phase_minthreshold := lphasestart;
2641: else
2642: wf_event.phase_minthreshold := 0; -- for deferred raise
2643: end if;
2644:

Line 2642: wf_event.phase_minthreshold := 0; -- for deferred raise

2638: end if;
2639:
2640: wf_event.phase_minthreshold := lphasestart;
2641: else
2642: wf_event.phase_minthreshold := 0; -- for deferred raise
2643: end if;
2644:
2645: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2646: wf_log_pkg.string(wf_log_pkg.level_statement,

Line 2647: 'wf.plsql.WF_EVENT.DeferEventCtx.phase',

2643: end if;
2644:
2645: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2646: wf_log_pkg.string(wf_log_pkg.level_statement,
2647: 'wf.plsql.WF_EVENT.DeferEventCtx.phase',
2648: 'Start Phase is '||to_char(wf_event.phase_minthreshold));
2649: end if;
2650:
2651: if lsrc is null then

Line 2648: 'Start Phase is '||to_char(wf_event.phase_minthreshold));

2644:
2645: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
2646: wf_log_pkg.string(wf_log_pkg.level_statement,
2647: 'wf.plsql.WF_EVENT.DeferEventCtx.phase',
2648: 'Start Phase is '||to_char(wf_event.phase_minthreshold));
2649: end if;
2650:
2651: if lsrc is null then
2652: --

Line 2655: if ((p_agent_name = 'WF_DEFERRED') AND (p_system_name = wf_event.local_system_name)) then

2651: if lsrc is null then
2652: --
2653: -- Derive the Source Type
2654: --
2655: if ((p_agent_name = 'WF_DEFERRED') AND (p_system_name = wf_event.local_system_name)) then
2656: p_source_type := 'LOCAL';
2657: elsif ((p_system_name is null) OR (p_system_name <> wf_event.local_system_name))then
2658: p_source_type := 'EXTERNAL';
2659: elsif ((p_agent_name <> 'WF_DEFERRED') AND (p_system_name = wf_event.local_system_name)) then

Line 2657: elsif ((p_system_name is null) OR (p_system_name <> wf_event.local_system_name))then

2653: -- Derive the Source Type
2654: --
2655: if ((p_agent_name = 'WF_DEFERRED') AND (p_system_name = wf_event.local_system_name)) then
2656: p_source_type := 'LOCAL';
2657: elsif ((p_system_name is null) OR (p_system_name <> wf_event.local_system_name))then
2658: p_source_type := 'EXTERNAL';
2659: elsif ((p_agent_name <> 'WF_DEFERRED') AND (p_system_name = wf_event.local_system_name)) then
2660: p_source_type := 'EXTERNAL';
2661: end if;

Line 2659: elsif ((p_agent_name <> 'WF_DEFERRED') AND (p_system_name = wf_event.local_system_name)) then

2655: if ((p_agent_name = 'WF_DEFERRED') AND (p_system_name = wf_event.local_system_name)) then
2656: p_source_type := 'LOCAL';
2657: elsif ((p_system_name is null) OR (p_system_name <> wf_event.local_system_name))then
2658: p_source_type := 'EXTERNAL';
2659: elsif ((p_agent_name <> 'WF_DEFERRED') AND (p_system_name = wf_event.local_system_name)) then
2660: p_source_type := 'EXTERNAL';
2661: end if;
2662: else
2663: p_source_type := lsrc;

Line 2668: 'wf.plsql.WF_EVENT.DeferEventCtx.End',

2664: end if;
2665:
2666: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
2667: wf_log_pkg.string(wf_log_pkg.level_procedure,
2668: 'wf.plsql.WF_EVENT.DeferEventCtx.End',
2669: 'Source Type is '||p_source_type);
2670: end if;
2671:
2672: exception

Line 2676: wf_core.context('Wf_Event', 'GetDeferEventCtx','Sub guid is ' || subguid);

2672: exception
2673: /* Bug 2210085 */
2674: when no_data_found then
2675: /*
2676: wf_core.context('Wf_Event', 'GetDeferEventCtx','Sub guid is ' || subguid);
2677: wf_core.token('SGUID', subguid);
2678: wf_core.raise('WFE_SUB_DELETED');
2679: */
2680: raise;

Line 2683: wf_core.context('Wf_Event', 'GetDeferEventCtx', p_event.getEventName(),

2679: */
2680: raise;
2681:
2682: when others then
2683: wf_core.context('Wf_Event', 'GetDeferEventCtx', p_event.getEventName(),
2684: p_event.getEventKey());
2685: raise;
2686: end GetDeferEventCtx;
2687: ---------------------------------------------------------------------------

Line 2696: into wf_event.account_name

2692: is
2693: begin
2694: -- get the account name - only need this for WF_DEFERRED
2695: select sys_context('USERENV', 'CURRENT_SCHEMA')
2696: into wf_event.account_name
2697: from sys.dual;
2698: exception
2699: when others then
2700: wf_core.context('Wf_Event', 'SetAccountName');

Line 2700: wf_core.context('Wf_Event', 'SetAccountName');

2696: into wf_event.account_name
2697: from sys.dual;
2698: exception
2699: when others then
2700: wf_core.context('Wf_Event', 'SetAccountName');
2701: raise;
2702: end SetAccountName;
2703: ---------------------------------------------------------------------------
2704: --

Line 2761: 'wf.plsql.WF_EVENT.raise2.Begin',

2757: begin
2758:
2759: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
2760: wf_log_pkg.string(wf_log_pkg.level_procedure,
2761: 'wf.plsql.WF_EVENT.raise2.Begin',
2762: 'Event Name:'||p_event_name||' Event Key:'||p_event_key);
2763: end if;
2764:
2765: if (p_parameter_name1 is not NULL) then

Line 2884: wf_event.raise(p_event_name, p_event_key, p_event_data, l_parameter_list, p_send_date);

2880: l_parameter_list.extend;
2881: l_parameter_list(i) := CreateParameter(p_parameter_name20, p_parameter_value20);
2882: end if;
2883:
2884: wf_event.raise(p_event_name, p_event_key, p_event_data, l_parameter_list, p_send_date);
2885:
2886: exception
2887: when others then
2888: raise;

Line 2920: event wf_event_t;

2916: p_parameter_list in out nocopy wf_parameter_list_t,
2917: p_send_date in date)
2918: is
2919: o_value varchar2(200);
2920: event wf_event_t;
2921: begin
2922:
2923: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
2924: wf_log_pkg.string(wf_log_pkg.level_procedure,

Line 2925: 'wf.plsql.WF_EVENT.raise3.Begin',

2921: begin
2922:
2923: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
2924: wf_log_pkg.string(wf_log_pkg.level_procedure,
2925: 'wf.plsql.WF_EVENT.raise3.Begin',
2926: 'Event Name:'||p_event_name||' Event Key:'||p_event_key ||
2927: 'Maximum nested raise count:'|| wf_event.max_nested_raises||
2928: 'Nested raise count: '|| wf_event.nested_raise_count);
2929: end if;

Line 2927: 'Maximum nested raise count:'|| wf_event.max_nested_raises||

2923: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
2924: wf_log_pkg.string(wf_log_pkg.level_procedure,
2925: 'wf.plsql.WF_EVENT.raise3.Begin',
2926: 'Event Name:'||p_event_name||' Event Key:'||p_event_key ||
2927: 'Maximum nested raise count:'|| wf_event.max_nested_raises||
2928: 'Nested raise count: '|| wf_event.nested_raise_count);
2929: end if;
2930:
2931: wf_event.nested_raise_count := wf_event.nested_raise_count + 1;

Line 2928: 'Nested raise count: '|| wf_event.nested_raise_count);

2924: wf_log_pkg.string(wf_log_pkg.level_procedure,
2925: 'wf.plsql.WF_EVENT.raise3.Begin',
2926: 'Event Name:'||p_event_name||' Event Key:'||p_event_key ||
2927: 'Maximum nested raise count:'|| wf_event.max_nested_raises||
2928: 'Nested raise count: '|| wf_event.nested_raise_count);
2929: end if;
2930:
2931: wf_event.nested_raise_count := wf_event.nested_raise_count + 1;
2932: if (wf_event.nested_raise_count > wf_event.max_nested_raises) then

Line 2931: wf_event.nested_raise_count := wf_event.nested_raise_count + 1;

2927: 'Maximum nested raise count:'|| wf_event.max_nested_raises||
2928: 'Nested raise count: '|| wf_event.nested_raise_count);
2929: end if;
2930:
2931: wf_event.nested_raise_count := wf_event.nested_raise_count + 1;
2932: if (wf_event.nested_raise_count > wf_event.max_nested_raises) then
2933: --Bug 2620834
2934: --The nested count is reset to the initial value that was set before the
2935: --recursion error occurs.

Line 2932: if (wf_event.nested_raise_count > wf_event.max_nested_raises) then

2928: 'Nested raise count: '|| wf_event.nested_raise_count);
2929: end if;
2930:
2931: wf_event.nested_raise_count := wf_event.nested_raise_count + 1;
2932: if (wf_event.nested_raise_count > wf_event.max_nested_raises) then
2933: --Bug 2620834
2934: --The nested count is reset to the initial value that was set before the
2935: --recursion error occurs.
2936: --In future if we allow the user to set the nested-raises -count

Line 2938: wf_event.nested_raise_count := 0;

2934: --The nested count is reset to the initial value that was set before the
2935: --recursion error occurs.
2936: --In future if we allow the user to set the nested-raises -count
2937: --we could think of restting it to that value instead of zero.
2938: wf_event.nested_raise_count := 0;
2939:
2940: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
2941: wf_log_pkg.string(wf_log_pkg.level_error,
2942: 'wf.plsql.WF_EVENT.raise3.recursion_error',

Line 2942: 'wf.plsql.WF_EVENT.raise3.recursion_error',

2938: wf_event.nested_raise_count := 0;
2939:
2940: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
2941: wf_log_pkg.string(wf_log_pkg.level_error,
2942: 'wf.plsql.WF_EVENT.raise3.recursion_error',
2943: 'Recursion error raised. Nested raise count exceeded threshold');
2944: end if;
2945:
2946: wf_core.context('Wf_Event', 'raise', p_event_name, p_event_key);

Line 2946: wf_core.context('Wf_Event', 'raise', p_event_name, p_event_key);

2942: 'wf.plsql.WF_EVENT.raise3.recursion_error',
2943: 'Recursion error raised. Nested raise count exceeded threshold');
2944: end if;
2945:
2946: wf_core.context('Wf_Event', 'raise', p_event_name, p_event_key);
2947: wf_core.raise('WFE_RECURSION');
2948: end if;
2949:
2950: --Create the event that is to be raised

Line 2951: wf_event_t.initialize(event);

2947: wf_core.raise('WFE_RECURSION');
2948: end if;
2949:
2950: --Create the event that is to be raised
2951: wf_event_t.initialize(event);
2952: event.Send_Date := nvl(p_send_date,sysdate);
2953: event.Event_Name := p_event_name;
2954: event.Event_Key := p_event_key;
2955: event.Parameter_List := p_parameter_list;

Line 2960: wf_event.dispatch('LOCAL', null, event);

2956: if (p_event_data is not null) then
2957: event.event_data := p_event_data ;
2958: end if;
2959:
2960: wf_event.dispatch('LOCAL', null, event);
2961:
2962: --Output the parameterlist which may have been
2963: --modified
2964: p_parameter_list := event.getParameterList();

Line 2966: if (wf_event.nested_raise_count >0) then

2962: --Output the parameterlist which may have been
2963: --modified
2964: p_parameter_list := event.getParameterList();
2965:
2966: if (wf_event.nested_raise_count >0) then
2967: wf_event.nested_raise_count := wf_event.nested_raise_count - 1;
2968: end if;
2969:
2970: event := null;

Line 2967: wf_event.nested_raise_count := wf_event.nested_raise_count - 1;

2963: --modified
2964: p_parameter_list := event.getParameterList();
2965:
2966: if (wf_event.nested_raise_count >0) then
2967: wf_event.nested_raise_count := wf_event.nested_raise_count - 1;
2968: end if;
2969:
2970: event := null;
2971:

Line 2988: WF_EVENT.g_correlation := p_correlation;

2984: --------------------------------------------------------------------------------
2985: PROCEDURE Set_Correlation(p_correlation in varchar2)
2986: IS
2987: BEGIN
2988: WF_EVENT.g_correlation := p_correlation;
2989: WF_EVENT.navigation := dbms_aq.first_message;
2990: END Set_Correlation;
2991:
2992: ---------------------------------------------------------------------------

Line 2989: WF_EVENT.navigation := dbms_aq.first_message;

2985: PROCEDURE Set_Correlation(p_correlation in varchar2)
2986: IS
2987: BEGIN
2988: WF_EVENT.g_correlation := p_correlation;
2989: WF_EVENT.navigation := dbms_aq.first_message;
2990: END Set_Correlation;
2991:
2992: ---------------------------------------------------------------------------
2993: /*

Line 3000: wf_event.max_nested_raises := maxcount;

2996: */
2997: PROCEDURE SetMaxNestedRaise (maxcount in number)
2998: is
2999: begin
3000: wf_event.max_nested_raises := maxcount;
3001: end;
3002: ---------------------------------------------------------------------------
3003: /*
3004: ** SetNestedRaiseCount - Populates Global Variable : nested_raises_count

Line 3011: wf_event.nested_raise_count := nestedcount;

3007: */
3008: PROCEDURE SetNestedRaiseCount (nestedcount in number)
3009: is
3010: begin
3011: wf_event.nested_raise_count := nestedcount;
3012: --This private variable P_NESTED_RAISE_COUNT is updated
3013: --in sync with the setting of nested_raise_count global variable
3014: --It is used when the recursion error occurs inorder to reset the
3015: --value of wf_event.nested_raise_count.

Line 3015: --value of wf_event.nested_raise_count.

3011: wf_event.nested_raise_count := nestedcount;
3012: --This private variable P_NESTED_RAISE_COUNT is updated
3013: --in sync with the setting of nested_raise_count global variable
3014: --It is used when the recursion error occurs inorder to reset the
3015: --value of wf_event.nested_raise_count.
3016: --P_NESTED_RAISE_COUNT := wf_event.nested_raise_count;
3017: end;
3018: ---------------------------------------------------------------------------
3019: /*

Line 3016: --P_NESTED_RAISE_COUNT := wf_event.nested_raise_count;

3012: --This private variable P_NESTED_RAISE_COUNT is updated
3013: --in sync with the setting of nested_raise_count global variable
3014: --It is used when the recursion error occurs inorder to reset the
3015: --value of wf_event.nested_raise_count.
3016: --P_NESTED_RAISE_COUNT := wf_event.nested_raise_count;
3017: end;
3018: ---------------------------------------------------------------------------
3019: /*
3020: ** GetMaxNestedRaise - Get the value of the Global Variable max_nested_raises

Line 3027: return wf_event.max_nested_raises;

3023: FUNCTION GetMaxNestedRaise
3024: return number
3025: is
3026: begin
3027: return wf_event.max_nested_raises;
3028: end;
3029:
3030: ---------------------------------------------------------------------------
3031: /*

Line 3040: return wf_event.nested_raise_count;

3036: FUNCTION GetNestedRaiseCount
3037: return number
3038: is
3039: begin
3040: return wf_event.nested_raise_count;
3041: end;
3042:
3043: ---------------------------------------------------------------------------
3044:

Line 3049: return wf_event.g_msgid;

3045: FUNCTION Get_MsgId
3046: return varchar2
3047: is
3048: begin
3049: return wf_event.g_msgid;
3050: end;
3051:
3052: ---------------------------------------------------------------------------
3053: /*

Line 3061: system_guid := wf_event.local_system_guid;

3057: system_name out nocopy varchar2,
3058: system_status out nocopy varchar2)
3059: is
3060: begin
3061: system_guid := wf_event.local_system_guid;
3062: system_name := wf_event.local_system_name;
3063: system_status := wf_event.local_system_status;
3064: exception
3065: when others then

Line 3062: system_name := wf_event.local_system_name;

3058: system_status out nocopy varchar2)
3059: is
3060: begin
3061: system_guid := wf_event.local_system_guid;
3062: system_name := wf_event.local_system_name;
3063: system_status := wf_event.local_system_status;
3064: exception
3065: when others then
3066: wf_core.context('Wf_Event', 'GetLocalSystemName');

Line 3063: system_status := wf_event.local_system_status;

3059: is
3060: begin
3061: system_guid := wf_event.local_system_guid;
3062: system_name := wf_event.local_system_name;
3063: system_status := wf_event.local_system_status;
3064: exception
3065: when others then
3066: wf_core.context('Wf_Event', 'GetLocalSystemName');
3067: end GetLocalSystemInfo;

Line 3066: wf_core.context('Wf_Event', 'GetLocalSystemName');

3062: system_name := wf_event.local_system_name;
3063: system_status := wf_event.local_system_status;
3064: exception
3065: when others then
3066: wf_core.context('Wf_Event', 'GetLocalSystemName');
3067: end GetLocalSystemInfo;
3068: ---------------------------------------------------------------------------
3069: /*
3070: ** GetSourceAgentGUID -

Line 3087: 'wf.plsql.WF_EVENT.GetSourceAgentGUID.Error',

3083: agent_guid := l_agent_obj.GUID;
3084: else
3085: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
3086: wf_log_pkg.string(wf_log_pkg.level_error,
3087: 'wf.plsql.WF_EVENT.GetSourceAgentGUID.Error',
3088: 'Specified source agent row does '||
3089: 'not exist in database. Setting to NULL.');
3090: end if;
3091: agent_guid := null;

Line 3095: wf_core.context('Wf_Event', 'GetSourceAgentGUID', agent_name);

3091: agent_guid := null;
3092: end if;
3093: exception
3094: when others then
3095: wf_core.context('Wf_Event', 'GetSourceAgentGUID', agent_name);
3096: raise;
3097: end GetSourceAgentGUID;
3098: ---------------------------------------------------------------------------
3099: /*

Line 3117: 'wf.plsql.WF_EVENT.GetAgentDetails.Begin',

3113: l_agent_obj wf_agent_obj;
3114: begin
3115: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
3116: wf_log_pkg.string(wf_log_pkg.level_procedure,
3117: 'wf.plsql.WF_EVENT.GetAgentDetails.Begin',
3118: 'Get Agent Details');
3119: end if;
3120:
3121: if(agent_name is not null and agent_name <> wf_event.pv_last_agent_name) then

Line 3121: if(agent_name is not null and agent_name <> wf_event.pv_last_agent_name) then

3117: 'wf.plsql.WF_EVENT.GetAgentDetails.Begin',
3118: 'Get Agent Details');
3119: end if;
3120:
3121: if(agent_name is not null and agent_name <> wf_event.pv_last_agent_name) then
3122: -- for a given agent name Query wf_agents to get the agent info
3123:
3124: l_agent_obj := wf_bes_cache.GetAgentByName(agent_name, null);
3125: if (l_agent_obj is not null) then

Line 3131: 'wf.plsql.WF_EVENT.GetAgentDetails',

3127: end if;
3128:
3129: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
3130: wf_log_pkg.string(wf_log_pkg.level_statement,
3131: 'wf.plsql.WF_EVENT.GetAgentDetails',
3132: 'l_queue_name = ' || l_queue_name);
3133: end if;
3134:
3135: -- since since queue_name is a nullable col. l_queue_name could be null

Line 3147: l_owner := wf_event.schema_name;

3143: if (l_pos > 0) then
3144: l_owner := substr(l_queue_name, 1, l_pos - 1);
3145: else
3146: -- if queue_name does not contain schema we will look in WF_SCHEMA
3147: l_owner := wf_event.schema_name;
3148: end if;
3149:
3150: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
3151: wf_log_pkg.string(wf_log_pkg.level_statement,

Line 3152: 'wf.plsql.WF_EVENT.GetAgentDetails',

3148: end if;
3149:
3150: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
3151: wf_log_pkg.string(wf_log_pkg.level_statement,
3152: 'wf.plsql.WF_EVENT.GetAgentDetails',
3153: 'l_name = ' || l_name ||
3154: ' l_owner = ' || l_owner);
3155: end if;
3156:

Line 3160: into WF_EVENT.g_queueType, l_queue_table, WF_EVENT.pv_last_dequeue_enabled

3156:
3157: -- retrieve recipients (MULTIPLE or SINGLE) for AQ
3158: -- 3659756 When get agent details, check if the enqueue and dequeue are enabled.
3159: select aq.queue_type, aq.QUEUE_TABLE, trim(dequeue_enabled)
3160: into WF_EVENT.g_queueType, l_queue_table, WF_EVENT.pv_last_dequeue_enabled
3161: from all_queues aq
3162: where aq.owner = l_owner
3163: and aq.name = l_name;
3164:

Line 3166: into WF_EVENT.pv_last_recipients, WF_EVENT.g_message_grouping

3162: where aq.owner = l_owner
3163: and aq.name = l_name;
3164:
3165: select aqt.recipients, aqt.message_grouping
3166: into WF_EVENT.pv_last_recipients, WF_EVENT.g_message_grouping
3167: from all_queue_tables aqt
3168: where aqt.queue_table = l_queue_table
3169: and aqt.owner = l_owner;
3170:

Line 3172: wf_event.pv_last_agent_name := agent_name;

3168: where aqt.queue_table = l_queue_table
3169: and aqt.owner = l_owner;
3170:
3171: -- update package variables
3172: wf_event.pv_last_agent_name := agent_name;
3173: -- YOHUANG, l_queue_name shouldn't have owner information
3174: wf_event.pv_last_queue_name := l_name; --l_queue_name;
3175: wf_event.pv_last_schema_name := l_owner;
3176: else

Line 3174: wf_event.pv_last_queue_name := l_name; --l_queue_name;

3170:
3171: -- update package variables
3172: wf_event.pv_last_agent_name := agent_name;
3173: -- YOHUANG, l_queue_name shouldn't have owner information
3174: wf_event.pv_last_queue_name := l_name; --l_queue_name;
3175: wf_event.pv_last_schema_name := l_owner;
3176: else
3177: raise no_data_found;
3178: end if;

Line 3175: wf_event.pv_last_schema_name := l_owner;

3171: -- update package variables
3172: wf_event.pv_last_agent_name := agent_name;
3173: -- YOHUANG, l_queue_name shouldn't have owner information
3174: wf_event.pv_last_queue_name := l_name; --l_queue_name;
3175: wf_event.pv_last_schema_name := l_owner;
3176: else
3177: raise no_data_found;
3178: end if;
3179: end if;

Line 3182: 'wf.plsql.WF_EVENT.GetAgentDetails.END',

3178: end if;
3179: end if;
3180: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
3181: wf_log_pkg.string(wf_log_pkg.level_procedure,
3182: 'wf.plsql.WF_EVENT.GetAgentDetails.END',
3183: 'Get Agent Details');
3184: end if;
3185: exception
3186: when no_data_found then

Line 3227: 'wf.plsql.WF_EVENT.StartAgent.Begin',

3223:
3224: begin
3225: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
3226: wf_log_pkg.string(wf_log_pkg.level_procedure,
3227: 'wf.plsql.WF_EVENT.StartAgent.Begin',
3228: 'Starting Agents');
3229: end if;
3230: --Bug 2307433
3231: --Enable the deferred and error queues for

Line 3238: for q_name in q_disabled (wf_event.schema_name) loop

3234: --must be started.
3235: --schema := wf_core.translate('WF_SCHEMA');
3236: --Bug 3659756, no longer start fixed name queues.
3237: /*
3238: for q_name in q_disabled (wf_event.schema_name) loop
3239: DBMS_AQADM.START_QUEUE(wf_event.schema_name||'.'||q_name.name);
3240: end loop;
3241: */
3242: -- The agent details must be retrieved even for seeded queue.

Line 3239: DBMS_AQADM.START_QUEUE(wf_event.schema_name||'.'||q_name.name);

3235: --schema := wf_core.translate('WF_SCHEMA');
3236: --Bug 3659756, no longer start fixed name queues.
3237: /*
3238: for q_name in q_disabled (wf_event.schema_name) loop
3239: DBMS_AQADM.START_QUEUE(wf_event.schema_name||'.'||q_name.name);
3240: end loop;
3241: */
3242: -- The agent details must be retrieved even for seeded queue.
3243: GetAgentDetails(agent_name);

Line 3247: 'wf.plsql.WF_EVENT.StartAgent',

3243: GetAgentDetails(agent_name);
3244:
3245: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
3246: wf_log_pkg.string(wf_log_pkg.level_statement,
3247: 'wf.plsql.WF_EVENT.StartAgent',
3248: 'dequeue_enabled = ' || WF_EVENT.pv_last_dequeue_enabled);
3249: end if;
3250:
3251: if (WF_EVENT.pv_last_dequeue_enabled = 'NO') then

Line 3248: 'dequeue_enabled = ' || WF_EVENT.pv_last_dequeue_enabled);

3244:
3245: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
3246: wf_log_pkg.string(wf_log_pkg.level_statement,
3247: 'wf.plsql.WF_EVENT.StartAgent',
3248: 'dequeue_enabled = ' || WF_EVENT.pv_last_dequeue_enabled);
3249: end if;
3250:
3251: if (WF_EVENT.pv_last_dequeue_enabled = 'NO') then
3252: -- If the user has disabled the queue for enqueue don't override it.

Line 3251: if (WF_EVENT.pv_last_dequeue_enabled = 'NO') then

3247: 'wf.plsql.WF_EVENT.StartAgent',
3248: 'dequeue_enabled = ' || WF_EVENT.pv_last_dequeue_enabled);
3249: end if;
3250:
3251: if (WF_EVENT.pv_last_dequeue_enabled = 'NO') then
3252: -- If the user has disabled the queue for enqueue don't override it.
3253: -- So we only enable the dequeue if dequeue is not enabled and we don't change
3254: -- the current setting of enqueue.
3255:

Line 3258: 'wf.plsql.WF_EVENT.StartAgent',

3254: -- the current setting of enqueue.
3255:
3256: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
3257: wf_log_pkg.string(wf_log_pkg.level_statement,
3258: 'wf.plsql.WF_EVENT.StartAgent',
3259: 'starting queue = ' || wf_event.pv_last_schema_name
3260: || '.' || wf_event.pv_last_agent_name);
3261: end if;
3262:

Line 3259: 'starting queue = ' || wf_event.pv_last_schema_name

3255:
3256: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
3257: wf_log_pkg.string(wf_log_pkg.level_statement,
3258: 'wf.plsql.WF_EVENT.StartAgent',
3259: 'starting queue = ' || wf_event.pv_last_schema_name
3260: || '.' || wf_event.pv_last_agent_name);
3261: end if;
3262:
3263: DBMS_AQADM.START_QUEUE(wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, FALSE);

Line 3260: || '.' || wf_event.pv_last_agent_name);

3256: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
3257: wf_log_pkg.string(wf_log_pkg.level_statement,
3258: 'wf.plsql.WF_EVENT.StartAgent',
3259: 'starting queue = ' || wf_event.pv_last_schema_name
3260: || '.' || wf_event.pv_last_agent_name);
3261: end if;
3262:
3263: DBMS_AQADM.START_QUEUE(wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, FALSE);
3264:

Line 3263: DBMS_AQADM.START_QUEUE(wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, FALSE);

3259: 'starting queue = ' || wf_event.pv_last_schema_name
3260: || '.' || wf_event.pv_last_agent_name);
3261: end if;
3262:
3263: DBMS_AQADM.START_QUEUE(wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, FALSE);
3264:
3265: WF_EVENT.pv_last_dequeue_enabled := 'YES';
3266: end if;
3267:

Line 3265: WF_EVENT.pv_last_dequeue_enabled := 'YES';

3261: end if;
3262:
3263: DBMS_AQADM.START_QUEUE(wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, FALSE);
3264:
3265: WF_EVENT.pv_last_dequeue_enabled := 'YES';
3266: end if;
3267:
3268: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
3269: wf_log_pkg.string(wf_log_pkg.level_procedure,

Line 3270: 'wf.plsql.WF_EVENT.StartAgent.End',

3266: end if;
3267:
3268: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
3269: wf_log_pkg.string(wf_log_pkg.level_procedure,
3270: 'wf.plsql.WF_EVENT.StartAgent.End',
3271: 'Starting Agents');
3272: end if;
3273: exception
3274: when no_data_found then

Line 3275: wf_core.context('Wf_Event', 'StartAgent', agent_name);

3271: 'Starting Agents');
3272: end if;
3273: exception
3274: when no_data_found then
3275: wf_core.context('Wf_Event', 'StartAgent', agent_name);
3276: wf_core.raise('WFE_AGENT_NOTEXIST');
3277: when others then
3278: wf_core.context('Wf_Event', 'StartAgent', agent_name);
3279: raise;

Line 3278: wf_core.context('Wf_Event', 'StartAgent', agent_name);

3274: when no_data_found then
3275: wf_core.context('Wf_Event', 'StartAgent', agent_name);
3276: wf_core.raise('WFE_AGENT_NOTEXIST');
3277: when others then
3278: wf_core.context('Wf_Event', 'StartAgent', agent_name);
3279: raise;
3280: end StartAgent;
3281: ---------------------------------------------------------------------------
3282: /*

Line 3317: IF wf_event.pv_last_recipients = 'MULTIPLE' THEN

3313:
3314: -- bug 2897326, agent_list is initialized differently for
3315: -- multi or single consumer queue
3316:
3317: IF wf_event.pv_last_recipients = 'MULTIPLE' THEN
3318: l_agent_list(1) := sys.aq$_agent(wf_event.pv_last_agent_name,
3319: wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, null);
3320: ELSE
3321: l_agent_list(1) := sys.aq$_agent(null,

Line 3318: l_agent_list(1) := sys.aq$_agent(wf_event.pv_last_agent_name,

3314: -- bug 2897326, agent_list is initialized differently for
3315: -- multi or single consumer queue
3316:
3317: IF wf_event.pv_last_recipients = 'MULTIPLE' THEN
3318: l_agent_list(1) := sys.aq$_agent(wf_event.pv_last_agent_name,
3319: wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, null);
3320: ELSE
3321: l_agent_list(1) := sys.aq$_agent(null,
3322: wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, null);

Line 3319: wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, null);

3315: -- multi or single consumer queue
3316:
3317: IF wf_event.pv_last_recipients = 'MULTIPLE' THEN
3318: l_agent_list(1) := sys.aq$_agent(wf_event.pv_last_agent_name,
3319: wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, null);
3320: ELSE
3321: l_agent_list(1) := sys.aq$_agent(null,
3322: wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, null);
3323: END IF;

Line 3322: wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, null);

3318: l_agent_list(1) := sys.aq$_agent(wf_event.pv_last_agent_name,
3319: wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, null);
3320: ELSE
3321: l_agent_list(1) := sys.aq$_agent(null,
3322: wf_event.pv_last_schema_name || '.' || wf_event.pv_last_queue_name, null);
3323: END IF;
3324:
3325: -- "Listen" for messages on this queue
3326: BEGIN

Line 3375: wf_event.AddParameterToList(l_name, l_value, l_param_list);

3371: l_equalpos := instr(l_namevalue, '=', 1, 1);
3372: l_name := substr(l_namevalue,1,l_equalpos-1);
3373: l_value := substr(l_namevalue,l_equalpos+1,length(l_namevalue));
3374:
3375: wf_event.AddParameterToList(l_name, l_value, l_param_list);
3376: l_start := l_endposition+1;
3377: end loop;
3378: end if;
3379: return l_param_list;

Line 3382: wf_core.Context('WF_EVENT', 'GetParamListFromString');

3378: end if;
3379: return l_param_list;
3380: exception
3381: when others then
3382: wf_core.Context('WF_EVENT', 'GetParamListFromString');
3383: raise;
3384: end GetParamListFromString;
3385:
3386: ---------------------------------------------------------------------------

Line 3391: wf_event.local_system_guid := hextoraw(wf_core.translate('WF_SYSTEM_GUID'));

3387: /*
3388: ** SetSystemGlobals - Populates System Global Variables
3389: */
3390: begin
3391: wf_event.local_system_guid := hextoraw(wf_core.translate('WF_SYSTEM_GUID'));
3392:
3393: wf_event.local_system_status := wf_core.translate('WF_SYSTEM_STATUS');
3394:
3395: select name into wf_event.local_system_name

Line 3393: wf_event.local_system_status := wf_core.translate('WF_SYSTEM_STATUS');

3389: */
3390: begin
3391: wf_event.local_system_guid := hextoraw(wf_core.translate('WF_SYSTEM_GUID'));
3392:
3393: wf_event.local_system_status := wf_core.translate('WF_SYSTEM_STATUS');
3394:
3395: select name into wf_event.local_system_name
3396: from wf_systems
3397: where guid = wf_event.local_system_guid;

Line 3395: select name into wf_event.local_system_name

3391: wf_event.local_system_guid := hextoraw(wf_core.translate('WF_SYSTEM_GUID'));
3392:
3393: wf_event.local_system_status := wf_core.translate('WF_SYSTEM_STATUS');
3394:
3395: select name into wf_event.local_system_name
3396: from wf_systems
3397: where guid = wf_event.local_system_guid;
3398: ---------------------------------------------------------------------------
3399: wf_event.schema_name := wf_core.translate('WF_SCHEMA');

Line 3397: where guid = wf_event.local_system_guid;

3393: wf_event.local_system_status := wf_core.translate('WF_SYSTEM_STATUS');
3394:
3395: select name into wf_event.local_system_name
3396: from wf_systems
3397: where guid = wf_event.local_system_guid;
3398: ---------------------------------------------------------------------------
3399: wf_event.schema_name := wf_core.translate('WF_SCHEMA');
3400:
3401: wf_event.pv_last_agent_name := ' ';

Line 3399: wf_event.schema_name := wf_core.translate('WF_SCHEMA');

3395: select name into wf_event.local_system_name
3396: from wf_systems
3397: where guid = wf_event.local_system_guid;
3398: ---------------------------------------------------------------------------
3399: wf_event.schema_name := wf_core.translate('WF_SCHEMA');
3400:
3401: wf_event.pv_last_agent_name := ' ';
3402: wf_event.pv_last_queue_name := ' ';
3403: wf_event.pv_last_schema_name := ' ';

Line 3401: wf_event.pv_last_agent_name := ' ';

3397: where guid = wf_event.local_system_guid;
3398: ---------------------------------------------------------------------------
3399: wf_event.schema_name := wf_core.translate('WF_SCHEMA');
3400:
3401: wf_event.pv_last_agent_name := ' ';
3402: wf_event.pv_last_queue_name := ' ';
3403: wf_event.pv_last_schema_name := ' ';
3404: wf_event.pv_last_recipients := ' ';
3405: wf_event.pv_last_dequeue_enabled := ' ';

Line 3402: wf_event.pv_last_queue_name := ' ';

3398: ---------------------------------------------------------------------------
3399: wf_event.schema_name := wf_core.translate('WF_SCHEMA');
3400:
3401: wf_event.pv_last_agent_name := ' ';
3402: wf_event.pv_last_queue_name := ' ';
3403: wf_event.pv_last_schema_name := ' ';
3404: wf_event.pv_last_recipients := ' ';
3405: wf_event.pv_last_dequeue_enabled := ' ';
3406:

Line 3403: wf_event.pv_last_schema_name := ' ';

3399: wf_event.schema_name := wf_core.translate('WF_SCHEMA');
3400:
3401: wf_event.pv_last_agent_name := ' ';
3402: wf_event.pv_last_queue_name := ' ';
3403: wf_event.pv_last_schema_name := ' ';
3404: wf_event.pv_last_recipients := ' ';
3405: wf_event.pv_last_dequeue_enabled := ' ';
3406:
3407:

Line 3404: wf_event.pv_last_recipients := ' ';

3400:
3401: wf_event.pv_last_agent_name := ' ';
3402: wf_event.pv_last_queue_name := ' ';
3403: wf_event.pv_last_schema_name := ' ';
3404: wf_event.pv_last_recipients := ' ';
3405: wf_event.pv_last_dequeue_enabled := ' ';
3406:
3407:
3408: end WF_EVENT;

Line 3405: wf_event.pv_last_dequeue_enabled := ' ';

3401: wf_event.pv_last_agent_name := ' ';
3402: wf_event.pv_last_queue_name := ' ';
3403: wf_event.pv_last_schema_name := ' ';
3404: wf_event.pv_last_recipients := ' ';
3405: wf_event.pv_last_dequeue_enabled := ' ';
3406:
3407:
3408: end WF_EVENT;

Line 3408: end WF_EVENT;

3404: wf_event.pv_last_recipients := ' ';
3405: wf_event.pv_last_dequeue_enabled := ' ';
3406:
3407:
3408: end WF_EVENT;