DBA Data[Home] [Help]

APPS.IEM_MIGRATION_PVT dependencies on IEM_MIGRATION_STORE_TEMP

Line 236: cursor c1 is select * from iem_migration_store_temp

232: end if;
233: end build_migration_queue;
234:
235: procedure start_postprocessing(p_migration_id in number, x_Status out nocopy varchar2) IS
236: cursor c1 is select * from iem_migration_store_temp
237: where migration_id=p_migration_id and mig_status='R' and dp_status='D';
238: l_media_id number;
239: l_contact_id number;
240: l_resource_id number;

Line 299: UPDATE iem_migration_store_temp

295: AND media_item_ref=v1.rfc822_message_id
296: AND source_id=v1.email_account_id
297: and rownum = 1;
298:
299: UPDATE iem_migration_store_temp
300: set ih_media_item_id = l_media_id
301: WHERE mail_id = v1.mail_id
302: AND ih_media_item_id IS NULL;
303:

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

386: LAST_UPDATED_BY,
387: LAST_UPDATE_DATE,
388: LAST_UPDATE_LOGIN)
389: (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
390: iem_migration_Store_temp where migration_id=p_migration_id and message_id=v1.message_id);
391:
392: -- Update Media Items with new message Id
393: /* commented by siahmed
394: update jtf_ih_media_items

Line 404: update iem_migration_store_temp

400: update jtf_ih_media_items
401: set media_item_ref=l_message_id
402: where media_id=l_media_id;
403:
404: update iem_migration_store_temp
405: set mig_Status='M'
406: where migration_id=p_migration_id and message_id=v1.message_id;
407: EXCEPTION
408: /*

Line 432: update iem_migration_store_temp

428: l_error_text:=l_error_text ||'-Other exception during delete sqlerrm:'||sqlerrm;
429: END;
430:
431: BEGIN
432: update iem_migration_store_temp
433: set mig_Status='E',
434: error_text=l_error_text
435: where migration_id=p_migration_id and message_id=v1.message_id;
436: EXCEPTION WHEN OTHERS THEN

Line 506: update iem_migration_store_temp

502: update jtf_ih_media_items
503: set media_item_ref=v1.message_id
504: where media_id=v1.ih_media_item_id;
505: -- update MIG status to "M"
506: update iem_migration_store_temp
507: set mig_Status='M'
508: where migration_id=p_migration_id and message_id=v1.message_id;
509: end if;
510: EXCEPTION

Line 514: update iem_migration_Store_temp

510: EXCEPTION
511: WHEN OTHERS THEN
512: l_mig_status:='E';
513: l_error_text:=sqlerrm;
514: update iem_migration_Store_temp
515: set mig_Status=l_mig_status,
516: error_text=l_error_text
517: where migration_id=p_migration_id and message_id=v1.message_id;
518: END;

Line 538: l_mig_rec iem_migration_store_temp%rowtype;

534: procedure create_worklist(p_migration_id in number,x_status out nocopy varchar2) IS
535: l_email_account_id number;
536: l_folder_name varchar2(128);
537: l_folder_type varchar2(10);
538: l_mig_rec iem_migration_store_temp%rowtype;
539: l_error_text varchar2(500);
540: l_commit_cntr number := 0;
541: l_direction varchar2(100);
542: cursor c_queue is

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

542: cursor c_queue is
543: select a.* from iem_post_mdts a,iem_route_classifications b
544: where a.email_account_id=l_email_account_id and a.agent_id=0
545: and a.rt_classification_id=b.route_classification_id and
546: b.name=l_folder_name and a.message_id not in (select message_id from iem_migration_store_temp
547: where migration_id=p_migration_id)
548: union -- select records which are also errors out
549: select a.* from iem_post_mdts a,iem_route_classifications b
550: where a.email_account_id=l_email_account_id and a.agent_id=0

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

548: union -- select records which are also errors out
549: select a.* from iem_post_mdts a,iem_route_classifications b
550: where a.email_account_id=l_email_account_id and a.agent_id=0
551: and a.rt_classification_id=b.route_classification_id and
552: b.name=l_folder_name and a.message_id in (select message_id from iem_migration_store_temp
553: where migration_id=p_migration_id and mig_status='E' and dp_status is null);
554: l_dblink varchar2(500);
555: l_user varchar2(500);
556: l_domain varchar2(500);

Line 582: select message_id from iem_migration_store_temp

578: OTHER_ERROR EXCEPTION;
579: AUTH_ERROR EXCEPTION;
580: OPEN_FOLDER_ERROR EXCEPTION;
581: cursor c_historical is
582: select message_id from iem_migration_store_temp
583: where migration_id=p_migration_id and
584: (mig_status='E' and DP_STATUS is null);
585: cursor c_normal is -- For Admin and Retry folder
586: select message_id from iem_migration_store_temp

Line 586: select message_id from iem_migration_store_temp

582: select message_id from iem_migration_store_temp
583: where migration_id=p_migration_id and
584: (mig_status='E' and DP_STATUS is null);
585: cursor c_normal is -- For Admin and Retry folder
586: select message_id from iem_migration_store_temp
587: where migration_id=p_migration_id and
588: (mig_status='E' and DP_STATUS is null);
589: l_ret_status varchar2(10);
590: l_msg_count number;

Line 607: select mail_id,folder_name,email_account_id from iem_migration_store_temp

603: l_source_message_id number;
604: l_error_counter number;
605: l_rerun varchar2(10);
606: cursor c_discp is
607: select mail_id,folder_name,email_account_id from iem_migration_store_temp
608: where migration_id=p_migration_id and substr(folder_name,1,1)<>'I';
609: begin
610: --dbms_output.put_line('inside create work_list');
611: select email_account_id,folder_name,folder_type,agent_Account_id,total_msg_count into

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

625: from iem_db_connections a, iem_email_accounts b
626: where a.db_server_id=b.db_Server_id
627: and b.email_account_id = l_email_account_id and a.is_admin='A';
628: -- Check normal processing or error Processing
629: select count(*) into l_qcount from iem_migration_store_temp
630: where migration_id=p_migration_id;
631: IF l_qcount>0 then -- Error Processing
632: delete from iem_migration_store_temp
633: where migration_id=p_migration_id and mig_status=null;

Line 632: delete from iem_migration_store_temp

628: -- Check normal processing or error Processing
629: select count(*) into l_qcount from iem_migration_store_temp
630: where migration_id=p_migration_id;
631: IF l_qcount>0 then -- Error Processing
632: delete from iem_migration_store_temp
633: where migration_id=p_migration_id and mig_status=null;
634: end if;
635: for v1 in c_queue LOOP
636: l_mig_Rec:=null;

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

656: l_mig_rec.from_str:=v1.sender_name;
657: l_mig_rec.message_size:=v1.message_size;
658:
659: -- Create Record into Worklist Queue.
660: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;
661: insert into iem_migration_store_temp
662: (MAIL_ID,
663: MESSAGE_ID ,
664: MIGRATION_ID,

Line 661: insert into iem_migration_store_temp

657: l_mig_rec.message_size:=v1.message_size;
658:
659: -- Create Record into Worklist Queue.
660: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;
661: insert into iem_migration_store_temp
662: (MAIL_ID,
663: MESSAGE_ID ,
664: MIGRATION_ID,
665: MESSAGE_TYPE ,

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

717: l_last_updated_by,
718: sysdate,
719: l_last_update_login);
720: END LOOP;
721: select count(*) into l_rec_counter from iem_migration_Store_temp
722: where migration_id=p_migration_id ;
723: update iem_migration_details
724: set MSG_RECORD_COUNT=l_rec_counter
725: where migration_id=p_migration_id;

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

741: l_outb_migration_id:=p_migration_id;
742: l_type:='O';
743: end if;
744: -- Also check is this first run or retry run
745: select count(*) into l_ag_count from iem_migration_store_temp where migration_id=p_migration_id;
746: if l_ag_count>0 then
747: l_rerun:='Y';
748: else
749: l_rerun:='N';

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

765: x_msg_data=>l_msg_data);
766: if l_ret_Status='S' then
767: -- Fixed Data discrepancy
768: if l_folder_type='I' and l_rerun='N' then -- fixed discrepancy for first time
769: select count(*) into l_disc_count from iem_migration_Store_temp
770: where migration_id=p_migration_id and substr(folder_name,1,1) not in ('I');
771: IF l_disc_count >0 then -- There are discrepancy
772: for v1 in c_discp LOOP
773: select migration_id into l_mig_id from iem_migration_details

Line 775: update iem_migration_store_temp

771: IF l_disc_count >0 then -- There are discrepancy
772: for v1 in c_discp LOOP
773: select migration_id into l_mig_id from iem_migration_details
774: where email_account_id=v1.email_account_id and folder_name=v1.folder_name;
775: update iem_migration_store_temp
776: set message_type='Q',
777: migration_id=l_mig_id
778: where mail_id=v1.mail_id;
779: -- Update Count of Migration after pushing these inbox message into Queue Count

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

783: where migration_id=l_mig_id;
784: END LOOP;
785: END IF;
786: end if ;
787: select count(*) into l_rec_counter from iem_migration_store_temp
788: where migration_id=p_migration_id ;
789: -- Find the error message only at the recording phase
790: select count(*) into l_error_counter from iem_migration_store_temp
791: where migration_id=p_migration_id and mig_status='E' and dp_status is null;

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

786: end if ;
787: select count(*) into l_rec_counter from iem_migration_store_temp
788: where migration_id=p_migration_id ;
789: -- Find the error message only at the recording phase
790: select count(*) into l_error_counter from iem_migration_store_temp
791: where migration_id=p_migration_id and mig_status='E' and dp_status is null;
792: update iem_migration_details
793: set MSG_RECORD_COUNT=l_rec_counter-l_error_counter,
794: total_msg_count=l_rec_counter,

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

826: x_Status:='E';
827: raise AUTH_ERROR;
828: end if;
829: -- Check whether this is processing the Error entry or these are processed for the first time
830: select count(*) into l_hist_count from iem_migration_store_temp
831: where migration_id=p_migration_id;
832:
833: l_folder:='/'||l_folder_name;
834: IF l_hist_count=0 then -- Historical Records are created for first time

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

956: l_mig_Status:='E';
957: --dbms_output.put_line('exception-2:'||l_error_text);
958: END;
959: if l_hist_flag='O' then -- To avoid duplicate
960: delete from iem_migration_Store_temp where migration_id=p_migration_id and message_id=l_msg_table(i);
961: --dbms_output.put_line('deleteing record migration_id='||p_migration_id|| ' and message_id='||l_msg_table(i));
962: end if;
963: l_mig_Rec.message_id:=l_msg_table(i);
964: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;

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

960: delete from iem_migration_Store_temp where migration_id=p_migration_id and message_id=l_msg_table(i);
961: --dbms_output.put_line('deleteing record migration_id='||p_migration_id|| ' and message_id='||l_msg_table(i));
962: end if;
963: l_mig_Rec.message_id:=l_msg_table(i);
964: select IEM_MIGRATION_STORE_TEMP_s1.nextval into l_mig_rec.mail_id from dual;
965: l_mig_rec.folder_name:=l_folder_name;
966: l_mig_rec.message_type:=l_folder_type;
967: l_mig_rec.email_account_id:=l_email_account_id;
968: l_content:=empty_blob();

Line 969: insert into iem_migration_store_temp

965: l_mig_rec.folder_name:=l_folder_name;
966: l_mig_rec.message_type:=l_folder_type;
967: l_mig_rec.email_account_id:=l_email_account_id;
968: l_content:=empty_blob();
969: insert into iem_migration_store_temp
970: (MAIL_ID,
971: MESSAGE_ID ,
972: MIGRATION_ID,
973: MESSAGE_TYPE ,

Line 1048: update iem_migration_store_temp

1044: end loop;
1045: END IF; -- End if for l_msg_tabl.count>0
1046: if l_folder_type='H' then
1047: -- Mark MIG_STAUS to "R" for messages that have sent_date < Historical message Date
1048: update iem_migration_store_temp
1049: set mig_status='R'
1050: where mig_status is null and
1051: to_date(substr(sent_Date,1,20),'DD-MM-YYYY HH24:MI:SS','NLS_DATE_LANGUAGE=ENGLISH')>=l_hist_date;
1052: --sent_date>=l_hist_date;

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

1053: --the above fix was done cz of bug fix siahmed fix for bug 14667549
1054: -- sent date not being correctly converted to varchar
1055: --also made sure the to_date is converting to the formate of l_hist_date
1056: end if;
1057: select count(*) into l_rec_counter from iem_migration_Store_temp
1058: where migration_id=p_migration_id and mig_Status is not null;
1059: -- Find the error message only at the recording phase
1060: select count(*) into l_error_counter from iem_migration_store_temp
1061: where migration_id=p_migration_id and mig_status='E' and dp_status is null;

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

1056: end if;
1057: select count(*) into l_rec_counter from iem_migration_Store_temp
1058: where migration_id=p_migration_id and mig_Status is not null;
1059: -- Find the error message only at the recording phase
1060: select count(*) into l_error_counter from iem_migration_store_temp
1061: where migration_id=p_migration_id and mig_status='E' and dp_status is null;
1062: update iem_migration_details
1063: set MSG_RECORD_COUNT=l_rec_counter-l_error_counter,
1064: folder_status='R',

Line 1113: cursor c1 is select * from iem_migration_store_temp

1109: l_new_Status varchar2(10);
1110: l_mig_Status varchar2(10);
1111: l_id number;
1112:
1113: cursor c1 is select * from iem_migration_store_temp
1114: where migration_id=l_id and (dp_status='E' or mig_Status='E');
1115: l_mig_count number;
1116: cursor c_account is select email_account_id from iem_mstemail_accounts
1117: where active_flag in ('Y','N') ;

Line 1143: update iem_migration_store_temp

1139: where migration_id=p_folders(i);
1140: -- Update Status at message levels
1141: for v1 in c1 LOOP
1142: if v1.dp_status='E' then
1143: update iem_migration_store_temp
1144: set dp_status=null,
1145: error_text=null
1146: where mail_id=v1.mail_id;
1147: elsif v1.mig_status='E' THEN

Line 1148: update iem_migration_store_temp

1144: set dp_status=null,
1145: error_text=null
1146: where mail_id=v1.mail_id;
1147: elsif v1.mig_status='E' THEN
1148: update iem_migration_store_temp
1149: set mig_status=l_mig_status,
1150: error_text=null
1151: where mail_id=v1.mail_id;
1152: end if;

Line 1189: from iem_migration_store_temp

1185: where active_flag in ('Y','N') ;
1186: begin
1187: for i in p_messages.first..p_messages.last LOOP
1188: select migration_id,mig_status,dp_status into l_mig_id,l_mig_status,l_dp_status
1189: from iem_migration_store_temp
1190: where mail_id=p_messages(i);
1191: if l_dp_status='E' THEN
1192: update iem_migration_store_temp
1193: set dp_status=null,

Line 1192: update iem_migration_store_temp

1188: select migration_id,mig_status,dp_status into l_mig_id,l_mig_status,l_dp_status
1189: from iem_migration_store_temp
1190: where mail_id=p_messages(i);
1191: if l_dp_status='E' THEN
1192: update iem_migration_store_temp
1193: set dp_status=null,
1194: error_text=null
1195: where mail_id=p_messages(i);
1196: update iem_migration_details

Line 1210: update iem_migration_store_temp

1206: l_mignew_Status:=null; -- Pre Processing DRP
1207: l_folder_status:=null;
1208: end if;
1209:
1210: update iem_migration_store_temp
1211: set mig_status=l_mignew_status
1212: where mail_id=p_messages(i);
1213: update iem_migration_details
1214: set folder_Status=null,

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

1377: l_status varchar2(10);
1378: l_migration_id number;
1379: e_nowait EXCEPTION;
1380: cursor c_dp_folder is
1381: select distinct b.migration_id from iem_migration_store_temp a,iem_migration_details b
1382: where a.migration_id=b.migration_id and b.folder_Status='M' and a.dp_status=null;
1383:
1384: cursor c_mig_folder is
1385: select distinct migration_id,folder_Status from iem_migration_Details

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

1382: where a.migration_id=b.migration_id and b.folder_Status='M' and a.dp_status=null;
1383:
1384: cursor c_mig_folder is
1385: select distinct migration_id,folder_Status from iem_migration_Details
1386: where migration_id in (select a.migration_id from iem_migration_store_temp a,iem_migration_details b
1387: where a.migration_id=b.migration_id and b.folder_Status='M' and a.mig_Status in (null,'D'));
1388: cursor c_account is select email_account_id from iem_mstemail_accounts
1389: where active_flag='M' ;
1390: l_mig_count number;

Line 1460: update iem_migration_Store_temp

1456: if l_folder_rec.folder_type in ('N','D') then --just set the folder to migrated for Normal/Draft message no post processing
1457: update iem_migration_details
1458: set folder_status='M'
1459: where migration_id=l_migration_id;
1460: update iem_migration_Store_temp
1461: set mig_status='M'
1462: where migration_id=l_migration_id
1463: and dp_status='D';
1464: commit;