Monday 10 April 2017

Steps to start/stop Workflow Notification Mailer

Step 1. Check workflow mailer service current status 

select running_processes  
from fnd_concurrent_queues    
where concurrent_queue_name = 'WFMLRSVC';

 Please Note : Number of running processes should be greater than 0

Step 2. Find current mailer status 

              To check the status of notification mailer, we need to do the following.

select component_status     
from fnd_svc_components   
 where component_id =  (select component_id            
from fnd_svc_components
where component_name = 'Workflow Notification Mailer');
  
Possible values are :
  RUNNING
  STARTING
  STOPPED_ERROR
  DEACTIVATED_USER
  DEACTIVATED_SYSTEM

Step 3. Stop notification mailer 

To stop notification mailer , we need to execute the following. 

  declare        p_retcode number;
       p_errbuf varchar2(100);
       m_mailerid fnd_svc_components.component_id%TYPE;   
begin
       -- Find mailer Id
------------------------------
select component_id  
into m_mailerid          
from fnd_svc_components         
where component_name = 'Workflow Notification Mailer';

-- Stop Mailer
------------------------
fnd_svc_component.stop_component(m_mailerid, p_retcode, p_errbuf);        
commit;
end;
/

Step 4. Start notification mailer 

To start notification mailer, we need to execute the following. 

 declare        p_retcode number;
       p_errbuf varchar2(100);
       m_mailerid fnd_svc_components.component_id%TYPE;   begin
       -- Find mailer Id
       -----------------
select component_id         
 into m_mailerid          
from fnd_svc_components
where component_name = 'Workflow Notification Mailer';
       --------------        -- Start Mailer
       -----------------
       fnd_svc_component.start_component(m_mailerid, p_retcode, p_errbuf);       
commit;
  end;
/

No comments:

Post a Comment