DBA Data[Home] [Help]

APPS.IEM_MIGRATION_PVT dependencies on IEM_MIGRATION_STORE_TEMP

Line 213: cursor c1 is select * from iem_migration_store_temp

209: end if;
210: end build_migration_queue;
211:
212: procedure start_postprocessing(p_migration_id in number, x_Status out nocopy varchar2) IS
213: cursor c1 is select * from iem_migration_store_temp
214: where migration_id=p_migration_id and mig_status='R' and dp_status='D';
215: l_media_id number;
216: l_contact_id number;
217: l_resource_id number;

Line 320: iem_migration_Store_temp where migration_id=p_migration_id and message_id=v1.message_id);

316: LAST_UPDATED_BY,
317: LAST_UPDATE_DATE,
318: LAST_UPDATE_LOGIN)
319: (select decode(message_id,message_id,l_message_id),message_content,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN from
320: iem_migration_Store_temp where migration_id=p_migration_id and message_id=v1.message_id);
321:
322: -- Update Media Items with new message Id
323: update jtf_ih_media_items
324: set media_item_ref=l_message_id

Line 326: update iem_migration_store_temp

322: -- Update Media Items with new message Id
323: update jtf_ih_media_items
324: set media_item_ref=l_message_id
325: where media_id=v1.ih_media_item_id;
326: update iem_migration_store_temp
327: set mig_Status='M'
328: where migration_id=p_migration_id and message_id=v1.message_id;
329: EXCEPTION
330: WHEN OTHERS THEN

Line 337: update iem_migration_store_temp

333:
334: delete from iem_arch_msgs where message_id=l_message_id;
335: delete from iem_arch_msgdtls where message_id=l_message_id;
336:
337: update iem_migration_store_temp
338: set mig_Status='E',
339: error_text=l_error_text
340: where migration_id=p_migration_id and message_id=v1.message_id;
341: END;

Line 401: update iem_migration_store_temp

397: update jtf_ih_media_items
398: set media_item_ref=v1.message_id
399: where media_id=v1.ih_media_item_id;
400: -- update MIG status to "M"
401: update iem_migration_store_temp
402: set mig_Status='M'
403: where migration_id=p_migration_id and message_id=v1.message_id;
404: end if;
405: EXCEPTION

Line 409: update iem_migration_Store_temp

405: EXCEPTION
406: WHEN OTHERS THEN
407: l_mig_status:='E';
408: l_error_text:=sqlerrm;
409: update iem_migration_Store_temp
410: set mig_Status=l_mig_status,
411: error_text=l_error_text
412: where migration_id=p_migration_id and message_id=v1.message_id;
413: END;

Line 433: l_mig_rec iem_migration_store_temp%rowtype;

429: procedure create_worklist(p_migration_id in number,x_status out nocopy varchar2) IS
430: l_email_account_id number;
431: l_folder_name varchar2(128);
432: l_folder_type varchar2(10);
433: l_mig_rec iem_migration_store_temp%rowtype;
434: l_error_text varchar2(500);
435: cursor c_queue is
436: select a.* from iem_post_mdts a,iem_route_classifications b
437: where a.email_account_id=l_email_account_id and a.agent_id=0

Line 439: b.name=l_folder_name and a.message_id not in (select message_id from iem_migration_store_temp

435: cursor c_queue is
436: select a.* from iem_post_mdts a,iem_route_classifications b
437: where a.email_account_id=l_email_account_id and a.agent_id=0
438: and a.rt_classification_id=b.route_classification_id and
439: b.name=l_folder_name and a.message_id not in (select message_id from iem_migration_store_temp
440: where migration_id=p_migration_id)
441: union -- select records which are also errors out
442: select a.* from iem_post_mdts a,iem_route_classifications b
443: where a.email_account_id=l_email_account_id and a.agent_id=0

Line 445: b.name=l_folder_name and a.message_id in (select message_id from iem_migration_store_temp

441: union -- select records which are also errors out
442: select a.* from iem_post_mdts a,iem_route_classifications b
443: where a.email_account_id=l_email_account_id and a.agent_id=0
444: and a.rt_classification_id=b.route_classification_id and
445: b.name=l_folder_name and a.message_id in (select message_id from iem_migration_store_temp
446: where migration_id=p_migration_id and mig_status='E' and dp_status is null);
447: l_dblink varchar2(500);
448: l_user varchar2(500);
449: l_domain varchar2(500);

Line 475: select message_id from iem_migration_store_temp

471: OTHER_ERROR EXCEPTION;
472: AUTH_ERROR EXCEPTION;
473: OPEN_FOLDER_ERROR EXCEPTION;
474: cursor c_historical is
475: select message_id from iem_migration_store_temp
476: where migration_id=p_migration_id and
477: (mig_status='E' and DP_STATUS is null);
478: cursor c_normal is -- For Admin and Retry folder
479: select message_id from iem_migration_store_temp

Line 479: select message_id from iem_migration_store_temp

475: select message_id from iem_migration_store_temp
476: where migration_id=p_migration_id and
477: (mig_status='E' and DP_STATUS is null);
478: cursor c_normal is -- For Admin and Retry folder
479: select message_id from iem_migration_store_temp
480: where migration_id=p_migration_id and
481: (mig_status='E' and DP_STATUS is null);
482: l_ret_status varchar2(10);
483: l_msg_count number;

Line 500: select mail_id,folder_name,email_account_id from iem_migration_store_temp

496: l_source_message_id number;
497: l_error_counter number;
498: l_rerun varchar2(10);
499: cursor c_discp is
500: select mail_id,folder_name,email_account_id from iem_migration_store_temp
501: where migration_id=p_migration_id and substr(folder_name,1,1)<>'I';
502: begin
503: select email_account_id,folder_name,folder_type,agent_Account_id,total_msg_count into
504: l_email_account_id,l_folder_name,l_folder_type,l_agent_account_id,l_total_msg_count

Line 514: select count(*) into l_qcount from iem_migration_store_temp

510: from iem_db_connections a, iem_email_accounts b
511: where a.db_server_id=b.db_Server_id
512: and b.email_account_id = l_email_account_id and a.is_admin='A';
513: -- Check normal processing or error Processing
514: select count(*) into l_qcount from iem_migration_store_temp
515: where migration_id=p_migration_id;
516: IF l_qcount>0 then -- Error Processing
517: delete from iem_migration_store_temp
518: where migration_id=p_migration_id and mig_status=null;

Line 517: delete from iem_migration_store_temp

513: -- Check normal processing or error Processing
514: select count(*) into l_qcount from iem_migration_store_temp
515: where migration_id=p_migration_id;
516: IF l_qcount>0 then -- Error Processing
517: delete from iem_migration_store_temp
518: where migration_id=p_migration_id and mig_status=null;
519: end if;
520: for v1 in c_queue LOOP
521: l_mig_Rec:=null;

Line 543: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;

539: l_mig_rec.from_str:=v1.sender_name;
540: l_mig_rec.message_size:=v1.message_size;
541:
542: -- Create Record into Worklist Queue.
543: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;
544: insert into iem_migration_store_temp
545: (MAIL_ID,
546: MESSAGE_ID ,
547: MIGRATION_ID,

Line 544: insert into iem_migration_store_temp

540: l_mig_rec.message_size:=v1.message_size;
541:
542: -- Create Record into Worklist Queue.
543: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;
544: insert into iem_migration_store_temp
545: (MAIL_ID,
546: MESSAGE_ID ,
547: MIGRATION_ID,
548: MESSAGE_TYPE ,

Line 604: select count(*) into l_rec_counter from iem_migration_Store_temp

600: l_last_updated_by,
601: sysdate,
602: l_last_update_login);
603: END LOOP;
604: select count(*) into l_rec_counter from iem_migration_Store_temp
605: where migration_id=p_migration_id ;
606: update iem_migration_details
607: set MSG_RECORD_COUNT=l_rec_counter
608: where migration_id=p_migration_id;

Line 628: select count(*) into l_ag_count from iem_migration_store_temp where migration_id=p_migration_id;

624: l_outb_migration_id:=p_migration_id;
625: l_type:='O';
626: end if;
627: -- Also check is this first run or retry run
628: select count(*) into l_ag_count from iem_migration_store_temp where migration_id=p_migration_id;
629: if l_ag_count>0 then
630: l_rerun:='Y';
631: else
632: l_rerun:='N';

Line 652: select count(*) into l_disc_count from iem_migration_Store_temp

648: x_msg_data=>l_msg_data);
649: if l_ret_Status='S' then
650: -- Fixed Data discrepancy
651: if l_folder_type='I' and l_rerun='N' then -- fixed discrepancy for first time
652: select count(*) into l_disc_count from iem_migration_Store_temp
653: where migration_id=p_migration_id and substr(folder_name,1,1) not in ('I');
654: IF l_disc_count >0 then -- There are discrepancy
655: for v1 in c_discp LOOP
656: select migration_id into l_mig_id from iem_migration_details

Line 658: update iem_migration_store_temp

654: IF l_disc_count >0 then -- There are discrepancy
655: for v1 in c_discp LOOP
656: select migration_id into l_mig_id from iem_migration_details
657: where email_account_id=v1.email_account_id and folder_name=v1.folder_name;
658: update iem_migration_store_temp
659: set message_type='Q',
660: migration_id=l_mig_id
661: where mail_id=v1.mail_id;
662: -- Update Count of Migration after pushing these inbox message into Queue Count

Line 670: select count(*) into l_rec_counter from iem_migration_store_temp

666: where migration_id=l_mig_id;
667: END LOOP;
668: END IF;
669: end if ;
670: select count(*) into l_rec_counter from iem_migration_store_temp
671: where migration_id=p_migration_id ;
672: -- Find the error message only at the recording phase
673: select count(*) into l_error_counter from iem_migration_store_temp
674: where migration_id=p_migration_id and mig_status='E' and dp_status is null;

Line 673: select count(*) into l_error_counter from iem_migration_store_temp

669: end if ;
670: select count(*) into l_rec_counter from iem_migration_store_temp
671: where migration_id=p_migration_id ;
672: -- Find the error message only at the recording phase
673: select count(*) into l_error_counter from iem_migration_store_temp
674: where migration_id=p_migration_id and mig_status='E' and dp_status is null;
675: update iem_migration_details
676: set MSG_RECORD_COUNT=l_rec_counter-l_error_counter,
677: total_msg_count=l_rec_counter,

Line 709: select count(*) into l_hist_count from iem_migration_store_temp

705: x_Status:='E';
706: raise AUTH_ERROR;
707: end if;
708: -- Check whether this is processing the Error entry or these are processed for the first time
709: select count(*) into l_hist_count from iem_migration_store_temp
710: where migration_id=p_migration_id;
711:
712: l_folder:='/'||l_folder_name;
713: IF l_hist_count=0 then -- Historical Records are created for first time

Line 800: delete from iem_migration_Store_temp where migration_id=p_migration_id and message_id=l_msg_table(i);

796: l_error_text:='Oracle Error Encountered while retrieving Message UID and error is '||sqlerrm;
797: l_mig_Status:='E';
798: END;
799: if l_hist_flag='O' then -- To avoid duplicate
800: delete from iem_migration_Store_temp where migration_id=p_migration_id and message_id=l_msg_table(i);
801: end if;
802: l_mig_Rec.message_id:=l_msg_table(i);
803: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;
804: l_mig_rec.folder_name:=l_folder_name;

Line 803: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;

799: if l_hist_flag='O' then -- To avoid duplicate
800: delete from iem_migration_Store_temp where migration_id=p_migration_id and message_id=l_msg_table(i);
801: end if;
802: l_mig_Rec.message_id:=l_msg_table(i);
803: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;
804: l_mig_rec.folder_name:=l_folder_name;
805: l_mig_rec.message_type:=l_folder_type;
806: l_mig_rec.email_account_id:=l_email_account_id;
807: l_content:=empty_blob();

Line 808: insert into iem_migration_store_temp

804: l_mig_rec.folder_name:=l_folder_name;
805: l_mig_rec.message_type:=l_folder_type;
806: l_mig_rec.email_account_id:=l_email_account_id;
807: l_content:=empty_blob();
808: insert into iem_migration_store_temp
809: (MAIL_ID,
810: MESSAGE_ID ,
811: MIGRATION_ID,
812: MESSAGE_TYPE ,

Line 873: update iem_migration_store_temp

869: end loop;
870: END IF; -- End if for l_msg_tabl.count>0
871: if l_folder_type='H' then
872: -- Mark MIG_STAUS to "R" for messages that have sent_date < Historical message Date
873: update iem_migration_store_temp
874: set mig_status='R'
875: where mig_status is null and
876: sent_date>=l_hist_date;
877: end if;

Line 878: select count(*) into l_rec_counter from iem_migration_Store_temp

874: set mig_status='R'
875: where mig_status is null and
876: sent_date>=l_hist_date;
877: end if;
878: select count(*) into l_rec_counter from iem_migration_Store_temp
879: where migration_id=p_migration_id and mig_Status is not null;
880: -- Find the error message only at the recording phase
881: select count(*) into l_error_counter from iem_migration_store_temp
882: where migration_id=p_migration_id and mig_status='E' and dp_status is null;

Line 881: select count(*) into l_error_counter from iem_migration_store_temp

877: end if;
878: select count(*) into l_rec_counter from iem_migration_Store_temp
879: where migration_id=p_migration_id and mig_Status is not null;
880: -- Find the error message only at the recording phase
881: select count(*) into l_error_counter from iem_migration_store_temp
882: where migration_id=p_migration_id and mig_status='E' and dp_status is null;
883: update iem_migration_details
884: set MSG_RECORD_COUNT=l_rec_counter-l_error_counter,
885: folder_status='R',

Line 929: cursor c1 is select * from iem_migration_store_temp

925: l_new_Status varchar2(10);
926: l_mig_Status varchar2(10);
927: l_id number;
928:
929: cursor c1 is select * from iem_migration_store_temp
930: where migration_id=l_id and (dp_status='E' or mig_Status='E');
931: l_mig_count number;
932: cursor c_account is select email_account_id from iem_mstemail_accounts
933: where active_flag in ('Y','N') ;

Line 959: update iem_migration_store_temp

955: where migration_id=p_folders(i);
956: -- Update Status at message levels
957: for v1 in c1 LOOP
958: if v1.dp_status='E' then
959: update iem_migration_store_temp
960: set dp_status=null,
961: error_text=null
962: where mail_id=v1.mail_id;
963: elsif v1.mig_status='E' THEN

Line 964: update iem_migration_store_temp

960: set dp_status=null,
961: error_text=null
962: where mail_id=v1.mail_id;
963: elsif v1.mig_status='E' THEN
964: update iem_migration_store_temp
965: set mig_status=l_mig_status,
966: error_text=null
967: where mail_id=v1.mail_id;
968: end if;

Line 1005: from iem_migration_store_temp

1001: where active_flag in ('Y','N') ;
1002: begin
1003: for i in p_messages.first..p_messages.last LOOP
1004: select migration_id,mig_status,dp_status into l_mig_id,l_mig_status,l_dp_status
1005: from iem_migration_store_temp
1006: where mail_id=p_messages(i);
1007: if l_dp_status='E' THEN
1008: update iem_migration_store_temp
1009: set dp_status=null,

Line 1008: update iem_migration_store_temp

1004: select migration_id,mig_status,dp_status into l_mig_id,l_mig_status,l_dp_status
1005: from iem_migration_store_temp
1006: where mail_id=p_messages(i);
1007: if l_dp_status='E' THEN
1008: update iem_migration_store_temp
1009: set dp_status=null,
1010: error_text=null
1011: where mail_id=p_messages(i);
1012: update iem_migration_details

Line 1026: update iem_migration_store_temp

1022: l_mignew_Status:=null; -- Pre Processing DRP
1023: l_folder_status:=null;
1024: end if;
1025:
1026: update iem_migration_store_temp
1027: set mig_status=l_mignew_status
1028: where mail_id=p_messages(i);
1029: update iem_migration_details
1030: set folder_Status=null,

Line 1197: select distinct b.migration_id from iem_migration_store_temp a,iem_migration_details b

1193: l_status varchar2(10);
1194: l_migration_id number;
1195: e_nowait EXCEPTION;
1196: cursor c_dp_folder is
1197: select distinct b.migration_id from iem_migration_store_temp a,iem_migration_details b
1198: where a.migration_id=b.migration_id and b.folder_Status='M' and a.dp_status=null;
1199:
1200: cursor c_mig_folder is
1201: select distinct migration_id,folder_Status from iem_migration_Details

Line 1202: where migration_id in (select a.migration_id from iem_migration_store_temp a,iem_migration_details b

1198: where a.migration_id=b.migration_id and b.folder_Status='M' and a.dp_status=null;
1199:
1200: cursor c_mig_folder is
1201: select distinct migration_id,folder_Status from iem_migration_Details
1202: where migration_id in (select a.migration_id from iem_migration_store_temp a,iem_migration_details b
1203: where a.migration_id=b.migration_id and b.folder_Status='M' and a.mig_Status in (null,'D'));
1204: cursor c_account is select email_account_id from iem_mstemail_accounts
1205: where active_flag='M' ;
1206: l_mig_count number;

Line 1276: update iem_migration_Store_temp

1272: if l_folder_rec.folder_type in ('N','D') then --just set the folder to migrated for Normal/Draft message no post processing
1273: update iem_migration_details
1274: set folder_status='M'
1275: where migration_id=l_migration_id;
1276: update iem_migration_Store_temp
1277: set mig_status='M'
1278: where migration_id=l_migration_id
1279: and dp_status='D';
1280: commit;