Below command will give you the debug log for SMTP Network Connections for Workflow mailer
in Oracle Apps
(please substitute the values as per your environment in the below comand)
$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=smtp \
-Ddbcfile=$FND_SECURE/PROD.dbc \
-Dport=25 -Dssl=Y \
-Dtruststore=/home/applprod/.keystore \
-Dserver=mail.oscdubai.com \
-Daccount=xyz@gmail.com -Dpassword=pasword \
-Dconnect_timeout=120 -Ddebug=Y \
-DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer
Below command will give you the debug log for IMAP Network Connections for Workflow mailer in Oracle Apps
$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap \
-Ddbcfile=$FND_SECURE/PROD.dbc \
-Dport=25 -Dssl=Y \
-Dtruststore=/home/applprod/.keystore \
-Dserver=mail.oscdubai.com \
-Daccount=xyz@gmail.com -Dpassword=pasword \
-Dconnect_timeout=120 -Ddebug=Y \
-DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer
However to Debug the flow you can pick up a particular notification id in WF_NOTIFICATIONS table which is having issue and run the below sql located in $FND_TOP/sql
Workflow debugging scripts wfmlrdbg.sql and wfbesdbg.sql
Query to find the Workflow Log file location (R12.2.x)
=========================================
select fl.meaning,fcp.process_status_code,
decode(fcq.concurrent_queue_name,'WFMLRSVC','maile r container','WFALSNRSVC','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_lookups fl
where fcq.concurrent_queue_id=fcp.concurrent_queue_id and fcp.process_status_code='A'
and fl.lookup_type='CP_PROCESS_STATUS_CODE' and
fl.lookup_code=fcp.process_status_code
and concurrent_queue_name in('WFMLRSVC')
order by fcp.logfile_name;