DBA Data[Home] [Help]

APPS.ECX_PURGE dependencies on ECX_DOCLOGS

Line 5: -- (To delete records which don't have an entry in ecx_doclogs)

1: package body ECX_PURGE as
2: /* $Header: ECXPRGB.pls 120.4.12010000.3 2008/10/08 21:12:12 cpeixoto ship $*/
3: -- procedure PURGE
4: -- Delete records from ecx_outbound_logs which don't have item_type, item_key
5: -- (To delete records which don't have an entry in ecx_doclogs)
6: -- IN:
7: -- transaction_type - transaction type to delete, or null for all transaction type
8: -- transaction_subtype - transaction subtype to delete, or null for all transaction subtype
9: -- party_id - party id to delete, or null for all party id

Line 186: l_item_type ecx_doclogs.item_type%type;

182: toDate in date,
183: commitFlag in boolean,
184: runtimeonly in boolean) IS
185: l_msgId RAW(16);
186: l_item_type ecx_doclogs.item_type%type;
187: l_item_key ecx_doclogs.item_key%type;
188: l_errId number(16);
189: delCounter number(4);
190: l_commitFlag boolean := commitFlag;

Line 187: l_item_key ecx_doclogs.item_key%type;

183: commitFlag in boolean,
184: runtimeonly in boolean) IS
185: l_msgId RAW(16);
186: l_item_type ecx_doclogs.item_type%type;
187: l_item_key ecx_doclogs.item_key%type;
188: l_errId number(16);
189: delCounter number(4);
190: l_commitFlag boolean := commitFlag;
191: l_runtimeonly boolean := runtimeonly;

Line 198: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is

194: l_Select VARCHAR2(2400);
195:
196:
197:
198: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
199: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
200: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
201: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
202: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is

Line 200: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is

196:
197:
198: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
199: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
200: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
201: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
202: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
203: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
204: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is

Line 202: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is

198: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
199: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
200: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
201: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
202: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
203: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
204: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is
205: select error_id from ecx_external_retry where msgid = p_msgid;
206: cursor get_in_error_id (p_trigger_id in ecx_msg_logs.trigger_id%type) is

Line 204: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is

200: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
201: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
202: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
203: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
204: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is
205: select error_id from ecx_external_retry where msgid = p_msgid;
206: cursor get_in_error_id (p_trigger_id in ecx_msg_logs.trigger_id%type) is
207: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
208: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is

Line 211: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;

207: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
208: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is
209: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
210:
211: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
212: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
213: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
214: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
215: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;

Line 212: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;

208: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is
209: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
210:
211: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
212: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
213: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
214: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
215: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;
216: TYPE t_ext_ret_error_id_tl is TABLE of ecx_external_retry.error_id%type;

Line 213: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;

209: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
210:
211: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
212: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
213: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
214: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
215: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;
216: TYPE t_ext_ret_error_id_tl is TABLE of ecx_external_retry.error_id%type;
217: TYPE t_in_trigger_id_tl is TABLE of ecx_msg_logs.trigger_id%type;

Line 247: l_Select:= 'select msgid, item_type, item_key from ecx_doclogs where 1 = 1 ' ;

243: l_runtimeonly := false;
244: END IF;
245:
246:
247: l_Select:= 'select msgid, item_type, item_key from ecx_doclogs where 1 = 1 ' ;
248:
249: if item_type is not null then
250: l_Select := l_Select || 'and item_type = :item_type ';
251: end if;

Line 395: delete from ecx_doclogs WHERE msgid = hextoraw(v_message_id_tl(i));

391: delete from ecx_outbound_logs WHERE out_msgid =v_message_id_tl(i);
392: delete from ecx_external_logs WHERE out_msgid =v_message_id_tl(i);
393: delete from ecx_oxta_logmsg WHERE receipt_message_id =v_message_id_tl(i)
394: OR sender_message_id =v_message_id_tl(i);
395: delete from ecx_doclogs WHERE msgid = hextoraw(v_message_id_tl(i));
396:
397: IF (l_commitFlag and (mod(i,commit_frequency_ecx) = 0 or (i = v_message_id_tl.count))) THEN
398: -- dbms_output.put_line('COMMITING i = '|| to_char(i));
399: commit;

Line 468: /**TYPE t_msg_id_tl is TABLE of ecx_doclogs.msgid%type;

464: TYPE t_int_trans_id_tl is TABLE of ecx_transactions.transaction_id%type;
465: v_int_trans_id_tl t_int_trans_id_tl;**/
466:
467:
468: /**TYPE t_msg_id_tl is TABLE of ecx_doclogs.msgid%type;
469: v_msg_id_tl t_msg_id_tl;**/
470:
471: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
472: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);

Line 471: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is

467:
468: /**TYPE t_msg_id_tl is TABLE of ecx_doclogs.msgid%type;
469: v_msg_id_tl t_msg_id_tl;**/
470:
471: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
472: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
473: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
474: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
475: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is

Line 473: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is

469: v_msg_id_tl t_msg_id_tl;**/
470:
471: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
472: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
473: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
474: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
475: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
476: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
477: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is

Line 475: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is

471: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
472: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
473: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
474: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
475: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
476: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
477: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is
478: select error_id from ecx_external_retry where msgid = p_msgid;
479: cursor get_in_error_id (p_trigger_id in ecx_msg_logs.trigger_id%type) is

Line 477: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is

473: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
474: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
475: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
476: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
477: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is
478: select error_id from ecx_external_retry where msgid = p_msgid;
479: cursor get_in_error_id (p_trigger_id in ecx_msg_logs.trigger_id%type) is
480: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
481: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is

Line 485: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;

481: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is
482: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
483:
484:
485: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
486: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
487: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
488: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
489: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;

Line 486: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;

482: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
483:
484:
485: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
486: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
487: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
488: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
489: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;
490: TYPE t_ext_ret_error_id_tl is TABLE of ecx_external_retry.error_id%type;

Line 487: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;

483:
484:
485: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
486: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
487: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
488: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
489: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;
490: TYPE t_ext_ret_error_id_tl is TABLE of ecx_external_retry.error_id%type;
491: TYPE t_in_trigger_id_tl is TABLE of ecx_msg_logs.trigger_id%type;

Line 495: v_msgid ecx_doclogs.msgid%type;

491: TYPE t_in_trigger_id_tl is TABLE of ecx_msg_logs.trigger_id%type;
492: TYPE t_out_trigger_id_tl is TABLE of ecx_msg_logs.trigger_id%type;
493: TYPE t_in_error_id_tl is TABLE of ecx_msg_logs.error_id%type;
494:
495: v_msgid ecx_doclogs.msgid%type;
496: v_message_id_tl t_message_id_tl;
497: v_itemtype_tl t_itemtype_id_tl;
498: v_itemkey_tl t_itemkey_id_tl;
499: v_out_trigger_id_tl t_out_trigger_id_tl;

Line 537: select msgid into v_msgid from ecx_doclogs where

533: end if;
534:
535: FOR i in 1..WF_PURGE.l_itemtypeTAB.count loop
536:
537: select msgid into v_msgid from ecx_doclogs where
538: (item_type = WF_PURGE.l_itemtypeTAB(i)) and (item_key =WF_PURGE.l_itemkeyTAB(i) ) ;
539: purgable := true;
540: status := '';
541: if(purgable) then

Line 598: delete from ecx_doclogs WHERE msgid = hextoraw(v_msgid);

594: delete from ecx_outbound_logs WHERE out_msgid =v_msgid;
595: delete from ecx_external_logs WHERE out_msgid =v_msgid;
596: delete from ecx_oxta_logmsg WHERE receipt_message_id =v_msgid
597: OR sender_message_id =v_msgid;
598: delete from ecx_doclogs WHERE msgid = hextoraw(v_msgid);
599:
600: /** IF (l_commitFlag and (mod(i,commit_frequency_ecx) = 0 or (i = v_msg_id_tl.count))) THEN
601: -- dbms_output.put_line('COMMITING i = '|| to_char(i));
602: commit;