DBA Data[Home] [Help]

APPS.WF_ERROR_QH dependencies on WF_EVENT

Line 5: p_event out nocopy wf_event_t)

1: package body WF_ERROR_QH as
2: /* $Header: wferrqhb.pls 120.2 2006/02/16 05:49:22 nravindr ship $ */
3: ------------------------------------------------------------------------------
4: PROCEDURE dequeue(p_agent_guid in raw,
5: p_event out nocopy wf_event_t)
6: is
7: x_queue_name varchar2(80);
8: x_agent_name varchar2(30);
9: x_dequeue_options dbms_aq.dequeue_options_t;

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

27: end if;
28:
29:
30: -- Set correlation Id for dequeue if only available
31: if (wf_event.g_correlation is not null) then
32: -- Seeded agent with this queue handler
33: if (x_agent_name like 'WF_%') then
34: if (wf_event.account_name is null) then
35: wf_event.SetAccountName;

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

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

Line 35: wf_event.SetAccountName;

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

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

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

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

35: wf_event.SetAccountName;
36: end if;
37: x_dequeue_options.correlation := wf_event.account_name || ':' || wf_event.g_correlation;
38: else
39: x_dequeue_options.correlation := wf_event.g_correlation;
40: end if;
41: end if;
42:
43: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then

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

40: end if;
41: end if;
42:
43: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
44: if (wf_event.g_correlation is not null) then
45: wf_log_pkg.string(wf_log_pkg.level_procedure,
46: 'wf.plsql.WF_ERROR_QH.dequeue.corrid',
47: 'Dequeuing with Correlation ' || x_dequeue_options.correlation);
48: else

Line 57: x_dequeue_options.navigation := wf_event.navigation;

53: end if;
54:
55: x_dequeue_options.consumer_name := x_agent_name;
56: --x_dequeue_options.wait := DBMS_AQ.NO_WAIT;
57: x_dequeue_options.navigation := wf_event.navigation;
58: x_dequeue_options.wait := 1;
59: BEGIN
60: DBMS_AQ.DEQUEUE(queue_name => x_queue_name,
61: dequeue_options => x_dequeue_options,

Line 65: wf_event.navigation := dbms_aq.next_message;

61: dequeue_options => x_dequeue_options,
62: message_properties => x_message_properties, /* OUT */
63: payload => p_event, /* OUT */
64: msgid => x_msgid); /* OUT */
65: wf_event.navigation := dbms_aq.next_message;
66: EXCEPTION
67: when no_messages then
68:
69: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then

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

71: 'wf.plsql.WF_ERROR_QH.dequeue.queue_empty',
72: 'No more messages in dequeue.');
73: end if;
74:
75: wf_event.navigation := dbms_aq.first_message;
76: p_event := NULL;
77: return;
78: --Capture the snapshot too old error
79: when snap_too_old then

Line 83: if (wf_event.navigation = dbms_aq.FIRST_MESSAGE) then

79: when snap_too_old then
80: --Workaround for AQ when receiving ORA-01555 using NEXT_MESSAGE as
81: --navigation. We will try to set to FIRST_MESSAGE and dequeue to
82: --silently handle this exception.
83: if (wf_event.navigation = dbms_aq.FIRST_MESSAGE) then
84: raise;
85: else
86: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
87: x_dequeue_options.navigation := wf_event.navigation;

Line 86: wf_event.navigation := dbms_aq.FIRST_MESSAGE;

82: --silently handle this exception.
83: if (wf_event.navigation = dbms_aq.FIRST_MESSAGE) then
84: raise;
85: else
86: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
87: x_dequeue_options.navigation := wf_event.navigation;
88: dbms_aq.dequeue(queue_name => x_queue_name,
89: dequeue_options => x_dequeue_options,
90: message_properties => x_message_properties, -- out

Line 87: x_dequeue_options.navigation := wf_event.navigation;

83: if (wf_event.navigation = dbms_aq.FIRST_MESSAGE) then
84: raise;
85: else
86: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
87: x_dequeue_options.navigation := wf_event.navigation;
88: dbms_aq.dequeue(queue_name => x_queue_name,
89: dequeue_options => x_dequeue_options,
90: message_properties => x_message_properties, -- out
91: payload => p_event, -- out

Line 95: wf_event.navigation := dbms_aq.next_message;

91: payload => p_event, -- out
92: msgid => x_msgid); -- out
93:
94: --Set the navigation now to the next message
95: wf_event.navigation := dbms_aq.next_message;
96: end if;
97: when others then
98: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
99: raise;

Line 98: wf_event.navigation := dbms_aq.FIRST_MESSAGE;

94: --Set the navigation now to the next message
95: wf_event.navigation := dbms_aq.next_message;
96: end if;
97: when others then
98: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
99: raise;
100: END;
101: exception
102: when others then

Line 112: p_event out nocopy wf_event_t,

108: -- Bug 5034154
109: -- Added as a wrapper over the existing dequeue
110: -- calls existing dequeue with two parameters ignoring p_wait
111: PROCEDURE dequeue(p_agent_guid in raw,
112: p_event out nocopy wf_event_t,
113: p_wait in binary_integer)
114: is
115: begin
116: dequeue(p_agent_guid, p_event);

Line 119: PROCEDURE enqueue(p_event in wf_event_t,

115: begin
116: dequeue(p_agent_guid, p_event);
117: end dequeue;
118: ------------------------------------------------------------------------------
119: PROCEDURE enqueue(p_event in wf_event_t,
120: p_out_agent_override in wf_agent_t )
121: is
122: x_out_agent_name varchar2(30);
123: x_out_system_name varchar2(30);

Line 164: if wf_event.account_name is null then

160: null,
161: x_protocol_num);
162:
163: if (x_out_agent_name like 'WF_%') then
164: if wf_event.account_name is null then
165: wf_event.SetAccountName;
166: end if;
167: --
168: --Append the event name to the correlation id

Line 165: wf_event.SetAccountName;

161: x_protocol_num);
162:
163: if (x_out_agent_name like 'WF_%') then
164: if wf_event.account_name is null then
165: wf_event.SetAccountName;
166: end if;
167: --
168: --Append the event name to the correlation id
169: x_message_properties.correlation := wf_event.account_name||

Line 169: x_message_properties.correlation := wf_event.account_name||

165: wf_event.SetAccountName;
166: end if;
167: --
168: --Append the event name to the correlation id
169: x_message_properties.correlation := wf_event.account_name||
170: ':'||p_event.event_name;
171: end if;
172:
173: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then