We can Purge the workflow Mails which are not required by updating mail_status=’SENT’ for unwanted notifications in wf_notifications table.
Here are a couple of reasons to Purge Workflow Notifications
a)The end user may not want to receive outdated email.
b)The Workflow Queue has accumulated a lot of emails during the issue period, and processing has become very slow.
Below are the steps to Purge Workflow Notifications which are not required
1.First Take a Backup of wf_notifications table and stop the Workflow Notification Mailer
2. Verify notifications from WF_NOTIFICATIONS table that has potential for being sent
SQL> select notification_id, recipient_role, message_type, message_name, status, mail_status
from wf_notifications
where status in (‘OPEN’, ‘CANCELED’)
And Mail_Status In (‘MAIL’, ‘INVALID’)
order by notification_id;
3. Narrow down the emails which are not to be sent by the Mailer from a specific date range.
SQL> select notification_id, begin_date, recipient_role, message_type, message_name, status, mail_status
from wf_notifications
Where Status In (‘OPEN’, ‘CANCELED’)
And Mail_Status In (‘MAIL’, ‘INVALID’)
and begin_date < sysdate-30 — List only emails older than 30 days ago
order by notification_id;
4. Set Mail_status=’SENT’ in WF_NOTIFICATIONS
SQL>update WF_NOTIFICATIONS set mail_status = ‘SENT’
where mail_status in (‘MAIL’,’INVALID’)
and Status In (‘OPEN’, ‘CANCELED’)
and begin_date < sysdate-30;
SQL>Commit;
This will update notifications ,which are older than 30 days and waiting to be sent by the mailer to SENT.
Therefore the notifications will not get emailed when the Mailer is restarted.
5.Run the script $FND_TOP/patch/115/sql/wfntfqup.sql to purge the WF_NOTIFICATION_OUT queue and rebuild it with data currently in the WF_NOTIFICATIONS table. This is what purges all notifications waiting in the queue to be sent. It will then populate the queue with the current data in the wf_notifications table.
Since you have changed the mail_status = ‘SENT” it will not enqueue these messages again.. Only the ones where mail_status = ‘MAIL’ and status = ‘OPEN’ will be placed in the WF_NOTIFICATION_OUT queue and sent by the mailer. (or CANCELED and INVALID if certain concurrent reports are run)
Example :
$ sqlplus usr/passwd@db @$FND_TOP/patch/115/sql/wfntfqup.sql APPSusr APPSpw FNDusr
Example Syntax:
$ sqlplus apps/***@db @$FND_TOP/patch/115/sql/wfntfqup.sql apps ***** applsys
6.Now start the Workflow Notification Mailer.
798537 858366You must participate in a contest for among the best blogs on the web. I will suggest this web site! 927183
Your style is so unique in comparison to other folks I’ve read stuff from.
Many thanks for posting when you’ve got the opportunity, Guess I’ll
just bookmark this site.
my page: nordvpn coupons inspiresensation
It’s a shame you don’t have a donate button! I’d most certainly donate to this brilliant blog!
I guess for now i’ll settle for book-marking and adding
your RSS feed to my Google account. I look forward to brand new updates and will share this website
with my Facebook group. Chat soon!
Take a look at my site – nordvpn coupons inspiresensation (cfg.me)
Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you! However, how
could we communicate?
my web-site; nordvpn coupons inspiresensation – da.gd,
nordvpn promo code 350fairfax
Wow, incredible blog structure! How lengthy have you ever been running a blog for?
you make running a blog look easy. The whole glance of
your web site is excellent, let alone the content!