Thursday, 1 July 2021

Oracle Workflow Mailer: Download Office365 or Gmail certificate command

 

openssl s_client -connect outlook.office365.com:995 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > public.crt

keytool -import -alias outlook.office365.com -keystore $AF_JRE_TOP/lib/security/cacerts -file public.crt

keytool -list -keystore $AF_JRE_TOP/lib/security/cacerts


Test the mail connection:

$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Ddbcfile=$FND_SECURE/$TWO_TASK.dbc -Dserver=outlook.office365.com -Dport=993 -Dsecurity=TLS -Dtruststore=$AF_JRE_TOP/lib/security/cacerts -Daccount=xxxxx -Dpassword=xxxxx -Dfolder=Inbox -Dconnect_timeout=120 -Ddebug=Y -Dlogfile=IMAPSSLTest.log oracle.apps.fnd.wf.mailer.Mailer >>IMAPSSLTest.txt


Two files will be generated:
IMAPSSLTest.log
IMAPSSLTest.txt
--------------------------------------------------------

Mailer status has to be changed in order to start the mailer

update fnd_svc_components
set component_status = 'DEACTIVATED_SYSTEM'
where component_id = 10006

Then start the mailer from UI - Workflow Manager


------------------------------------------------------------------------------
Catch up current workflow mailer log file:
SELECT fcp.logfile_name
FROM fnd_concurrent_queues fcq, fnd_concurrent_processes fcp, fnd_lookups flkup
WHERE concurrent_queue_name in ('WFMLRSVC')
AND fcq.concurrent_queue_id = fcp.concurrent_queue_id
AND fcq.application_id = fcp.queue_application_id
AND flkup.lookup_code=fcp.process_status_code
AND lookup_type ='CP_PROCESS_STATUS_CODE'
AND meaning='Active';

----------------------------------------------------------------------------------------

Change parameters from backend:

 sqlplus apps/apps @$FND_TOP/sql/afsvcpup.sql


--------------------------start wf from backend

DECLARE
   p_retcode    NUMBER;
   p_errbuf     VARCHAR2(100);
   m_mailerid   fnd_svc_components.component_id%TYPE;
BEGIN
SELECT component_id
INTO m_mailerid
FROM fnd_svc_components
WHERE component_name ='Workflow Notification Mailer';

   fnd_svc_component.start_component (m_mailerid,
                                      p_retcode,
                                      p_errbuf
                                     );
COMMIT;
END;
/


--------------------------STOP wf from backend

DECLARE
   p_retcode    NUMBER;
   p_errbuf     VARCHAR2(100);
   m_mailerid   fnd_svc_components.component_id%TYPE;
BEGIN
SELECT component_id
INTO m_mailerid
FROM fnd_svc_components
WHERE component_name ='Workflow Notification Mailer';

   fnd_svc_component.stop_component (m_mailerid,
                                     p_retcode,
                                     p_errbuf
                                    );
COMMIT;
END;
/




------------------------- Find current mailer status

SELECT component_status
  FROM fnd_svc_components
 WHERE component_id =(SELECT component_id
                        FROM fnd_svc_components
                       WHERE component_name ='Workflow Notification Mailer');



   RUNNING 
   STARTING 
   STOPPED_ERROR 
   DEACTIVATED_USER 
   DEACTIVATED_SYSTEM 



No comments:

Post a Comment

Number of Visitors