Wednesday, August 18, 2021

AF Variables and EBS Workflow Mailer with Cloud mail server

In EBS context file there are below 3 AF variables, 

  1. AF_JRE_TOP
  2. AF_CLASSPATH
  3. AFJVAPRG.

If these variables are not set correctly then resolve it by following below steps that is referenced in note ,

1. Check how the Concurrent Manager sees your environment variables while running a concurrent program

- Log into Applications as the System Administrator
- Navigate: Request -> Run
- Choose Single Request
- Choose "Prints Environments Variables" concurrent request
- Enter AF_CLASSPATH, AF_JRE_TOP, AFJVAPRG
- Submit program

2. Make the following change on your TEST system
- Backup your adovars.env file
- Update AF_CLASSPATH, AF_JRE_TOP, AFJVAPRG in your adovars.env using the full paths
- Bounce the Concurrent Managers
- Run the "Prints Environment Variables" Concurrent request to check the values
- Test a Java Concurrent Program.

AF variables are set for letting programs know the location of java (AFJVAPRG), JRE (AF_JRE_TOP) and the classpath (AF_CLASSPATH) on the concurrent node.
Also, note that these variables are also set on the web node.

==>Query to get the workflow notification mailer logfile to troubleshoot issues.

select fl.meaning,fcp.process_status_code,
decode(fcq.concurrent_queue_name,'WFMLRSVC','mailer container','WFALSNRSVC','listener container',fcq.concurrent_queue_name) "CONTAINER",
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','WFALSNRSVC')
order by fcp.logfile_name;

fl.meaning,fcp.process_status_code,"CONTAINER",fcp.concurrent_process_id,os_process_id, fcp.logfile_name

Active      A                  listener containere           393796        31902        /u01/fs_ne/inst/TEST_server1/logs/appl/conc/log/FNDCPGSC393796.txt

Active      A                  mailer container              393797        31908        /u01/fs_ne/inst/TEST_server1/logs/appl/conc/log/FNDCPGSC393797.txt

AFJVAPRG - The location of the JDK or JRE executable for the concurrent processing tier.
AF_CLASSPATH - The classpath for the concurrent processing tier.
The AF_CLASSPATH variable is used by JAVA concurrent programs and must use literal (full) path values.

==>>Verify Oracle Workflow Java Mailer connection with IMAP Server,

AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=smtp -Ddbcfile=$FND_SECURE/$TWO_TASK.dbc -Dserver=<literal name of SMTP Server> -Dport=587 -Dsecurity=TLS -Dtruststore=$AF_JRE_TOP/lib/security/cacerts -Daccount=<username> -Dpassword=<password> -Dconnect_timeout=120 -Ddebug=Y -Dlogfile=SMTPTLSTest.log oracle.apps.fnd.wf.mailer.Mailer

Oracle EBS Workflow Notification Mailer with Cloud E-Mail Servers
Configuring an Oracle Workflow Notification Mailer with Cloud E-Mail Servers (Doc ID 2077434.1)

Query to get the workflow notification mailer logfile to troubleshoot issues.

select fl.meaning,fcp.process_status_code,
decode(fcq.concurrent_queue_name,'WFMLRSVC','mailer container','WFALSNRSVC','listener container',fcq.concurrent_queue_name) "CONTAINER",
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','WFALSNRSVC')
order by fcp.logfile_name;


Inbound Connection Setup

$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Ddbcfile=$FND_SECURE/DEV.dbc -Dserver=mail.test.lk -Dport=143 -Dsecurity=STARTTLS -Dtruststore=$AF_JRE_TOP/lib/security/cacerts -Daccount=oracle@mail.lk -Dpassword=pass -Dconnect_timeout=120 -Djavax.net.debug=all -Ddebug=Y -Dlogfile=/tmp/imap1.log -DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer > /tmp/imap2.log 2>&1


$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Ddbcfile=$FND_SECURE/DEV.dbc -Dserver=mail.test.lk -Dport=143 -Dsecurity=SSL -Dtruststore=$AF_JRE_TOP/lib/security/cacerts -Daccount=oracle@mail.lk -Dpassword=pass -Dconnect_timeout=120 -Djavax.net.debug=all -Ddebug=Y -Dlogfile=/tmp/imap3.log -DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer > /tmp/imap4.log 2>&1


$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Ddbcfile=$FND_SECURE/DEV.dbc -Dserver=mail.test.lk -Dport=993 -Dsecurity=STARTTLS -Dtruststore=$AF_JRE_TOP/lib/security/cacerts -Daccount=oracle@mail.lk -Dpassword=pass -Dconnect_timeout=120 -Djavax.net.debug=all -Ddebug=Y -Dlogfile=/tmp/imap5.log -DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer > /tmp/imap6.log 2>&1


$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Ddbcfile=$FND_SECURE/DEV.dbc -Dserver=mail.test.lk -Dport=993 -Dsecurity=SSL -Dtruststore=$AF_JRE_TOP/lib/security/cacerts -Daccount=oracle@mail.lk -Dpassword=pass -Dconnect_timeout=120 -Djavax.net.debug=all -Ddebug=Y -Dlogfile=/tmp/imap7.log -DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer > /tmp/imap8.log 2>&1