11i Notification Mailer Setup and Testing - Definitive Step by Step Guide An Oracle White Paper April- 2002

cfg file. The procedure has not been tested out on Standalone Workflow but it should still work on a standalone version of Workflow. Notification Mailer – What is it ? Notification Mailer is the tool used by Workflow to send and receive mails. Step-5 and Step-6 below. The WFMAIL process acts upon these mails in the UNPROCESSED file after which . Concurrent Manager uses this tool to notify users of completed requests. If it cannot find an NID.5 with Embedded Workflow.11i Notification Mailer Setup and Testing Definitive Step by Step Guide Purpose The purpose of this document is to systematically list out a procedure for setting up and testing the Notification Mailer with sendmail in UNIX. While starting up. they are moved to the PROCESSED File. the process moves that mail to the DISCARD file.cfg file and its contents are discussed in detail in Step-3. The Notification Mailer makes use of the WFMAIL executable supplied with oracle applications.5.4 and 11. the executable expects certain parameters. . For the incoming mails that come to the location specified by the ACCOUNT parameter the WFMAIL process specifically looks for the NID (Notification ID) in the Mail body. For those notifications. The procedure has been tested out on Oracle Applications 11. The WFMAIL process keeps looking for rows in the WF_NOTIFICATIONS Table for Notifications with mail_status=ACTIVE. by sending mail to the address specified by the TO_USER column. wfmail. the mail is put to the UNPROCESSED file.5. How the Notification Mailer starts and what does it do ? The WFMAIL executable starts the WFMAIL process on the Server machine. If there is an NID in the incoming mail. These parameters are supplied to the executable through the wfmail. the WFMAIL process acts.

Since the $PATH environment variable is defined within the .6/bin /usr /home9/apps/actappl/fnd/11./.0.0.0/bin /home9/apps/actora/8.Starting up the Notification Mailer – Step by Step In the following discussion . -name sendmail -print ..8/bin /usr/ccs/bin /usr/sbin /usr/bin /ucb /etc . login to UNIX as the <applmgr> user and issue the following command : $ which sendmail no sendmail in /home9/apps/actora/8./usr/lib/sendmail So from the above output. $ pwd / $ find . Step–1 Start off by checking whether the sendmail executable is there in the $PATH . "ora8i" is the <applmgr> user. you will need to add /usr/lib to the $PATH environment variable. in which folder is the sendmail executable residing.profile file of the <applmgr> user.profile file itself and login again into UNIX Then $echo $PATH Study the output of the above to ensure that /usr/lib included in the $PATH .5. it is advisable to modify the . /usr/ucb/cc /usr/bin The above output means that sendmail executable folder location is not appended to $PATH. it is clear that the executable is inside the folder /usr/lib.0/bin /home9/apps/actappl/ad/11.6/bin /home9/apps/actcomn/util/jre/1. If you get an output such as the above. is .. first you need to locate. To do this. For this. See the following sequence of commands to locate the folder $ pwd /home4/ora8i $ cd .5.1.

0 Wed Sep 5 16:10:06 PDT 2001 Type ? for help. To test this reply has been received. /var/mail is a typical example of this location. then you can proceed to the next step-2 Step–2 Now test sendmail as follows : $ sendmail venkateswaran. should reply as $ which sendmail /usr/lib/sendmail If the command $which sendmail finds the sendmail executable. Check that the mail has been duly received at the mailbox. which is readable and writeable by the <applmgr> user.com hkld lkdf ghit <Terminate by typing in cntrl-D> $ This will send a mail to the specified address. Then you can reply to this mail from your mailbox and should be received at the UNIX <applmgr> account. login as <applmgr> into UNIX and type mailx $ mailx mailx version 5. So create 3 files at /var/mail as follows : $cd /var/mail $touch processed1 unprocessed1 discard1 .This time follows : issuing the command again. "/var/mail/ora8i": 1 message 1 new >N 1 venkat. Step–3 Now you need to create 3 Files at a location.krishnamoorthy@oracle.kris Tue Apr 2 16:53 56/1792 Re: ? 1 This step-2 ensures that sendmail is working correctly for sending and receiving mails.

The name of this wfmlrwf. $rm wfmlrwf.. the Notification Mailer creates a file in the Folder /tmp.tmp. as given above. and it will throw an error. dba 0 Apr 2 18:56 wfmlrwf.cfg file : UNPROCESS = /var/mail/unprocessed1 PROCESS = /var/mail/processed1 DISCARD = /var/mail/discard1 Step–4 While working.tmp. if exists ensure that the <applmgr> user owns it <applmgr> user has permissions -rw-r--r-. The following will be now the setting for the parameters in the wfmail. login to UNIX as the user who created the file and remove it.on this $cd /tmp $ls -l wfmlrwf. $ls –l starting up the will create the needs it.tmp file before mailer. It is permissions for .on these 3 files (as given above in the output). So.tmp If the file exists and is owned by a different user. Otherwise the WFMAIL process will not be able to write the temporary file. as and when it to be ensured that <applmgr> user has write the folder /tmp as follows.tmp If you remove the wfmlrwf. the WFMAIL process temporary file wfmlrwf.After doing the above step verify the permissions for these 3 files : $ ls -l -rw-r--r-1 ora8i dba 0 Mar 28 -rw-r--r-1 ora8i dba 0 Mar 28 -rw-r--r-1 ora8i dba 0 Mar 28 ownership and file 15:39 discard1 15:23 processed1 15:40 unprocessed1 Ensure that <applmgr> user is the owner of these 3 files (notice that ora8i is the owner in the above output) and has privileges -rw-r--r-.tmp. $cd /tmp $cd . you need to remove the file wfmlrwf.tmp -rw-r--r-1 ora8i temporary file is the file and the file. Check up at the folder /tmp.

Step–5 The ACCOUNT parameter in the wfmail. to suit your environment. Step–6 The first 5 steps complete the preparatory steps. And modify ACCOUNT parameter in the wfmail. The sample wfmail. the mails with an NID are directed to the UNPROCESSED file and others to the DISCARD file. And the resulting ACCOUNT parameter will be /var/mail/ora8i. $cd /var/mail $touch ora8i $ls –l -rw-rw---1 ora8i mail 1216 Apr 20 12:41 ora8i This file (in this case ora8i) is important because all the incoming mails for the <applmgr> user are received into this file. Do not forget to change the APPS password.cfg file actually points to a file inside the Folder /var/mail. If you are configuring the Notification mailer service to startup from a user other than the <applmgr> user. in this case the file name is ora8i.cfg file supplied by the installer can be located at $FND_TOP/resource folder. The name of the file is same as the name of the <applmgr> user. which will be used by the WFMAIL process. Now you can proceed to make a wfmail. Then from this file the WFMAIL process will read the incoming mails for the user.drwxrwxrwt 9 sys sys 6438 Apr 2 19:16 tmp Notice drwxrwxrwt permissions in the output above. As explained earlier. if you have modified it. So. Modify this file appropriately. Here are the minimum parameters and the corresponding representative values that you need to make the mailer work : Connect provides the Database login information for the mailer process. then ensure that there is a file by the same name as the user name in the folder /var/mail.cfg file accordingly. . This is the default setting for /tmp folder and so it is sufficient if you merely verify it.cfg file.

it is /var/mail). SHUTDOWN is a very important parameter. they need to be put into a the mailer can pick up the messages one outbound SMTP queues can be retained as of 1. ACCOUNT=/var/mail/ora8i The FROM parameter is the "From" field in mails sent from the mailer. SHUTDOWN=/var/mail/shutdown1 For the above value of the SHUTDOWN parameter. Number of the default value QUEUE=1 NODE is the mailer Node name. but is mandatory. Then create a SHUTDOWN file by the same name given for this parameter in the wfmail. The WFMAIL process is shutdown smoothly in a very peculiar way. Then navigate to the Folder where the SHUTDOWN parameter is pointing to (In this Example. IDLE=20 This can be given any value piled up. from where by one. NODE=wf IDLE is in seconds and means that WFMAIL process will act every IDLE seconds.CONNECT=apps/apps@ACT Step-5 above gives the details of the ACCOUNT parameter. It points to the location of the shutdown file. FROM=Oracle Workflow When messages get Queue.cfg file. You need to login to the UNIX Server where WFMAIL Service is running as the user who started the WFMAIL service. you can do the following to stop the WFMAIL service : $cd /var/mail $touch shutdown1 .

5. REPLYTO=ora8i@insn056q. REPLYTO is the UNIX mail address of the <applmgr> user. UNPROCESS and PROCESS parameters are as explained in Step-3 above. there are 9 such entries in the tagfile.cfg file CONNECT=apps/apps@ACT ACCOUNT=/var/mail/ora8i FROM=Oracle Workflow QUEUE=1 NODE=wf IDLE=20 . WFMAIL process uses the tags defined in this file at the time of response processing.log DEBUG=Y TAGFILE is supplied by the Oracle Applications Installer. Step–7 Consolidating the parameters explained in the previous Step-6. LOG= /home9/apps/actappl/fnd/11. the following would be the contents of a valid WFMAIL.idc.Unsent message follows --" So. when ERROR results.Note that this is the only way to smoothly stop the WFMAIL Service.5.com DISCARD. It can be located inside the $FND_TOP/resource Folder.0/resource/wfmail.oracle. the tag that gets added to the response mail will be “-. This is an important parameter and will be used by the mailer to sent back replies. DISCARD=/var/mail/discard1 PROCESS=/var/mail/processed1 UNPROCESS=/var/mail/unprocessed1 It is recommended to include the following 2 parameters.Unsent message follows –“ In 11. A typical entry from the tagfile is given below : ERROR "-.5. to enable debugging.

5.log TAGFILE=/home9/apps/actappl/fnd/11. the WFMAIL executable will HOLD this UNIX session. it will also display progress messages and errors on the UNIX session console. As a concurrent request The first method of starting up the mailer from the UNIX command prompt. Mailer .com DISCARD=/var/mail/discard1 PROCESS=/var/mail/processed1 UNPROCESS=/var/mail/unprocessed1 SHUTDOWN=/var/mail/shutdown DEBUG=Y LOG=/home9/apps/actappl/fnd/11. as the Mailer processes any notification request. So.krishnamoorthy@oracle. is recommended.oracle. The above 8 steps will enable the Notification startup .idc. So. The next step will be to test the setup. 2. These messages are vital in diagnosis.TEST_ADDRESS=venkateswaran. From the $ prompt of the UNIX applmgr user.tag Step–8 Having made a valid wfmail. if you are setting up the Notification Mailer for the first time.5.cfg file. once you have established a working mailer setup.com REPLYTO=ora8i@insn056q. There are 2 ways of starting up the mailer service : 1. The following is the command : $cd $FND_TOP/resource $WFMAIL apps/apps@ACT 0 Y $FND_TOP/resource/wfmail.0/resource/wfmail.0/resource/wfmail. This is because. you can now proceed to start up the Notification mailer. resort to this method. then you will not have an UNIX session to see the progress OR to see any debugging information necessary for diagnosis. basically you will not be able to do anything from this UNIX session console. So.cfg The downside of this method is. this method of Startup is suitable. ( It will appear to hang ! ) If you choose to start the Notification Mailer as a concurrent request.

in the same page ==> Against . 2. Security ==> User ==> Define. say "Active Responsibilities" and choose to notify the User created at Step-1 : Notify ==> Options Button Name field.Testing the Notification Mailer There are 2 ways of testing the setup : 1. By using a simple Workflow process. To do this. receiving the mail by the Mailer and the appropriate routing on receipt of a mail. take care to input the correct E-mail address of this user at the E-mail field. If you do not have the Workflow builder. Before doing either of the 2 tests. are not tested. first of all login to Oracle Applications as SYSADMIN/SYSADMIN and create a new user and Save. Testing by submitting a concurrent request The advantage of testing the Mailer using this Test is that. Now submit a request. an E-mail will be sent to this user. Later. enter STEVE. By submitting a concurrent request 2. you will have to be content with this test of the Mailer. the test is very simple and that it can be done without using the Workflow Builder. (Ex. ensure that the Notification Mailer has started and is running on the Applications Server. this test only tests "sending" the mail from the mailer. to test the working of the Notification Mailer setup. The downside of this approach being that. specifying to notify the user created in Step-1 Concurrent ==>Requests ==>Submit a New Request ==>Single Request Choose the Name of an Example Request . 1. STEVE) While creating this user.

At this point.zip supplies 2 files : .mail_status from WF_NOTIFICATIONS WHERE notification_id=21462 CLOSED SENT This completes this Test and tests that the Mailer is working for sending mails.zip supptest26. then it is certain that the mail has been correctly sent to STEVE. inspect the request log for a line. 21462). Issue the following SQL as apps/apps user to confirm that the Notification with this NID has 'status' as 'CLOSED' : SQL>SELECT status.com/apps/patchsets/AOL/SCRIPTS/WORKFLOW/GENERIC/11i/ The File to be downloaded is supptest26.oracle. proceed to submit the Request by clicking on Submit button. User STEVE can check his Mailbox at the E-mail address given in Step-1 for the receipt of the mail.Sending 'OPEN' for NID 21462 If there are no error messages at the UNIX console accompanying the above line. if you see the UNIX session running the Mailer. To do this Test. Once the submitted request completes. NID is the Notification ID generated by the Mailer. which specifies the NID (Ex. you can see a line such as the following : 01-04-2002 16:24:56 . Testing the Mailer using a simple Workflow model This method of testing is the comprehensive way of testing the Notification Mailer setup. This is also the test recommended by the Oracle Support team. After Step-2. The test can be downloaded from the following URL : ftp://oracle-ftp.3. you need to have the Workflow builder installed on a Windows client machine.

first of all login to Oracle Applications as SYSADMIN/SYSADMIN and create a new user and Save. which is the simplest item type one can think of. see Step-1 in the Readme File. . Step by step instructions to carry out this Testing 1. we can assign the Role to the testing Notifications to be sent from this item type.(Steps 2 & 3 in the Readme File) 3. To do this. the mails generated by the Item Type will be directed to this Role (Meaning. 2. STEVE) While creating this user. Later. A *. to verify) corresponding to the user created in Step-1. when the item type is run.wft file by name supptest26. Follow Step-4 in the Readme to accomplish the Loading of this Role from the Database to this Workflow Builder session. Only then.wft file defines an item type called SUPPTEST. to test the working of the Notification Mailer setup. from the mailer. That Role will have to be loaded into the Workflow Builder session. The supptest26. input the correct E-mail address of this user at the E-mail field. to the user created in Step-1) . Then we proceed to open the Workflow Builder and establish a Database connection as user apps/apps. in the following instructions. (Ex. which can be used to do this test. Steps mentioned in this Readme file are referred to. A Readme file. to do this testing of the Mailer. So. Also. A Role will get created in the Database (You can Query the WF_USERS and WF_ROLES view. 2. This Readme file contains step-by-step instructions for doing the test.wft This file defines the workflow process. Create an Oracle Applications user to whom Notifications will be sent for testing. a mail will be sent to this user. Security ==> User ==> Define.1.

After the above 6 steps. Oracle Applications supplies an SQL file called WFRUN. This is the INTERNAL NAME of the item type "Support Item Type". Step-8 in the Readme explains the details of loading this file back into the Database. except that it should NOT have been used before for this type. To run any Workflow process from the SQL prompt . To do this. <item_type> is the first parameter. The above set of steps.wft file into this Workflow Builder session. In this case. you can get this by doing the following on the Workflow Builder Navigator : Support Test Item Type ==> Mouse Right Click ==> Properties ==> Internal Name ( You will find that SUPPTEST is the value in this case) The second parameter <item_key> can be any number. The next step is to open the supptest26. which modification in turn will enable us to sent the Notification to the user that was created in Step-1. complete the modifications to be made on the supptest26. and appropriately modify its performer value. You will still need it to find out the parameters that are to be passed to WFRUN.4. do not end the Workflow builder session. The very purpose of opening the supptest26. Step-7 in the Readme details the steps involved. we go to the "properties" of the "Support Test Notification" icon on the workflow process diagram.SQL.wft file. 5. . That only will confirm whether the mailer setup is working or not. This file can be located at $FND_TOP/sql. 6. To do this. follow Step-5 and Step-6 of the Readme. we need to run the "Support Test Process" from the SQL prompt. This SQL file takes in 3 parameters.SQL (next step) Having loaded the appropriately modified SUPPTEST item type back into the Database.wft item type in a Workflow Builder session is to modify it. It can be now loaded back into the Database.

follow Step-10 in the Readme. WFSTATUS.SQL is to be used to VERIFY THE STATUS of the SUPPTEST item type. Otherwise. the above information about the 3 parameters .<process_name> is the 3rd parameter. will be helpful. The value of this parameter is the INTERNAL NAME of the "Support Test Process".SQL.SQL shows a typical output from running the 1. to RUN the SUPPTEST item type using WFRUN. you can get this by doing the following on the Workflow Builder Navigator : Processes ==> Support Test Process ==> Mouse Right Click ==> Properties ==> Internal Name (You will find that SUPPTEST_PROCESS is the value in this case ) If you either modify the Item Type or decide to create your own testing workflow process. In this case. As suggested in the Readme Step-11. The following WFSTATUS. Output while the process has been COMPLETED 14-APR-02 19:22:59 ROOT/Support Test Process COMPLETE #NULL <== 14-APR-02 19:22:59 Support Test Process/Start COMPLETE #NULL . Output while the process is still ACTIVE 14-APR-02 19:22:59 ROOT/Support Test Process ACTIVE #NULL <== 14-APR-02 19:22:59 Support Test Process/Start COMPLETE #NULL 14-APR-02 19:22:59 Support Test Process/Support Test Notificatio COMPLETE REJECTED VENKAT n 14-APR-02 19:34:38 Support Test Process/Support Test Notificatio NOTIFIED VENKAT <== 2.

14-APR-02 19:22:59 Support Test Process/Support Test Notificatio COMPLETE REJECTED VENKAT n 14-APR-02 19:34:38 Support Test Process/Support Test Notificatio COMPLETE REJECTED VENKAT n 14-APR-02 19:37:41 Support Test Process/End COMPLETE #NULL <== You can see from the above output that. it is recommended to start the mailer from the UNIX command prompt for ease in diagnosis. . As stated earlier. jinitiator will get downloaded from your server and will show no Yellow bar. Trouble shooting Listed below is a set of errors that you may encounter while configuring the Notification Mailer. make sure that you don't have a yellow bar on the client machine. If you are using concurrent request to test the Notification mailer setup.cfg file. Also start the mailer.SQL to Oracle Support for Troubleshooting. in the first case. the ROOT Process is showing that it is ACTIVE (See the first line). In the second case.From the 4th line. the ROOT Process is showing COMPLETE status (See the first line). And the last line confirms that the process has ended. If you do see a Yellow warning bar. Remove the existing jinitiator by going through Start ==> Settings ==> Control Panel ==> Add/Remove Programs. you can be sure that the Notification Mailer is up and running correctly. Solution => The solution in this case is to download the jinitiator from the same server from where you are accessing Oracle Applications using the URL. Now when you access Oracle Applications afresh. then mails may not get sent. you need to send the output of WFSTATUS. Once you get an output such as this. it is clear that VENKAT has been NOTIFIED and reply action is pending from his mailbox. Otherwise. 1. stating DEBUG=Y and LOG=<log_file_name> in the wfmail.

WF_MAIL".2320: Setting context failed for notification 19805.5. you need to Apply patch 2021605 as per Note:165058.2009: Fatal error. And the mailer will crash. . line 2206 ORA-06512: at line 1 . $ Solution => In 11.Sending 'OPEN' for NID 19805 wferr: . If you have not followed this document in setting up the Notification Mailer.tmp'. when it tries to send the mail : 14-APR-2002 18:44:06 .210: Oracle Error: ORA-20002: 3102: Item Type '' does not exist. . .tmp' Solution => This problem arises because the WFMAIL executable is not able to write to the temporary file '/tmp/wfmlrwf. end. then you might get the following error on the UNIX session where you started the WFMAIL Service : .207: Could not open file '/tmp/wfmlrwf.WFMLRSLOOP_FAIL .SetContext(:n).2206: Mail service could not send mail message. You might get the following error on the UNIX session where you started the WFMAIL Service. ORA-06512: at "APPS.2. .5 .1 4. mailer is exiting.( But they should be in HTML Format so that you can respond ! ) Solution => Go to the Workflow Home page through Oracle Applications as SYSADMIN user. You have the following scenario : Mails are correctly received. Review Step-4 under "Setting up the Notification Mailer" section in this document and conform to the points in that step. 3. SQL text: begin WF_MAIL. But the received mails have "ACCEPT" and "REJECT" tags in text Format. to solve this. and modify "Send me Electronic mail notifications" to either “HTML Mail” OR “Plain Text mail with HTML Attachments” .

. In issuing SQL queries against these views. you can run the test mentioned under "TESTING THE MAILER USING A SIMPLE WORKFLOW MODEL" in this document. for general troubleshooting. If it works correctly. use the Notification ID (NID) as the search criteria. then the problem is mostly in the Item type definition. WF_NOTIFICATIONS and WF_ROLES . 6.5. To isolate whether a problem arises due to the mailer or due to an item type supplied by any Oracle Applications Module. You can query up the Database views WF_USERS.

Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores.V.S.A. [Add trademarks here] are trademarks o f Oracle Corporation.506.7200 Copyright © Oracle Corporation 1995 All Rights Reserved .7000 Fax 415. Oracle Corporation does not provide any warranties covering and specifically disclaims any liability in connection with this document.A.11i Notification Mailer Setup and Testing . This document is provided for informational purposes only and the information herein is subject to change without notice. Madhu Sudhan (UNIX) Copyright © Oracle Corporation 2002 All Rights Reserved Printed in the U. CA 94065 U. Oracle is a registered trademark and Enabling the Information Age. Please report any errors herein to Oracle Corporation.506. Worldwide Inquiries: 415.Definitive Step by Step Guide May 2002 Author: Venketeswaran.K Contributing Authors: Prashanth Naik (Testing).S.