[Home] [Help]
34: p_init_msg_list IN VARCHAR2 ,
35: p_commit IN VARCHAR2 ,
36: p_count IN NUMBER
37: ) IS
38: l_post_rec iem_rt_preproc_emails%rowtype;
39: l_count number:=1;
40: l_index number:=0;
41: l_class number;
42: l_ret_status varchar2(10);
62: l_media_lc_rec JTF_IH_PUB.media_lc_rec_type;
63: l_milcs_id NUMBER;
64: l_mp_milcs_id NUMBER; -- MLCS ID for MAIL PROCESSINGS
65: l_message_id number;
66: l_email_rec iem_rt_preproc_emails%ROWTYPE;
67: x_stat varchar2(10);
68: l_status varchar2(10);
69: l_text varchar2(32767);
70: l_cust_stat varchar2(10);
224: LOOP
225: SAVEPOINT process_emails_pvt;
226: BEGIN
227:
228: /* Get the message in FIFO order to process from iem_rt_preproc_emails */
229:
230: if g_statement_log then
231: l_logmessage:='starting to get the message in FIFO order to process from iem_rt_preproc_emails, messageID :';
232: iem_logger(l_logmessage||l_post_rec.message_id);
227:
228: /* Get the message in FIFO order to process from iem_rt_preproc_emails */
229:
230: if g_statement_log then
231: l_logmessage:='starting to get the message in FIFO order to process from iem_rt_preproc_emails, messageID :';
232: iem_logger(l_logmessage||l_post_rec.message_id);
233: end if;
234:
235: IEM_EMAIL_PROC_PVT.iem_returned_msg_rec(l_post_rec);
2716: -- Current One
2717: delete from iem_email_classifications where message_id=l_post_rec.message_id;
2718: -- Fix for bug 14010115 ,update ih_interaction_id also with latest interaction_id in case new interaction is created.
2719: -- else, row will be updated with old interaction id, in case of auto-redirect rule.
2720: update iem_rt_preproc_emails
2721: set email_account_id=l_redirect_id,
2722: ih_interaction_id=l_interaction_id,
2723: msg_status='REDIRECT',
2724: ih_media_item_id=l_media_id
3171: IF l_stat<>'S' THEN
3172: l_logmessage:=l_out_text;
3173: raise ABORT_PROCESSING;
3174: END IF;
3175: delete from iem_rt_preproc_emails
3176: where message_id=l_post_rec.message_id;
3177: -- Calling the specific search at the End
3178: if g_statement_log then
3179: l_logmessage:='Calling Specific Search API ' ;
3281: end if;
3282:
3283: ROLLBACK TO process_emails_pvt;
3284: -- Timestamp the message to sent it to back of queue
3285: update iem_rt_preproc_emails
3286: set creation_date=sysdate
3287: where message_id=l_post_rec.message_id;
3288: commit;
3289: ELSE
3336: end if;
3337:
3338: ROLLBACK TO process_emails_pvt;
3339: -- Timestamp the message to sent it to back of queue
3340: update iem_rt_preproc_emails
3341: set creation_date=sysdate
3342: where message_id=l_post_rec.message_id;
3343: commit;
3344: ELSE
3341: set creation_date=sysdate
3342: where message_id=l_post_rec.message_id;
3343: commit;
3344: ELSE
3345: delete from iem_rt_preproc_emails where message_id=l_post_rec.message_id;
3346: commit;
3347: END IF;
3348: END IF;
3349: WHEN STOP_PROCESSING THEN
3346: commit;
3347: END IF;
3348: END IF;
3349: WHEN STOP_PROCESSING THEN
3350: delete from iem_rt_preproc_emails
3351: where message_id=l_post_rec.message_id;
3352: -- Check for autoack Flag if set then send autoack.
3353: IF l_autoack_flag='Y' then
3354: if g_statement_log then
3460: end if;
3461:
3462: ROLLBACK TO process_emails_pvt;
3463: -- Timestamp the message to sent it to back of queue
3464: update iem_rt_preproc_emails
3465: set creation_date=sysdate
3466: where message_id=l_post_rec.message_id;
3467: commit;
3468:
3472: iem_logger(l_logmessage);
3473: end if;
3474:
3475: ROLLBACK TO process_emails_pvt;
3476: update iem_rt_preproc_emails
3477: set creation_date=sysdate
3478: where message_id=l_post_rec.message_id;
3479: commit;
3480: WHEN NO_RECORD_TO_PROCESS THEN
3488: iem_logger(l_logmessage);
3489: end if;
3490:
3491: ROLLBACK TO process_emails_pvt;
3492: update iem_rt_preproc_emails
3493: set creation_date=sysdate
3494: where message_id=l_post_rec.message_id;
3495: commit;
3496: null;
3547: end if;
3548: end if;
3549: end iem_logger;
3550:
3551: Procedure iem_returned_msg_rec(x_msg_rec out nocopy iem_rt_preproc_emails%ROWTYPE) is
3552: e_nowait EXCEPTION;
3553: PRAGMA EXCEPTION_INIT(e_nowait, -54);
3554: l_post_rec iem_rt_preproc_emails%rowtype;
3555: l_folder_name varchar2(20):='/Inbox';
3550:
3551: Procedure iem_returned_msg_rec(x_msg_rec out nocopy iem_rt_preproc_emails%ROWTYPE) is
3552: e_nowait EXCEPTION;
3553: PRAGMA EXCEPTION_INIT(e_nowait, -54);
3554: l_post_rec iem_rt_preproc_emails%rowtype;
3555: l_folder_name varchar2(20):='/Inbox';
3556: l_uid number;
3557: l_status varchar2(10);
3558: l_out_text varchar2(1000);
3557: l_status varchar2(10);
3558: l_out_text varchar2(1000);
3559: BEGIN
3560: for x in ( select message_id
3561: from iem_rt_preproc_emails
3562: order by priority,creation_date)
3563: LOOP
3564: BEGIN
3565: select * into x_msg_rec from iem_rt_preproc_emails
3561: from iem_rt_preproc_emails
3562: order by priority,creation_date)
3563: LOOP
3564: BEGIN
3565: select * into x_msg_rec from iem_rt_preproc_emails
3566: where message_id=x.message_id FOR UPDATE NOWAIT;
3567: exit;
3568: EXCEPTION when e_nowait then
3569: null;
3849: END;
3850:
3851: PROCEDURE IEM_SRSTATUS_UPDATE(p_sr_id in number,
3852: p_status_id in number,
3853: p_email_rec in iem_rt_preproc_emails%rowtype,
3854: x_status out NOCOPY varchar2,
3855: x_out_text out NOCOPY varchar2) IS
3856:
3857: l_service_request_rec CS_ServiceRequest_PUB.service_request_rec_type;
4222: PROCEDURE IEM_WRAPUP(p_interaction_id in number,
4223: p_media_id in number,
4224: p_milcs_id in number,
4225: p_action in varchar2,
4226: p_email_rec in iem_rt_preproc_emails%rowtype,
4227: p_action_id in number,
4228: x_out_text out NOCOPY varchar2,
4229: x_status out NOCOPY varchar2) IS
4230:
4329: end IEM_WRAPUP;
4330:
4331: PROCEDURE IEM_AUTOREPLY(p_interaction_id in number,
4332: p_media_id in number,
4333: p_post_rec in iem_rt_preproc_emails%rowtype,
4334: p_doc_tbl in email_doc_tbl,
4335: p_subject in varchar2,
4336: P_TAG_KEY_VALUE_TBL in IEM_OUTBOX_PROC_PUB.keyVals_tbl_type,
4337: P_CUSTOMER_ID in number,