Oracle Workflow

Topics of Discussion
• • • • • Overview Components of workflow Notification Mailer Processing Setup of workflow Troubleshooting

Overview of workflow
Oracle Workflow delivers a complete workflow management system that supports business process based integration. It helps achieving following tasks:  Routing information
provides each person with all the information they need to act on

 Defining and modifying business rules

lets you define and continuously improve business processes using process designer. allows use of java and plsql to express any business rule that affects a workflow process

Overview of workflow contd.
 Delivering electronic notifications
lets people receive notifications of items awaiting their attention via e–mail, and act based on their e–mail responses

 Integrating systems
Workflow lets you set up subscriptions to business events which can launch workflows or enable messages to be propagated from one system to another when business events occur.

Components of workflow
o o o o Service Containers Agent Listeners/Service Components Background engine Workflow Directory Service

Components of workflow
o Workflow Directory Service
Required by oracle workflow to retrieve information about users and roles who may utilize workflow functionality and receive email notifications. Information retrieved from following views: WF_USERS, WF_ROLES and WF_USER_ROLES Views based on following tables: WF_LOCAL_ROLES, WF_LOCAL_USER_ROLES Bulk Synchronization needed to synch up data in the wf local tables, with other application table’s data

Components of workflow
o Background Engine
Used to run deferred,timed out and stuck activities. Activities in a workflow process are marked as deferred if their cost exceeds 50 (by default). Is an API - WF_ENGINE.BACKGROUND Scheduled to run as a concurrent program

o Service Containers
Required to run the agents or service components Three types of service component containers:: Workflow Agent Listener Service Workflow Mailer Service Workflow Document Web Services Service Defined as concurrent managers

Components of workflow
o Service Components
Workflow Deferred Agent Listener , runs on wf_deferred agent Workflow Error Agent Listener, runs on wf_error agent Workflow Java Deferred Agent Listener , runs on

wf_java_deferred agent
Workflow Inbound Notifications Agent Listener, runs on

wf_notification_in agent
Workflow Mailer Service note: each agent has its own queue and queue table

Components of workflow
What is an Agent ? - named point of communication within a system - communication within a system is achieved by sending messages between agents - different agents for inbound,outbound communications - oracle workflow provides default standard agents which are :
WF_CONTROL – Oracle Workflow internal agent, not for customer use WF_DEFERRED – Standard agent for deferred subscription processing WF_ERROR – Standard agent for error handling WF_IN – Default inbound agent WF_JMS_IN – Default inbound agent for JMS Text messages WF_JMS_OUT – Default outbound agent for JMS Text messages WF_NOTIFICATION_IN – Standard inbound agent for e–mail notification responses WF_NOTIFICATION_OUT – Standard outbound agent for e–mail notifications WF_OUT – Default outbound agent

Components of workflow
Business Event System ? - uses AQ to communicate events between systems - consists of event manager and workflow process event activity - event manager contains registry of business events,systems,named agents within those systems, and subscriptions to those events indicating those events are significant to the system. - when an event occurs the subscribing code is executed. - subscriptions can include following types of processing: executing custom code on the event information sending event information to a workflow process sending event information to other queues or systems

Notification Mailer Processing

Outbound Notification Mailer Processing

Notification Mailer Processing

Inbound Notification Mailer Processing

Setting up Workflow
o Background Engine
Conc. Program ‘Workflow Background Process’ Parameters: item type -set it null minimum threshold- min. cost ,set it null, default 0 maximim threshold- max. cost, set it null, default 100 process deferred - yes/no process timeout - yes/no process stuck -yes/no Schedule to run every 3 mins Schedule diff background engines for deferred and timed out activities

Setting up Workflow
o Workflow Mailer
SMTP server needed for outbound messages IMAP4 compliant server needed for inbound messages E-mail account needed on IMAP server WF-<ENV_NAME> is the convention followed Create PROCESS and DISCARD folder Env. variables: AF_JRE_TOP=/local/java/jdk1.3.1 AFJVAPRG=/local/java/jdk1.3.1/bin/java AF_CLASSPATH=/local/java/jdk1.3.1/lib/dt.jar:/local/java/jdk1.3.1/lib/t ools.jar:/slot02/appmgr/plmb9rwcomn/java/appsborg2.zip ………..

Setting up Workflow
Configure WF Mailer through OAM-

login as sysadmin workflow managerworkflow maileredit enter inbound server name,username,outbound server name, reply-to address. check on ‘launch summary notifications’ if it is required

Ensure that job_queue_process<=10 and aq_tm_process>=1

Workflow Mailer Contd…

Setting up Workflow
o Bulk Synchronization
Conc. Program with default parameters Schedule to occur after every n hrs

o Control Queue Cleanup
Conc. Program with default parameters Schedule to run daily Can cause lots of enqueue

TroubleShooting
? Notification mailer not coming up
- check if containers are running - check wfmailer log files (oam/quick cm) - if error is like outbound/inbound server unable to connect, then check the configuration of wfmailer. If its proper, then file bug against adevsrv. if error is something like this:
oracle.apps.fnd.cp.gsc.SvcComponentContainer.startBusinessEventListen er()] : BES system could not establish connection to the control queue after 180 seconds Could not start Service Component Container …

- check if wf control queue cleanup conc. Program is scheduled and runs successfully. check AF related env. variables try re-creating wf_control queue try to re-generate the jar files

TroubleShooting
- if error is ‘no containers are running’ try bouncing the CM - for other errors, search webiv

? Service Containers not coming up
if status is ‘target/node queue unavailable’ run
update fnd_concurrent_queues set node_name = (select node_name from fnd_concurrent_queues where concurrent_queue_name = 'FNDICM'), control_code = NULL where concurrent_queue_name like 'WF%' and enabled_flag = 'Y'

-

-

if ‘activated’ but actuals and targets are not matching, bounce the CM if bouncing doesn’t help, then stop CM, run cmclean and restart CM if status is ‘activating’ for a long time, check for errors in the wf log files and alert log. If no errors then, stop the CM and drop and recreate wf control queue and re-try.

TroubleShooting
? Agent listener not coming up
check the log files for any specific errors you may try running the command at sql prompt exec wf_event.listen (‘&agent_listener');

TroubleShooting
? Not receiving Email notifications - check if mailer is running
check whether email address and notification pref. for the user/role expecting email, by querying wf_roles view. If no email, then report to user.Also, ensure wf sycnh. conc. program runs periodically. you can get the details of a particular nid by running the file $FND_TOP/sql/wfmlrdbg.sql. check wfmailer log files for any specific error and search webiv. ensure that test address is set to null by checking wfmailer details in oam. run wfver.sql file and check the output file for any invalid queue or invalid pl/sql objects or improper setting of job_queue_process/aq_tm_process check whether events are being processed from wf_deferred queue by giving the foll query: SELECT msg_state, count(*) FROM applsys.aq$wf_deferred a WHERE a.user_data.event_name like 'oracle.apps.wf.notification.%' GROUP BY msg_state;

-

TroubleShooting
? Not receiving Email notifications
if events are not being processed from wf_deferred queue, then probably it needs to be recreated. check wf_notification_out queue SELECT msg_state, count(*) FROM applsys.aq$wf_notification_out GROUP BY msg_state; for logging bug: 174 product, jmailer component

-

-

? Not receiving System notifications
check if background engine is scheduled and if it runs successfully. run $fnd_top/sql/wfbkgchk.sql to see if events are being queued in wf_deferred queue. it might be required to run ‘wfbkgbld.sql applsys’ to rebuild background queue also, check if issue is user/role specific

TroubleShooting
? Events not being processed from WF_JAVA_DEFERRED queue
check the job_queue_process and aq_tm_processes init para. bounce the service containers check if the queue is valid (wfver.sql) try recreating the queue

? Not receiving Summary Notifications - check in OAM if it has been scheduled. - Check if job_queue_process is set - Check in dba_jobs

Administrative Scripts
 To verify workflow setup
run $fnd_top/sql/wfver.sql

 To check notification details
run fnd_top/sql/wfmlrdbg.sql copy the output to /edwdev/local/website/download eg : http://ap301sun.us.oracle.com:8000/download/wfmlrdbg40739.htm l

 To drop queues

and

recreate

wf_control/wf_notifiaction/wf_jms

ensure CM is down exec dbms_aqadm.drop_queue_table(queue_table=> 'APPLSYS.WF_CONTROL', force => TRUE); sqlplus -s apps/apps @$fnd_top/patch/115/sql/wfjmsqc2.sql APPLSYS <pwd> sqlplus apps/apps $FND_TOP/patch/115/sql/afwfqgnt.sql apps <pwd> applsys <pwd>

Administrative Scripts
 To create FND_CP_GSM_IPC_AQTBL
dbms_aqadm.drop_queue_table(queue_table=> 'APPLSYS.FND_CP_GSM_IPC_AQTBL', force => TRUE); sqlplus /nolog @$FND_TOP/patch/115/sql/aftcm049.sql APPLSYS APPS

 To create WF_DEFERRED queue
exec dbms_aqadm.drop_queue_table(queue_table => 'APPLSYS.WF_DEFERRED',force =>TRUE); sqlplus apps/<pwd> @wfevquc2.sql APPLSYS <pwd> WF_DEFERRED APPS 5 3600 86400 sqlplus apps/<pwd> @wfmqsubc.sql APPLSYS <pwd>

 To clean a particular queue
@$FND_TOP/sql/wfevqcln.sql WF_ERROR

Administrative Scripts
 To create WF_ERROR queue
exec dbms_aqadm.stop_queue( queue_name => 'WF_ERROR', wait => FALSE); exec dbms_aqadm.drop_queue(queue_name=> 'WF_ERROR'); exec dbms_aqadm.drop_queue_table( queue_table => 'WF_ERROR', force => TRUE); sqlplus apps/apps @$FND_TOP/patch/115/sql/wfevquec.sql APPLSYS <pwd> WF_ERROR APPS

 To update Service Component Parameters from backend
run $fnd_top/sql/afsvcpup.sql

 To check background engine activity
run $fnd_top/sql/wfbkgchk.sql

 To build background engine queue
run $fnd_top/sql/wfbkgbld.sql(requires cm and apache down)
• Purges the wf_notification_out outbound message queue and repopulates from the WF_NOTIFICATION table: sqlplus usr/passwd@db @wfntfqup APPSusr APPSpw FNDusr


Example Syntax: sqlplus apps/apps@db @wfntfqup apps apps applsys • This script will move the oracle.apps.wf.notificaiton.send messages from the WF_ERROR queue to the WF_DEFERRED queue for reprocessing. Substitute for Reset Failed in OWF G. sqlplus usr/passwd@db @wfnequ APPSusr APPSpw FNDusr

Sign up to vote on this title
UsefulNot useful