Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Oracle Knowledge Hub: Workflow Mailer Troubleshooting

Page 1 of 6

Share

More

Ne6t !log7

Oracle Knowledge Hub


EBS 11i/R12 Siebel Exadata Golden Gate Scripts

Workflow Mailer Troubleshooting


Check workflow mailer service current status sqlplus apps/<apps password> select running_processes from apps.fnd_concurrent_queues where concurrent_queue_name = 'WFM !"#$'% &um'er of running processes should 'e greater than ( Find current mailer status sqlplus apps/<apps password> select component_status from apps.fnd_s)c_components where component_id = *select component_id from apps.fnd_s)c_components where component_name = 'Wor+flow &otification Mailer',% -ossi'le )alues. !/&&0&1 "23!20&1 "24--56_5!!4! 653$20#3256_/"5! 653$20#3256_"7"25M Stop notification mailer sqlplus apps/<apps password> declare p_retcode num'er% p_err'uf )archar8*9((,% m_mailerid fnd_s)c_components.component_id:27-5% 'egin ;; Find mailer 0d ;;;;;;;;;;;;;;;;; select component_id into m_mailerid from fnd_s)c_components where component_name = 'Wor+flow &otification Mailer'% ;;;;;;;;;;;;;; ;; "top Mailer ;;;;;;;;;;;;;; fnd_s)c_component.stop_component*m_mailerid< p_retcode< p_err'uf,% commit% end% / Start notification mailer sqlplus apps/<apps password> declare p_retcode num'er% p_err'uf )archar8*9((,% m_mailerid fnd_s)c_components.component_id:27-5% 'egin ;; Find mailer 0d ;;;;;;;;;;;;;;;;; select component_id into m_mailerid from fnd_s)c_components where component_name = 'Wor+flow &otification Mailer'% ;;;;;;;;;;;;;; ;; "tart Mailer ;;;;;;;;;;;;;; fnd_s)c_component.start_component*m_mailerid< p_retcode< p_err'uf,% commit% end% / 3 wor+flow notification send e)ent *notification email, can fail at se)eral different points< so monitoring it using one method usuall= is not going to gi)e =ou a complete picture.3dditionall=< =ou ha)e to +eep in mind that the process is d=namic< meaning that as transactions are created into the queues the= are also mailed out% so a count of data is at 'est onl= a snapshot of a particular moment in time. >ere is a more ro'ust script for monitoring the wf_notifications ta'le.

Search This Blog

Blog Archive 2013 (30) November October August July (1) May (1) March Han le !loc"#ng sess#ons $or oracle atabase %or"$lo& Ma#ler 'roubleshoot#ng (og $#le locat#on #n Oracle A))s 11#*+12 M%A ,erv#ces #n Oracle A))s +esolv#ng -J.n#t#ator vers#on too lo&- /rrors #n /000 Obta#n#ng 1orms +unt#me 2#agnost#cs (1+2) .n Oracl000 +ecovery catalog $or +MAN bac"u) Ho& to +ecreate the Ora.nventory +e)lac#ng J#n#t#ator &#th J+/ 3ersonal#4#ng 'he (og#n 3age 1ebruary January 2012 (25)

About Me

Total Pageviews

htt"://oracle!r#ou$blogs"ot$co%/ 01&/0&/workflow'%ailer'troubleshooting$ht%l

1/10/ 01!

Oracle Knowledge Hub: Workflow Mailer Troubleshooting

Page of 6

select message_t=pe< mail_status< count*?, from wf_notifications where status = '4-5&' 1!4/- @7 M5""315_27-5< M30 _"232/" messages in 'F30 56' status can 'e resent using the concurrent request 'resend failed wor+flow notificaitons' messages which are 4-5& 'ut where mail_status is null ha)e a missing email address for the recipient< 'ut the notification preference is 'send me mail' "ome messages li+e alerts don't get a record in wf_notifications ta'le so =ou ha)e to watch the WF_&420F0$3204&_4/2 queue. select corr_id< retr=_count< msg_state< count*?, from appls=s.aqAwf_notification_out group '= corr_id< msg_state< retr=_count order '= count*?, desc% Messages with a high retr= count ha)e 'een c=cling through the queue and are not passed to smtp ser)ice.Messages which are 'eBpired' can 'e re'uilt using the wfntfqup.sql 2he following "C to collect all the info eBcept 0M3- account password. select p.parameter_id< p.parameter_name< ).parameter_)alue )alue from fnd_s)c_comp_param_)als_) )< fnd_s)c_comp_params_' p< fnd_s)c_components c where c.component_t=pe = DWF_M30 5!E and ).component_id = c.component_id and ).parameter_id = p.parameter_id and p.parameter_name in *D4/2@4/&6_"5!#5!E< D0&@4/&6_"5!#5!E< D3$$4/&2E< DF!4ME< D&465&3M5E< D!5- 724E<'60"$3!6E <E-!4$5""E<'0&@4FE, How to Enable the Workflow Logging: From "elf "er)ice > "elect GWor+flow ManagerH under G4racle 3pplications ManagerH > $lic+ G&otification MailersH > "er)ice $omponents *"er)ice $omponents. <"06>, > '. $lic+ GWor+flow Mailer "er)iceH under G$ontainerH $olumn. e. From G"er)ice 0nstances for 1eneric "er)ice $omponent $ontainer.<"06>Hpage< clic+ G-ull 6ownH 'utton from the "tart 3ll/ "top 3ll. f . "elect "top 3ll > 1o. g. We conformed that for the "er)ices to read 3ctual ( 2arget ( and 6eacti)ated. h. !estart the mailer ser)ices using the G"tart 3llH 'utton. 0. We run the following "C to ma+e sure ser)ice are stopped. "5 5$2 component_name< component_status< component_status_info F!4M fnd_s)c_components_) W>5!5 component_name li+e DWor+flow:E% 5na'le the "tatement logging in Wor+flow Mailer. og files are created A3-- $"F/A3-- 41/F&6$-1"$?.tBt i.e. the log file for the 3cti)e process for Wor+flow Mailer "er)ice and 3gent istener ser)ices. 2o retrie)e the last 8 log files for Wor+flow Mailer and 3gent istener ser)ices< run the following command. ls ;lt A3-- $"F/A3-- 41/F&6$-1"$?.tBt How does workflow otification !ailer "!#$ %"nbound $rocessing& Works: 2his is the in'ound flow. 9. 3ppro)er sends email response which is directed to the )alue defined in !epl=to address. a. 2his address has 'een setup '= the customerEs mail administrator to route incoming mail to the 0M3- 0n'oB folder. 8. 2he Wor+flow 0n'ound 3gent istener pic+s up the message. 4nl= messages which are in DunreadE state are e)aluated% the rest of the messages in the in'oB are ignored. I. 2he message is scanned to see if it matches entries in the 231 file . Mail tags are defined in the 43M mailer configuration pages and these list strings of teBt and actions to ta+e if those strings are encountered. 3n eBample of this are D4ut of 4fficeE replies. 0f the string of the message matches a mail tag and the action is D0gnoreE then nothing else will happen. J. 2he message is then scanned for the presence of a &otification 0d *&06,. 2his &06 is matched against )alid &06 for the mailer node. K. 0f )alid &06 is not detected< *and there is no matching 231 file entr=, then the message is placed into the 60"$3!6 folder. L. 0f a )alid &06 is detected the listener raises a su'scription to the WF_&420F0$3204&_0& queue and places the mail message in the -rocessed folder. M. From this point on the message is handled '= the product wor+flow *li+e -4 3--!4#3 , . 3n e)ent created '= that group will monitor the WF_&420F0$3204&_0& queue and will trigger the rest of the appro)al wor+flow. Here are steps'events for (racle Workflow otification (utbound $rocessing%e!ail from (racle #pplications Workflow to )sers&

9.When wor+flow 5ngine determines that a notification message must 'e sent< it raises an e)ent in @5" *@usiness 5)ent "=stem, oracle.apps.wf.notifications.send 5)ent is raised with &otification 06 *&06, as e)ent +e= 8. 2here is seeded su'scription to this 5)ent I. 5)ent is placed on WF_65F5!!56 agent J.5)ent is dequeued from WF_65F5!!56 and su'scription is processed K. "u'scription places e)ent message to WF_&420F0$3204&_4/2 agent. L.&otification Mailer dequeues message from WF_&420F0$3204&_4/2 agent and L.9con)ert FM representation of notification into M0M5 encoded message *Multi;purpose 0nternet Mail 5Btensions, and

htt"://oracle!r#ou$blogs"ot$co%/ 01&/0&/workflow'%ailer'troubleshooting$ht%l

1/10/ 01!

Oracle Knowledge Hub: Workflow Mailer Troubleshooting

Page & of 6

L.8 "end message '= "M2- *"imple Mail 2ransfer -rotocol, to intended user *0f2est 3ddress/4)erride 3ddress is set then email is sent to 2est 3ddress E*!ail otification is sent if all below conditions are truea, &otification status is 4-5& or $3&$5 56 and ', &otification mail_status is M30 or 0&#3 06 and c, !ecipient !ole has a )alid e;mail address and &otification -reference is in the format M30 : d, Wor+flow 6eferred 3gent istener is running e, Wor+flow &otification Mailer is running 2o chec+ a, N ', run 'elow quer= "5 5$2 status< mail_status F!4M wf_notifications W>5!5 notification_id = DN&06E% mail_status >> "5&2 means mail has gone out of mailer to user 2o chec+ c, run 'elow quer= "5 5$2 email_address< n)l*WF_-!5F.get_pref*name< DM30 27-5E,<notification_preference, F!4M wf_roles W>5!5 name = upper*DNrecipient_roleE,% 2o chec+ d, N e, /se 43M *4racle 3pplication Manager, How to purge e*mail notifications from the Workflow +ueue "ometimes 6ue to large num'er of e;mail notifications to accumulated in the queue Wor+flow mailer will not start<2o fiB this issue we need purge the notifications from the Wor+flow queue.

2he 'elow outlines the steps< -lease ta+e proper 'ac+up 'efore performing the 'elow. 9, 7ou need to update the notifications =ou do not want sent< in the WF_&420F0$3204&" ta'le. 8, $hec+ the WF_&420F0$3204&" ta'le as 'elow. !ecords where status = D4-5&E and mail_status = DM30 E are notifications that will ha)e an e;mail notification sent. "C > select notification_id<status<mail_status<'egin_date from WF_&420F0$3204&" where status = D4-5&E and mail_status = DM30 E% I, 2his should show =ou which notifications are waiting to 'e e;mailed. J, 2o update a notification so that it will not get e;mailed. "et the M30 _"232/" = D"5&2E. 2he mailer will thin+ the e;mail has alread= 'een sent and it will not send it again. "C > update WF_&420F0$3204&" set mail_status = D"5&2E where mail_status = DM30 E% ;> 2his will update all notifications waiting to 'e sent '= the mailer. K, 2hen run the script wfntfqup.sql to purge the WF_&420F0$3204&_4/2 queue and re'uild it with data currentl= in the WF_&420F0$3204&" ta'le. 2his is what purges all notifications waiting in the queue to 'e sent.4nl= the ones where mail_status = DM30 E and status = D4-5&E will 'e placed in the WF_&420F0$3204&_4/2 queue and sent '= the mailer. "C >sqlplus apps/apps_pwd OAF&6_24-/patch/99K/sql/wfntfqup 3--" 3--"_-W6 3-- "7" L, &ow =ou can start =our WF $ontainers and then Mailer

Workflow !ailer ,ebugging Script for ,ebugging Emails issues


2his article contains )arious Wor+flow and @usiness 5)ent de'ugging scripts. **Checking workflow Components status whether are the- running or stopped. select component_t=pe< component_name< $omponent_status<$4M-4&5&2_"232/"_0&F4 5rror from fnd_s)c_components where component_t=pe li+e 'WF:' order '= 9 desc<8<I%

/uer- to get the log file of active workflow mailer and workflow agent listener Container;;&ote 3ll Wor+flow 3gent $omponents logs will stored in single file i.e. container log file. select fl.meaning<fcp.process_status_code< decode*fcq.concurrent_queue_name<'WFM !"#$'< 'mailer container'< 'WF3 "&!"#$'<'listener container'<fcq.concurrent_queue_name,< fcp.concurrent_process_id<os_process_id< fcp.logfile_name from fnd_concurrent_queues fcq< fnd_concurrent_processes fcp < fnd_loo+ups fl where fcq.concurrent_queue_id=fcp.concurrent_queue_id and fcp.process_status_code='3' and fl.loo+up_t=pe='$-_-!4$5""_"232/"_$465' and fl.loo+up_code=fcp.process_status_code and concurrent_queue_name in*'WFM !"#$'<'WF3 "&!"#$', order '= fcp.logfile_name%

Linu0 Shell script Command to get outbound error in !ailergrep ;i 'PQRR3;Sa;TU.?Q*inQVoutQ,.?'ound2hread1roup.?Q*/&5F-5$256QV5!!4!Q,.?eBception.?' <logfilename> V tail ;9( %

htt"://oracle!r#ou$blogs"ot$co%/ 01&/0&/workflow'%ailer'troubleshooting$ht%l

1/10/ 01!

Oracle Knowledge Hub: Workflow Mailer Troubleshooting

Page ! of 6

;;&ote. 3ll Mailer log files starts with name F&6$-1"$ prefiB Linu0 Shell script Command to get inbound processing error in !ailergrep ;i 'PQRR3;Sa;TU.?.?in'ound2hread1roup.?Q*/&5F-5$256QV5!!4!Q,.?eBception.?' <logfilename> V tail ;9( %

/uer- to Check Workflow !ailer 1acklog;;"tate=!ead= implies that emails are not 'eing sent N Waiting mailer to send emails select ta'.msg_state< count*?, from appls=s.aqAwf_notification_out ta' group '= ta'.msg_state %

Check an- particular #lert !essage email has be pending b- !ailer select decode*wno.state< (< '( = -ending in mailer queue'< 9< '9 = -ending in mailer queue'< 8< '8 = "ent '= mailer on 'VVto_char*65C_20M5,< I< 'I = 5Bception'< J<'J = Wait'< to_char*state,, "tate< to_char*65C_20M5,< wno.user_data.25F2_#$ from wf_notification_out wno where corrid='3--".3 !' and upper*wno.user_data.25F2_#$, li+e ':<"u'Wect of 3lert 5mail>:'%

Check 2he Workflow notification has been sent or not select mail_status< status from wf_notifications where notification_id=<notification_id> ;;0f mail_status is M30 < it means the email deli)er= is pending for wor+flow mailer to send the notification ;;0f mail_status is "5&2< its means mailer has sent email ;;0f mail_status is &ull N status is 4-5&< its means that no need to send email as notification preference of user is X6on't send emailX ;;&otification preference of user can 'e set '= user '= logging in application Y clic+ on preference Y the notification preference

Check Whether workflow background Engine is working for given workflow or not in last 3 da-s;; &ote. Wor+flow 6eferred acti)ities are run '= wor+flow 'ac+ground engine. select a.argument9<a.phase_code< a.status_code <a.actual_start_date<a.? from fnd_concurrent_requests a where $4&$/!!5&2_-!41!3M_06 = *select concurrent_program_id from fnd_concurrent_programs where $4&$/!!5&2_-!41!3M_&3M5='F&6WF@1', and last_update_6ate>s=sdate;8 and argument9='<Wor+flow 0tem 2=pe>' order '= last_update_date desc Check whether an- business event is pending to process i.e. /uer- to get event status 4 parameters value of particular event in wf5deferred table. select wd.user_6ata.e)ent_name<wd.user_6ata.e)ent_+e=< ran+*, o)er * partition '= wd.user_6ata.e)ent_name< wd.user_6ata.e)ent_+e= order '= n.name, as serial_no< n.&3M5 -arameter_name< &.)alue -arameter_)alue < decode*state< (< '( = !ead='< 9< '9 = 6ela=ed'< 8< '8 = !etained'< I< 'I = 5Bception'< J<'J = Wait'< to_char*state,, state< wd.user_6ata."5&6_6325< wd.user_6ata.5!!4!_M5""315< wd.user_6ata.5!!4!_"23$Z< wd.msgid<wd.dela= from WF_65F5!!56 wd < 23@ 5*wd.user_6ata.-3!3M525!_ 0"2, n where lower*wd.user_data.e)ent_name,='<e)ent &ame >' order '= wd.user_6ata.e)ent_name< wd.user_6ata.e)ent_+e=< n.name

When the wor+flow mailer is either disa'led or the mail ser)er restricts its access to the wor+flow mailer< all the wor+flow notifications will retr= and upto the limit set at the wor+flow mailer configuration and later all the notifications will 'e failed. 2his will result in 8 things at 3pplication le)el i, M30 _"232/" column of the WF_&420F0$3204&" set to F30 56. ii, 3fter a series of failure notifications the &otification "t=le for the respected /ser will 'e set as 6isa'led and a corresponding user details are sent to "7"36M0&.

htt"://oracle!r#ou$blogs"ot$co%/ 01&/0&/workflow'%ailer'troubleshooting$ht%l

1/10/ 01!

Oracle Knowledge Hub: Workflow Mailer Troubleshooting

Page 5 of 6

3 similar issue araised in one of the client and the man= of the users notification st=le has 'een set to,isabled. Solution: 2o o)ercome the a'o)e issue< initiall= fiB the wor+flow mailer issue and later need to change the &otification -reference at Wor+flow 3dministrator to X>2M with 3ttachmentsX *or an= other as per the client's requirement,. @ut sometime this setting won't 'e affected to all the users whose -reference is set to 6isa'led. 2o o)ercome this situation. i, @ac+up the following ta'les. $!5325F&6_/"5!_-!5F5!5&$5"_@3Z as select ? from F&6_/"5!_-!5F5!5&$5"% $!5325 WF_ 4$3 _!4 5"_@3Z as select ? from WF_ 4$3 _!4 5"% ii, 2o set the mail preference for all the users eBecute the following. update wf_local_roles set notification_preference='<wished_preference>' where orig_system in ('FND_US '!'"# '$% update fnd_user_preferences set preference_&alue='<wished_preference>' where preference_name=''()*+,"#' and module_name='-F' and user_name <> '.-F_D#F(U*+.'%/ iii, 2o update the mail preference of the users onl= whose preference is set to XF30 56X< eBecute the 'elow steps. update wf_local_roles set notification_preference='<wished_preference>' where orig_system in ('FND_US '!'"# '$ and name in (select user_name from fnd_user_preferences where preference_name=''()*+,"#' and module_name='-F' and preference_&alue='D)S(0*#D'$% update fnd_user_preferences set preference_&alue='<wished_preference>' where preference_name=''()*+,"#' and module_name='-F' and preference_&alue='D)S(0*#D'% -ossi'le )alues for <wished_preference> are. C/5!7 *corresponds to preference )alue X6o not send me mailX, M30 25F2 *corresponds to preference )alue X-lain teBt mailX, M30 322> *corresponds to preference )alue X-lain teBt mail with >2M attachmentsX, M30 >2M *corresponds to preference )alue X>2M mail with attachmentsX, M30 >2M8 *corresponds to preference )alue X>2M mailX, "/MM3!7 *corresponds to preference )alue X-lain teBt summar= mailX, "/M>2M *corresponds to preference )alue X>2M summar= mailX, 60"3@ 56 *corresponds to preference )alue X6isa'ledX, iii, 2o !esend all the failed notifications again to the respected users run the following concurrent program as "7"36M0&< with the rele)ant parameters. 6etr- Errored Workflow #ctivities

No comments: Post a Comment

htt#://oracle"r$ou%blogs#ot%co&/! 1'/ '/workflow(&ailer(troubleshooting%ht&l

1/1 /! 1"

Oracle Knowledge Hub: Workflow Mailer Troubleshooting

Page 6 of 6

Enter your comment...

Comment as:

Select profile...

Publish

Preview

Newer Post

Home
Subscribe to: Post Comments (Atom)

Older Post

Awesome Inc. template. Powered by Blo

er.

htt"://oracle!r#ou$blogs"ot$co%/ 01&/0&/workflow'%ailer'troubleshooting$ht%l

1/10/ 01!

You might also like