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.15.12020000.2 2012/07/12 11:02:33 jmaddila 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 196: l_item_type ecx_doclogs.item_type%type;

192: toDate in date,
193: commitFlag in boolean,
194: runtimeonly in boolean) IS
195: l_msgId RAW(16);
196: l_item_type ecx_doclogs.item_type%type;
197: l_item_key ecx_doclogs.item_key%type;
198: l_errId number(16);
199: delCounter number(4);
200: l_commitFlag boolean := commitFlag;

Line 197: l_item_key ecx_doclogs.item_key%type;

193: commitFlag in boolean,
194: runtimeonly in boolean) IS
195: l_msgId RAW(16);
196: l_item_type ecx_doclogs.item_type%type;
197: l_item_key ecx_doclogs.item_key%type;
198: l_errId number(16);
199: delCounter number(4);
200: l_commitFlag boolean := commitFlag;
201: l_runtimeonly boolean := runtimeonly;

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

204: l_Select VARCHAR2(2400);
205:
206:
207:
208: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
209: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
210: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
211: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
212: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is

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

206:
207:
208: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
209: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
210: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
211: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
212: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
213: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
214: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is

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

208: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
209: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
210: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
211: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
212: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
213: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
214: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is
215: select error_id from ecx_external_retry where msgid = p_msgid;
216: cursor get_in_error_id (p_trigger_id in ecx_msg_logs.trigger_id%type) is

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

210: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
211: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
212: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
213: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
214: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is
215: select error_id from ecx_external_retry where msgid = p_msgid;
216: cursor get_in_error_id (p_trigger_id in ecx_msg_logs.trigger_id%type) is
217: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
218: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is

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

217: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
218: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is
219: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
220:
221: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
222: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
223: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
224: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
225: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;

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

218: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is
219: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
220:
221: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
222: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
223: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
224: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
225: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;
226: TYPE t_ext_ret_error_id_tl is TABLE of ecx_external_retry.error_id%type;

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

219: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
220:
221: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
222: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
223: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
224: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
225: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;
226: TYPE t_ext_ret_error_id_tl is TABLE of ecx_external_retry.error_id%type;
227: TYPE t_in_trigger_id_tl is TABLE of ecx_msg_logs.trigger_id%type;

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

253: l_runtimeonly := false;
254: END IF;
255:
256:
257: l_Select:= 'select msgid, item_type, item_key from ecx_doclogs where 1 = 1 ' ;
258:
259: if item_type is not null then
260: l_Select := l_Select || 'and item_type = :item_type ';
261: end if;

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

402: delete from ecx_outbound_logs WHERE out_msgid =v_message_id_tl(i);
403: delete from ecx_external_logs WHERE out_msgid =v_message_id_tl(i);
404: delete from ecx_oxta_logmsg WHERE receipt_message_id =v_message_id_tl(i)
405: OR sender_message_id =v_message_id_tl(i);
406: delete from ecx_doclogs WHERE msgid = hextoraw(v_message_id_tl(i));
407:
408: IF (l_commitFlag and (mod(i,commit_frequency_ecx) = 0 or (i = v_message_id_tl.count))) THEN
409: -- dbms_output.put_line('COMMITING i = '|| to_char(i));
410: commit;

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

479: TYPE t_int_trans_id_tl is TABLE of ecx_transactions.transaction_id%type;
480: v_int_trans_id_tl t_int_trans_id_tl;**/
481:
482:
483: /**TYPE t_msg_id_tl is TABLE of ecx_doclogs.msgid%type;
484: v_msg_id_tl t_msg_id_tl;**/
485:
486: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
487: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);

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

482:
483: /**TYPE t_msg_id_tl is TABLE of ecx_doclogs.msgid%type;
484: v_msg_id_tl t_msg_id_tl;**/
485:
486: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
487: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
488: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
489: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
490: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is

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

484: v_msg_id_tl t_msg_id_tl;**/
485:
486: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
487: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
488: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
489: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
490: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
491: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
492: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is

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

486: cursor get_in_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
487: select trigger_id from ecx_inbound_logs where msgid is not null and msgid = hextoraw(p_msgid);
488: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
489: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
490: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
491: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
492: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is
493: select error_id from ecx_external_retry where msgid = p_msgid;
494: cursor get_in_error_id (p_trigger_id in ecx_msg_logs.trigger_id%type) is

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

488: cursor get_out_trigger_id (p_msgid in ecx_doclogs.msgid%type) is
489: select trigger_id from ecx_outbound_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
490: cursor get_ext_log_error_id (p_msgid in ecx_doclogs.msgid%type) is
491: select error_id from ecx_external_logs where out_msgid is not null and out_msgid = hextoraw(p_msgid);
492: cursor get_ext_ret_error_id (p_msgid in ecx_doclogs.msgid%type) is
493: select error_id from ecx_external_retry where msgid = p_msgid;
494: cursor get_in_error_id (p_trigger_id in ecx_msg_logs.trigger_id%type) is
495: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
496: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is

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

496: cursor get_out_error_id (p_trigger_id in ecx_msg_logs.ERROR_ID%type) is
497: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
498:
499:
500: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
501: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
502: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
503: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
504: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;

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

497: select error_id from ecx_msg_logs where trigger_id = p_trigger_id;
498:
499:
500: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
501: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
502: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
503: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
504: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;
505: TYPE t_ext_ret_error_id_tl is TABLE of ecx_external_retry.error_id%type;

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

498:
499:
500: TYPE t_message_id_tl is TABLE of ecx_doclogs.msgid%type;
501: TYPE t_itemtype_id_tl is TABLE of ecx_doclogs.item_type%type;
502: TYPE t_itemkey_id_tl is TABLE of ecx_doclogs.item_key%type;
503: TYPE t_out_error_id_tl is TABLE of ecx_outbound_logs.error_id%type;
504: TYPE t_ext_log_error_id_tl is TABLE of ecx_external_logs.error_id%type;
505: TYPE t_ext_ret_error_id_tl is TABLE of ecx_external_retry.error_id%type;
506: TYPE t_in_trigger_id_tl is TABLE of ecx_msg_logs.trigger_id%type;

Line 510: v_msgid ecx_doclogs.msgid%type;

506: TYPE t_in_trigger_id_tl is TABLE of ecx_msg_logs.trigger_id%type;
507: TYPE t_out_trigger_id_tl is TABLE of ecx_msg_logs.trigger_id%type;
508: TYPE t_in_error_id_tl is TABLE of ecx_msg_logs.error_id%type;
509:
510: v_msgid ecx_doclogs.msgid%type;
511: v_message_id_tl t_message_id_tl;
512: v_itemtype_tl t_itemtype_id_tl;
513: v_itemkey_tl t_itemkey_id_tl;
514: v_out_trigger_id_tl t_out_trigger_id_tl;

Line 552: select msgid into v_msgid from ecx_doclogs where

548: end if;
549:
550: FOR i in 1..WF_PURGE.l_itemtypeTAB.count loop
551:
552: select msgid into v_msgid from ecx_doclogs where
553: (item_type = WF_PURGE.l_itemtypeTAB(i)) and (item_key =WF_PURGE.l_itemkeyTAB(i) ) ;
554: purgable := true;
555: status := '';
556: if(purgable) then

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

609: delete from ecx_outbound_logs WHERE out_msgid =v_msgid;
610: delete from ecx_external_logs WHERE out_msgid =v_msgid;
611: delete from ecx_oxta_logmsg WHERE receipt_message_id =v_msgid
612: OR sender_message_id =v_msgid;
613: delete from ecx_doclogs WHERE msgid = hextoraw(v_msgid);
614:
615: /** IF (l_commitFlag and (mod(i,commit_frequency_ecx) = 0 or (i = v_msg_id_tl.count))) THEN
616: -- dbms_output.put_line('COMMITING i = '|| to_char(i));
617: commit;