Oracle WorkFlow Notification Mailers and Background Engines.
How to setup Oracle WorkFlow.
Oracle WorkFlow Notification Mailers and Background Engines.
This document can help you setup your Oracle WorkFlow environment in an Oracle aspplications 11.5.10.2
Disclaimer: Apply to a TEST environment first. Use on production systems is at DBAs own risk.
Is WorkFlow running:
When you start Oracle Apps using adstrtal.sh Oracle WorkFlow components should all start if WorkFlow is properly configured.
To verify that WorkFlow is running in your environment do as follow:
Start an URL into OAM (Oracle Application Manager) (http://server.domain.com:8000)
From the Applications Dashboard, navigate to the Workflow Manager by selecting Workflow Manager from the “Navigate to” pull-down menu and choosing the Go button.
Notification Mailers, Agent Listeners, Service Components, Background Engines, Purge and Control Queue Cleanup all should show as Up.
Configure WorkFlow Mailer:
Log on to Oracle Applications Manager.
From the Applications Dashboard, navigate to the Workflow Manager by selecting Workflow Manager from the “Navigate to” pull-down menu and choosing the Go button.
Click the Notification Mailer status, then click Edit
In the Outbound Email Account (SMTP) region, enter the name of the outbound SMTP mail server. (e.g: your_mail_server.your_domain.com). Here we would assume for the rest of this document that the mail server and smtp server name is mail.
Then edit context area setting SMTP and IMAP: logon to OMA as sysadmin, Site Mapà Administrationà Autoconfig à tab systemà oa_workflow_server
and oa_smtp_server (or if OAM timing out on editing context area then vi the xml context file and search for smtp and imap) server to mail and smptpdomain and imapdomain to your_domain.com then run autoconfig following steps in section “Use autoconfig to regenerate configuration files.
Note that in a cloned instance such as TEST setting the value of smtp to mail through the OAM and the running autoconfig did not retain the mail and reset it to server name in the context file, I had to update smtp directly in the xml file then rerun autoconfig again.
Have the mail administrator to create an email account for oworkflow@your_domain.com in SMTP server mail.your_domain.com.
System profile parameters:
As sysadmin make sure the following system profile are set:
ICX:Session Timeout = 120
ICX: Limit time = 999
FND Function Validation Level – None
FND Validation Level – None
Framework Validation Level – None
Notification Mailers fail to start:
The log file points to the following errors:
BES system could not establish connection to the control queue
or
Failed to establish Java Business Event System control connection
Metalink Note:358848.1 says to look in file:
$APPL_TOP/admin/adovars.env
and make sure the following variable :
AF_CLASSPATH: appsborg2.zip should come before appsborg.zip.
Here is the detail of how to do this:
1. The first step is to modify your AF_CLASSPATH. Modify the AF_CLASSPATH in the context file (OAM à Site Map àMonitoring tabàApplications Contextà under environment à under oa_environment:adovars )
NOTE: Make sure all the files exist before modifying this variable.
Node1:
Correct value: (please modify path according to your environment)
AF_CLASSPATH
/opt/java1.3/lib/dt.jar:/opt/java1.3/lib/tools.jar:/opt/java1.3/jre/lib/rt.jar:
/opt/java1.3/jre/lib/i18n.jar:/u01/app/R11i/prodcomn/java/appsborg2.zip:
/u01/app/R11i/prodcomn/java/appsborg.zip:
/u01/app/R11i/prodora/8.0.6/forms60/java:/u01/app/R11i/prodcomn/java
Node2:
Correct Value: (please modify path according to your environment)
/opt/java1.3/lib/dt.jar:/opt/java1.3/lib/tools.jar:/opt/java1.3/jre/lib/rt.jar:
/opt/java1.3/jre/lib/i18n.jar:/u02/app/R11i/prodcomn/java/appsborg2.zip:
/u02/app/R11i/prodcomn/java/appsborg.zip:
/u02/app/R11i/prodora/8.0.6/forms60/java:/u02/app/R11i/prodcomn/java
2. Run the autoconfig.
Shutdown apps then run autoconfig in all nodes.
3. Make sure the modifications were copied to the adovars.ora file
cd $APPL_TOP/admin
vi adovars.env
verify AF_CLASSPATH
4. Restart Apps. Workflow should work now.
Oracle Workflow background engine:
Ensure that you have at least one background engine that can check for timed out activities, one that can process deferred activities, and one that can handle stuck processes. At a minimum, you need to set up one background engine that can handle both timed out and deferred activities as well as stuck processes. However, for performance reasons Oracle recommends that you run three separate background engines at different intervals.
Run a background engine to handle only deferred activities every 5 to 60 minutes.
Run a background engine to handle only timed out activities every 1 to 24 hours as needed.
Run a background engine to handle only stuck processes once a week to once a month, when the load on the system is low.
Related queue tables:
WF_DEFERRED_QUEUE_M , WF_OUTBOUND_QUEUE , WF_INBOUND_QUEUE
Starting Workflow background engine:
If you are using the version of Oracle Workflow embedded in Oracle Applications, you can start a background engine by submitting the Workflow Background Process. Logon using system admin responsibility then switch to responsibility “Workflow Administrator Web Applications” and navigate to submit a request and submit three different “Workflow Background Process” as seen here.
I set Workflow Background Process to run as follow:
Run a background engine to handle only deferred activities every 15 minutes.
Run a background engine to handle only timed out activities every 12 hours.
Run a background engine to handle only stuck processes once a week Sunday at 3 AM.
Once you have these Workflow Background Process requests in the scheduler the OAM workflow manager will show the background engines as UP.
To Set Engine Thresholds:
To set the thresholds of background engines, specify the minimum threshold and
maximum threshold arguments when starting the engine. The background engine then only processes activities with costs within your specifications.
The Workflow Engine threshold is set to 50 as a default. Activities with a cost higher than 50 are deferred for background engines to process.
This means that every time a workflow process is estimated to have a cost greater than 50 then it is deffered and would be processed by the workflow engine. In these cases, the costly activity is deferred by the Workflow Engine and run later by a background engine. The main Workflow Engine can then continue to the next available activity, which may occur on some other parallel branch of the process.
Purge Obsolete Workflow Runtime Data (FNDWFPR):
For Oracle Workflow embedded in Oracle Applications, use the standard concurrent
program FNDWFPR “Purge Obsolete Workflow Runtime Data” to purge old data from the Oracle Workflow tables regularly.
I set a Purge Obsolete Workflow Runtime Data to run once a week Sunday at 5 AM with the following parameters, with age set 30 thus keeping 30 days of old data: (or set it to 60 in PROD)
Concurrent Managers and Workflow services:
In a normal environment where Oracle Workflow engine and Workflow Mailer Service are running you should see the following when navigating to Oracle Apps home page as sysadmin àConcurrent Managersà Administer
The services are Workflow Agent Listener Service and Workflow Mailer Service.
If any of these two services are missing then do as follow:
Make sure context area xml files in each node point to the right mail server (mail) for smtp and javamail, and that display is properly set in the context area xml files.
Then run autoconfig. You need to do autoconfig in this order or it will not fix it: db then apps node1 then apps node2.
Troubleshooting:
If WorkFlow Mailer stops working for unknown reasons, bouncing the mailer usually fixes the problem. OAMà Workflow Mangerà Click on Notification Mailer à Then stop and start the Workflow Notification Mailer.