DBA Data[Home] [Help]

APPS.WF_EVENT_QH dependencies on WF_EVENT

Line 1: package body WF_EVENT_QH as

1: package body WF_EVENT_QH as
2: /* $Header: wfquhndb.pls 120.3.12020000.4 2013/04/09 17:08:19 skandepu ship $ */
3: ------------------------------------------------------------------------------
4: PROCEDURE dequeue(p_agent_guid in raw,
5: p_event out nocopy wf_event_t,

Line 5: p_event out nocopy wf_event_t,

1: package body WF_EVENT_QH as
2: /* $Header: wfquhndb.pls 120.3.12020000.4 2013/04/09 17:08:19 skandepu ship $ */
3: ------------------------------------------------------------------------------
4: PROCEDURE dequeue(p_agent_guid in raw,
5: p_event out nocopy wf_event_t,
6: p_wait in binary_integer default dbms_aq.no_wait)
7: is
8: x_queue_name varchar2(80);
9: x_agent_name varchar2(30);

Line 28: 'wf.plsql.WF_EVENT_QH.dequeue.Begin',

24: where guid = p_agent_guid;
25:
26: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
27: wf_log_pkg.string(wf_log_pkg.level_procedure,
28: 'wf.plsql.WF_EVENT_QH.dequeue.Begin',
29: 'Dequeuing '||x_queue_name||' on '||x_agent_name);
30: end if;
31:
32: -- Set correlation Id for dequeue if only available and not '%'

Line 33: if (wf_event.g_correlation is not null and wf_event.g_correlation <> '%') then

29: 'Dequeuing '||x_queue_name||' on '||x_agent_name);
30: end if;
31:
32: -- Set correlation Id for dequeue if only available and not '%'
33: if (wf_event.g_correlation is not null and wf_event.g_correlation <> '%') then
34: -- Seeded agent with this queue handler
35: if (x_agent_name like 'WF_%') then
36: if (wf_event.account_name is null) then
37: wf_event.SetAccountName;

Line 36: if (wf_event.account_name is null) then

32: -- Set correlation Id for dequeue if only available and not '%'
33: if (wf_event.g_correlation is not null and wf_event.g_correlation <> '%') then
34: -- Seeded agent with this queue handler
35: if (x_agent_name like 'WF_%') then
36: if (wf_event.account_name is null) then
37: wf_event.SetAccountName;
38: end if;
39: x_dequeue_options.correlation := wf_event.account_name || ':' || wf_event.g_correlation;
40: else

Line 37: wf_event.SetAccountName;

33: if (wf_event.g_correlation is not null and wf_event.g_correlation <> '%') then
34: -- Seeded agent with this queue handler
35: if (x_agent_name like 'WF_%') then
36: if (wf_event.account_name is null) then
37: wf_event.SetAccountName;
38: end if;
39: x_dequeue_options.correlation := wf_event.account_name || ':' || wf_event.g_correlation;
40: else
41: x_dequeue_options.correlation := wf_event.g_correlation;

Line 39: x_dequeue_options.correlation := wf_event.account_name || ':' || wf_event.g_correlation;

35: if (x_agent_name like 'WF_%') then
36: if (wf_event.account_name is null) then
37: wf_event.SetAccountName;
38: end if;
39: x_dequeue_options.correlation := wf_event.account_name || ':' || wf_event.g_correlation;
40: else
41: x_dequeue_options.correlation := wf_event.g_correlation;
42: end if;
43:

Line 41: x_dequeue_options.correlation := wf_event.g_correlation;

37: wf_event.SetAccountName;
38: end if;
39: x_dequeue_options.correlation := wf_event.account_name || ':' || wf_event.g_correlation;
40: else
41: x_dequeue_options.correlation := wf_event.g_correlation;
42: end if;
43:
44: -- ER 16593551: If standard component is dequeuing the messages, set the dequeue condition
45: -- as a PLSQL function that evaluates the condition based on the message corrId and dedicated

Line 49: if (wf_event.account_name is null) then

45: -- as a PLSQL function that evaluates the condition based on the message corrId and dedicated
46: -- components correlation Id list and returns 0 or 1
47: elsif (x_agent_name = 'WF_DEFERRED') then
48:
49: if (wf_event.account_name is null) then
50: wf_event.SetAccountName;
51: end if;
52:
53: -- Get the dedicated components correlation Id list

Line 50: wf_event.SetAccountName;

46: -- components correlation Id list and returns 0 or 1
47: elsif (x_agent_name = 'WF_DEFERRED') then
48:
49: if (wf_event.account_name is null) then
50: wf_event.SetAccountName;
51: end if;
52:
53: -- Get the dedicated components correlation Id list
54: l_corrId_list := WF_CORE.getDedicatedComponentsCorrIds(x_agent_name, wf_event.account_name);

Line 54: l_corrId_list := WF_CORE.getDedicatedComponentsCorrIds(x_agent_name, wf_event.account_name);

50: wf_event.SetAccountName;
51: end if;
52:
53: -- Get the dedicated components correlation Id list
54: l_corrId_list := WF_CORE.getDedicatedComponentsCorrIds(x_agent_name, wf_event.account_name);
55:
56: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
57: wf_log_pkg.string(wf_log_pkg.level_statement,
58: 'wf.plsql.WF_EVENT_QH.dequeue.corr',

Line 58: 'wf.plsql.WF_EVENT_QH.dequeue.corr',

54: l_corrId_list := WF_CORE.getDedicatedComponentsCorrIds(x_agent_name, wf_event.account_name);
55:
56: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
57: wf_log_pkg.string(wf_log_pkg.level_statement,
58: 'wf.plsql.WF_EVENT_QH.dequeue.corr',
59: 'The dedicated components correlation ids list is:' || l_corrId_list);
60: end if;
61:
62: x_dequeue_options.correlation := null;

Line 72: if (wf_event.g_correlation is not null) then

68:
69: end if;
70:
71: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
72: if (wf_event.g_correlation is not null) then
73: wf_log_pkg.string(wf_log_pkg.level_procedure,
74: 'wf.plsql.WF_EVENT_QH.dequeue.corrid',
75: 'Dequeuing with Correlation:'|| x_dequeue_options.correlation);
76: else

Line 74: 'wf.plsql.WF_EVENT_QH.dequeue.corrid',

70:
71: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
72: if (wf_event.g_correlation is not null) then
73: wf_log_pkg.string(wf_log_pkg.level_procedure,
74: 'wf.plsql.WF_EVENT_QH.dequeue.corrid',
75: 'Dequeuing with Correlation:'|| x_dequeue_options.correlation);
76: else
77: wf_log_pkg.string(wf_log_pkg.level_procedure,
78: 'wf.plsql.WF_EVENT_QH.dequeue.corrid',

Line 78: 'wf.plsql.WF_EVENT_QH.dequeue.corrid',

74: 'wf.plsql.WF_EVENT_QH.dequeue.corrid',
75: 'Dequeuing with Correlation:'|| x_dequeue_options.correlation);
76: else
77: wf_log_pkg.string(wf_log_pkg.level_procedure,
78: 'wf.plsql.WF_EVENT_QH.dequeue.corrid',
79: 'Dequeuing with dequeue condition:'||x_dequeue_options.deq_condition);
80: end if;
81: end if;
82:

Line 83: if ((WF_EVENT.g_queueType is NULL) or

79: 'Dequeuing with dequeue condition:'||x_dequeue_options.deq_condition);
80: end if;
81: end if;
82:
83: if ((WF_EVENT.g_queueType is NULL) or
84: (WF_EVENT.g_queueType <> 'EXCEPTION_QUEUE')) then
85: x_dequeue_options.consumer_name := x_agent_name;
86: end if;
87:

Line 84: (WF_EVENT.g_queueType <> 'EXCEPTION_QUEUE')) then

80: end if;
81: end if;
82:
83: if ((WF_EVENT.g_queueType is NULL) or
84: (WF_EVENT.g_queueType <> 'EXCEPTION_QUEUE')) then
85: x_dequeue_options.consumer_name := x_agent_name;
86: end if;
87:
88: -- This functionality is dependent on 9i, so it cannot be uncommented in this

Line 91: -- if (WF_EVENT.g_deq_condition is not NULL) then

87:
88: -- This functionality is dependent on 9i, so it cannot be uncommented in this
89: -- file until 9i is the minimum rdbms on both e-business suite and iAS.
90: --
91: -- if (WF_EVENT.g_deq_condition is not NULL) then
92: -- x_dequeue_options.deq_condition := WF_EVENT.g_deq_condition;
93: --
94: -- end if;
95: --

Line 92: -- x_dequeue_options.deq_condition := WF_EVENT.g_deq_condition;

88: -- This functionality is dependent on 9i, so it cannot be uncommented in this
89: -- file until 9i is the minimum rdbms on both e-business suite and iAS.
90: --
91: -- if (WF_EVENT.g_deq_condition is not NULL) then
92: -- x_dequeue_options.deq_condition := WF_EVENT.g_deq_condition;
93: --
94: -- end if;
95: --
96:

Line 98: x_dequeue_options.navigation := wf_event.getQueueNavigation;

94: -- end if;
95: --
96:
97: x_dequeue_options.wait := p_wait;
98: x_dequeue_options.navigation := wf_event.getQueueNavigation;
99:
100:
101: BEGIN
102: DBMS_AQ.DEQUEUE(queue_name => x_queue_name,

Line 108: -- wf_event.navigation := dbms_aq.next_message;

104: message_properties => x_message_properties, /* OUT */
105: payload => p_event, /* OUT */
106: msgid => x_msgid); /* OUT */
107:
108: -- wf_event.navigation := dbms_aq.next_message;
109: EXCEPTION
110: when no_messages then
111: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then
112: wf_log_pkg.string(wf_log_pkg.level_event,

Line 113: 'wf.plsql.WF_EVENT_QH.dequeue.queue_empty',

109: EXCEPTION
110: when no_messages then
111: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then
112: wf_log_pkg.string(wf_log_pkg.level_event,
113: 'wf.plsql.WF_EVENT_QH.dequeue.queue_empty',
114: 'No more messages in dequeue.');
115: end if;
116:
117: -- reset navigation

Line 118: wf_event.resetNavigationParams;

114: 'No more messages in dequeue.');
115: end if;
116:
117: -- reset navigation
118: wf_event.resetNavigationParams;
119: p_event := NULL;
120: return;
121: --Capture the snapshot too old error
122: when snap_too_old then

Line 124: wf_event.resetNavigationParams;

120: return;
121: --Capture the snapshot too old error
122: when snap_too_old then
123: -- reset navigation
124: wf_event.resetNavigationParams;
125: x_dequeue_options.navigation := wf_event.getQueueNavigation;
126: DBMS_AQ.DEQUEUE(queue_name => x_queue_name,
127: dequeue_options => x_dequeue_options,
128: message_properties => x_message_properties, /* OUT */

Line 125: x_dequeue_options.navigation := wf_event.getQueueNavigation;

121: --Capture the snapshot too old error
122: when snap_too_old then
123: -- reset navigation
124: wf_event.resetNavigationParams;
125: x_dequeue_options.navigation := wf_event.getQueueNavigation;
126: DBMS_AQ.DEQUEUE(queue_name => x_queue_name,
127: dequeue_options => x_dequeue_options,
128: message_properties => x_message_properties, /* OUT */
129: payload => p_event, /* OUT */

Line 141: 'wf.plsql.WF_EVENT_QH.dequeue.End',

137: -- Set the Receive Date
138: p_event.SetReceiveDate(sysdate);
139: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
140: wf_log_pkg.string(wf_log_pkg.level_procedure,
141: 'wf.plsql.WF_EVENT_QH.dequeue.End',
142: 'Finished');
143: end if;
144: exception
145: when others then

Line 146: Wf_Core.Context('Wf_Event_QH', 'Dequeue', x_queue_name,

142: 'Finished');
143: end if;
144: exception
145: when others then
146: Wf_Core.Context('Wf_Event_QH', 'Dequeue', x_queue_name,
147: 'SQL err is '||substr(sqlerrm,1,200));
148: raise;
149: end dequeue;
150: ------------------------------------------------------------------------------

Line 151: PROCEDURE enqueue(p_event in wf_event_t,

147: 'SQL err is '||substr(sqlerrm,1,200));
148: raise;
149: end dequeue;
150: ------------------------------------------------------------------------------
151: PROCEDURE enqueue(p_event in wf_event_t,
152: p_out_agent_override in wf_agent_t default null)
153: is
154: x_out_agent_name varchar2(30);
155: x_out_system_name varchar2(30);

Line 211: WF_EVENT.Set_Recipient_List(p_event,

207: -- Determine the to queue (if set) --
208: -- If there is a to queue, need to set recipient list address --
209: if (p_event.To_Agent is not null) AND
210: (x_out_agent_name <> 'WF_DEFERRED') then
211: WF_EVENT.Set_Recipient_List(p_event,
212: x_out_agent_name ,
213: x_out_system_name,
214: x_message_properties);
215: end if;

Line 228: 'wf.plsql.WF_EVENT_QH.enqueue.delay',

224: */
225: if (p_event.Send_Date > sysdate) then
226: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
227: wf_log_pkg.string(wf_log_pkg.level_statement,
228: 'wf.plsql.WF_EVENT_QH.enqueue.delay',
229: 'Delay Detected');
230: end if;
231:
232: delay := (p_event.Send_Date - sysdate) *24*60*60;

Line 236: 'wf.plsql.WF_EVENT_QH.enqueue.delay_time',

232: delay := (p_event.Send_Date - sysdate) *24*60*60;
233:
234: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
235: wf_log_pkg.string(wf_log_pkg.level_statement,
236: 'wf.plsql.WF_EVENT_QH.enqueue.delay_time',
237: 'Delay ='||to_char(delay));
238: end if;
239:
240: if delay > 1 then

Line 257: if wf_event.account_name is null then

253: ** into the correlation id
254: */
255: if (x_out_agent_name like 'WF_%'
256: or x_to_agent_name like 'WF_%') then
257: if wf_event.account_name is null then
258: wf_event.SetAccountName;
259: end if;
260: x_message_properties.correlation := wf_event.account_name;
261: end if;

Line 258: wf_event.SetAccountName;

254: */
255: if (x_out_agent_name like 'WF_%'
256: or x_to_agent_name like 'WF_%') then
257: if wf_event.account_name is null then
258: wf_event.SetAccountName;
259: end if;
260: x_message_properties.correlation := wf_event.account_name;
261: end if;
262: if (x_out_agent_name = 'WF_DEFERRED'

Line 260: x_message_properties.correlation := wf_event.account_name;

256: or x_to_agent_name like 'WF_%') then
257: if wf_event.account_name is null then
258: wf_event.SetAccountName;
259: end if;
260: x_message_properties.correlation := wf_event.account_name;
261: end if;
262: if (x_out_agent_name = 'WF_DEFERRED'
263: or x_to_agent_name = 'WF_DEFERRED') then
264: --Bug 2505492

Line 287: 'wf.plsql.WF_EVENT_QH.enqueue.dbms_aq',

283: end if;
284: END IF;
285: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
286: wf_log_pkg.string(wf_log_pkg.level_statement,
287: 'wf.plsql.WF_EVENT_QH.enqueue.dbms_aq',
288: 'calling dbms_aq.enqueue');
289: end if;
290:
291: DBMS_AQ.ENQUEUE(

Line 299: WF_EVENT.g_msgid := x_msgid;

295: payload => p_event,
296: msgid => x_msgid); /* OUT*/
297:
298: -- Storing the msgid.
299: WF_EVENT.g_msgid := x_msgid;
300:
301: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
302: wf_log_pkg.string(wf_log_pkg.level_procedure,
303: 'wf.plsql.WF_EVENT_QH.enqueue.End',

Line 303: 'wf.plsql.WF_EVENT_QH.enqueue.End',

299: WF_EVENT.g_msgid := x_msgid;
300:
301: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
302: wf_log_pkg.string(wf_log_pkg.level_procedure,
303: 'wf.plsql.WF_EVENT_QH.enqueue.End',
304: 'finished calling dbms_aq.enqueue');
305: end if;
306:
307: exception

Line 309: Wf_Core.Context('Wf_Event_QH', 'Enqueue', x_out_queue,

305: end if;
306:
307: exception
308: when others then
309: Wf_Core.Context('Wf_Event_QH', 'Enqueue', x_out_queue,
310: 'SQL err is '||substr(sqlerrm,1,200));
311: raise;
312: end enqueue;
313: ------------------------------------------------------------------------------

Line 314: end WF_EVENT_QH;

310: 'SQL err is '||substr(sqlerrm,1,200));
311: raise;
312: end enqueue;
313: ------------------------------------------------------------------------------
314: end WF_EVENT_QH;