Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 9

WF Mailer setup for a dev/test environment

There is a lot of Oracle e-Business Suite installations that use workflow mailer to
communicate messages to users and many of these environments have clones for
development and testing purposes. It’s obvious in most cases people that actually use the
system will not be the same that develop customizations or do testing, therefore we need
to reconfigure the workflow mailer to avoid sending misleading messages to business
users from development or test environments.

Lets take a look at what options we have!

• Don’t start up the workflow mailer in the test environment - yap, that’s a valid
solution as the scope of development or testing may not need the functionality of
sending the e-mails.
• Set the “Test address” that will receive all mails sent by the workflow mailer.
This option can be set using Oracle Application Manager (OAM) by editing the
workflow mailer configuration and entering the email address in the “Test
address” field (prior ATG_PF.H RUP3) or using the “Set Override Address”
button. (starting from ATG_PF.H RUP3).
This is easy to set option, but it’s not always possible to use it as there may be too
many mails incomming to the test address or too many people need acces to these
mails
• Modifying user preferences - users can use the preferences of their account to
modify the settings of incoming notifications by themselves.

User Preferences

User preferences define what type of emails should be sent and also allows to turn off
email notifications. The problem here is that those preferences can be modified only for
user account that is logged on currently, so there is no built in functionality to change the
settings for all users at once, therefore we need some update statements to do it manually.
Workflow mailer reads the configuration stored in WF_LOCAL_ROLES table to find the
notifications settings, so if we want to disable the emails for all the users we can use this
update statement:

update WF_LOCAL_ROLES a
set notification_preference = 'QUERY'
where name IN (select user_name from fnd_user);

notification_preference can contain 8 different values that map meanings in the


dropdown box of user preferences screen the following way:

• DISABLED - Disabled
• QUERY - Do not send me mail
• MAILHTM2 - HTML mail
• MAILHTML - HTML mail with attachments
• SUMHTML - HTML summary mail
• MAILTEXT - Plain text mail
• MAILATTH - Plain text mail with HTML attachments
• SUMMARY - Plain text summary mail

However, WF_LOCAL_ROLES table does not specify the setting that’s displayed in the
preferences screen. To change that as well we update another table -
WF_ATTRIBUTE_CACHE

update WF_ATTRIBUTE_CACHE a
set attribute_value = 'QUERY'
WHERE ENTITY_TYPE = UPPER('USER')
and a.entity_key_value in (select user_name from fnd_user)
and attribute_name = 'ORCLWORKFLOWNOTIFICATIONPREF';

When it’s done, the users that need the email notifications from the dev/test environment
just have to change their preferences manually.

Workflow Mailer Configuration File


 Found WorkFlow Mailer file : /u10/mysidappl/fnd/11.5.0/resource/wfmail.cfg

i.e. $FND_TOP/resource/wfmail.org

How to access the Workflow Java Mailer without logging into OAM?

a. Click on the Workflow Administrator Web (New)


responsibility.
b. In the upper right under Oracle Applications
Manager, click on Workflow Manager.

Goal
How to troubleshoot the following errors seen in mailer log:

Validation failed for the following parameters:

1) OUTBOUND_SERVER=Unable to make a network connection.

2) ACCOUNT=Unable to connect to the mail account. Check the host, user name and
password.

Solution

1) Regarding OUTBOUND_SERVER related error:

The SMTP server node must be reachable from the concurrent tier where mailer
runs.

This can be tested as follows:


Log in to the node that corresponds to the concurrent tier where mailer
runs, and here try to ping the SMTP server node (aka OUTBOUND_SERVER).

If you cannot ping it you'll have to get in touch with your network team.

2) Regarding ACCOUNT related error


With a client email, you must be able
to connect to IMAP account on IMAP server with the IMAP password.

Values for IMAP account, server and password should have been entered in mailer
configuration pages in OAM.
How to Start or Stop the Workflow Java Mailer?

a. Log into OAM and navigate to:

Sitemap > Under Workflow > Service Components > Select Workflow Notification
Mailer Service > Click on Stop or Start.

b. Wait a minute and verify that mailer component stays in a STARTING or STOPPING
state.
How to increase the log level for the Workflow Mailer?

a. Log into OAM and navigate to:

Sitemap > Under Workflow > Service Components > Select Workflow Notification
Mailer Service > Edit > Advanced.

b. On step 2 of 8, for the log level section, click on the list of values selecting Statement.

c. Click on Next to step 4 and click on Finish. The workflow mailer service will need to
be restarted in order to pick up the change.

How to increase the log level for the Workflow Components?

a. Log into OAM and navigate to:

Sitemap > Under Workflow > Service Components > Select Workflow Notification
Mailer Service > Click on the Workflow Mailer service to the right > Edit > Edit Service
Parameters

In this setting:

SVC_WRITE_DIAG_TO_GSM_LOG=Y:SVC_CONTAINER_LOOP_SLEEP=10:SVC
_CONTAINER_READ_TIMEOUT=10:

SVC_CONTAINER_LOG_LEVEL=4:SVC_COMP_MONITOR_LOOP_SLEEP=60:SV
C_COMP_MONITOR_ONDEMAND_FREQ=300:
SVC_COMP_MAX_ERROR_COUNT=5:SVC_PROXY_SET=NONE:SVC_class=Mso
Normal
style='margin-left:1.0in'

change SVC_CONTAINER_LOG_LEVEL=4 to SVC_CONTAINER_LOG_LEVEL=1

b. Click OK > Save > select Workflow Mailer Service > Start

Wait a minute and verify that mailer component stays in STARTING state. Do the same
for Agent Listener services. Simply reverse this setting the level back to 4 to reduce the
logging level.

NOTE: Not changing the log level back to a lower level will generate larger log files.

Where are the mailer log files located?


On the concurrent tier, navigate to:

a. $APPLCSF or $APPLLOG directory.

b. $> ls -ltr FNDCPGSC*.txt

What Workflow changes are required for cloning an instance?

a. Please be sure to complete section 3 of Note 230672.1 Cloning Oracle Applications


Release 11i with Rapid Clone .

b. Please be sure to input the new IMAP and SMTP server names and passwords within
the definition of the Workflow Mailer in OAM.

Why can Workflow email notifications be received, but the responses are not
processed?

a. This could be associated to the inbound thread count set for the mailer being set to 0.
The value is set on Step 2 of the configuration of the Workflow Mailer in OAM. If the
value is changed, the configuration must be saved and the workflow notification mailer
service will need to be re-started.

b. An override address may be set where all email notifications are sent to the override
address. To check this, click on the “Workflow Notification Mailer” link
and click on the Set Override Address button. If the Current Override Address has an
email address, all Workflow Email Notifications are being sent to that address. To change
it to NONE, click on Submit with no value in the * New Override Address field. If the
value is changed, the configuration must be saved and the workflow notification mailer
service will need to be re-started.

How to send a test email notification?

(a) Login to OAM

(b) Navigate to: Workflow Manager (click Go).

(c) Click on the 'Service Components' link at the bottom left side of the screen.

(d) Click on the Workflow Notification Mailer service component.

(e) Click on the 'Test email' link at the top right of the screen and follow the process.

(f) Select a valid role from the list of values for the test.
How to check the email template within OAM?

a. Log into OAM as the SYSADMIN user.

b. Select Workflow Manager from the Drop Down list.

c. Select Service Components

d. Highlight the radio button next to the Workflow Mailer Service and select "View
Details" for the mailer.

e. On this screen there is a section named Templates.

f. What is selected as the Mail Template is the current email template used. If the
template is changed, the workflow mailer service must be re-started in order to adopt the
change.

How to turn off notifications for a user?

1. Logged into applications, click on the Preferences link in the upper right hand corner.

2. Change the Email Style under Notifications to: Do not send me email and save.

Why would Workflow Email Notifications not be received for a user, but are for
others?

The notification preference may not be set to receive email notifications for the user and
can be checked by performing the following steps:

1. Log into applications.

2. In the upper right hand corner of the screen, click on Preferences.

3. Within the Notifications section for Email Style, the value must be set to a value other
than: Disabled or Do not send me mail.

How to determine the Notification Perference for a user without logging into
Applications?

1. select name, display_name, notification_preference, email_address from


wf_local_roles where name = 'xxxxxx';

Run $FND_TOP/sql/wfver.sql and review the output for workflow health in your system.
Monitoring Workflow Agent Listeners
Hey, the blog is new and I haven’t yet gotten used to it, therefore I absolutely don’t know
what you would like to read about But it’s also good because I can choose the topics
freely. This one will be about monitoring the Workflow Agent Listeners or how to make
sure Agent listeners are really doing their job.

The question is simple: How do we know if Agent listeners are really working as
expected?

We can take a look of the status icons is Oracle Application Manager

Status icon of Agent Listeners

… the icon is green so the started Agent listeners are working. You can also click on the
icon and see the status of each Agent listener separately …

Status of each Agent listener

But is that enough to say that it’s all right with the Agent listeners? if we want to be sure
about it, we have to check if all the job that has to be done by the Agent listeners is really
done.

As Agent listeners are based on Oracle queues, we’ll check if the queue serving particular
Agent listener contains many pending messages. If it is - it’s clear that something is not
right there.

We’ll need to query 3 tables/views to get the information you need for checking how
much work is left to be done for the listeners:

• applsys.fnd_svc_components - table which stores information about service


components whic also the Agent listeners are;
• applsys.wf_agents - Agent definitions for Business Event System ( ETRM )
• dba_queues - Describes the operational characteristics of every queue in a
database (Oracle 10g R2 documentation)

Here’s the select that shows which queue corresponds to each Agent listener:

select t.component_name,
p.owner,
p.queue_table,
t.correlation_id
from applsys.fnd_svc_components t,
applsys.wf_agents o,
dba_queues p
where t.inbound_agent_name || t.outbound_agent_name = o.name
and p.owner || '.' || p.name = o.queue_name
and t.component_type like 'WF_%AGENT%';

There are some interesting parts, like “t.inbound_agent_name || t.outbound_agent_name


= o.name” in the query, that’s because the Agent listener will be either inbound or
outbound, but not both at the same time, so we can concatenate both fields (as one of
them is null) to make it shorter.

The output of the query will be like this:

Agent listener related queue tables

I’ll use this information to construct queries for checking pending messages in the queues
dynamically:

select 'select ''' || t.component_name || ' (queue_table: ' ||


p.QUEUE_TABLE || ')''||'' Count: ''||count(*) c from ' ||
p.owner || '.' ||
p.QUEUE_TABLE ||
' where deq_time is null and nvl(delay,enq_time)<sysdate-1/24 '
||
nvl2(t.correlation_id,
'and corrid like ''' || t.correlation_id || ''' ',
null) || 'having count(*)>0;'
from applsys.fnd_svc_components t, applsys.wf_agents o, dba_queues p
where t.inbound_agent_name || t.outbound_agent_name = o.name
and p.OWNER || '.' || p.name = o.queue_name
and t.component_type like 'WF_%AGENT%';

This will give you queries for checking how many messages that should have been
processed an hour ago there are for each Agent listener in it’s queue. Like these:
select 'ECX Inbound Agent Listener (queue_table: ECX_INQUEUE)' ||
' Count: ' || count(*) c
from APPS.ECX_INQUEUE
where deq_time is null
and nvl(delay, enq_time) < sysdate - 1 / 24 having count(*) > 0;

… or …

select 'Workflow Deferred Notification Agent Listener (queue_table:


WF_DEFERRED)' ||
' Count: ' || count(*) c
from APPLSYS.WF_DEFERRED
where deq_time is null
and nvl(delay, enq_time) < sysdate - 1 / 24
and corrid like 'oracle.apps.wf.notification.%'
having count(*) > 0;

After executing all the dynamically generated select statements, the output will turn your
attention only to potentially problematic ones.

Workflow Java Deferred Agent Listener (queue_table: WF_JAVA_DEFERRED)


Count: 3493

I have integrated this kind of check into monitoring system we have so that I get a
message to my mailbox when my attention is needed.

Of course, this just makes sure Agent Listeners get their “tasks”, but does not mean they
complete them successfuly… On the other hand, if an Agent listener works with errors -
it is terminated after a number of errors that is definable through AOM, and if that
happens, new messages will pile up in the queues and this monitoring will notice it.

You might also like