Submit Workflow Background Engine from backend

The Background Engine is a PLSQL Procedure that checks and executes any deferred or timed-out activities in the workflow system. 

If new activities are deferred or timed out after the current Background Engine is started, the procedure will check one more time for any new activities to execute before terminating. When all matching activities have been completed, the procedure comes to end. It can be run as a Concurrent program or as a package or SQLPLUS command.

Run Workflow Background Process from Unix

SQL script placed in $APPL_TOP which can be used to run How to run Workflow Background Process from Unix

$FND_TOP/Admin/Sql/wfbkg.sql
      cat workflow_background.sh
      sqlplus apps/<apps pass> << EOF
      @$FND_TOP/Admin/Sql/wfbkg.sql
     exit
     EOF


Run Workflow Background Process from SQL*Plus

BEGIN
wf_engine.background (itemtype=>NULL ,
process_deferred=>TRUE ,
minthreshold=>NULL ,
maxthreshold=>NULL ,
process_timeout=>FALSE ,
process_stuck=>FALSE);
END;
/
Or
exec wf_engine.background;

Submit workflow background process from backend

DECLARE

l_user_name VARCHAR2(240) := 'SYSADMIN';
l_resp_name VARCHAR2(240) := 'System Administrator';

l_user_id       NUMBER;
l_resp_id       NUMBER;
l_resp_appl_id  NUMBER;

l_request_id NUMBER;
BEGIN
-- Apps Initialization
   SELECT    user_id
    INTO l_user_id
   FROM fnd_user
   WHERE user_name =l_user_name;

   SELECT  b.RESPONSIBILITY_ID,b.APPLICATION_ID 
    FROM fnd_responsibility_tl tl, fnd_responsibility b
    WHERE tl.responsibility_name = 'System Administrator'
      AND LANGUAGE=UserEnv('LANG')
      AND tl.RESPONSIBILITY_ID=b.RESPONSIBILITY_ID;

  fnd_global.apps_initialize
    ( user_id => l_user_id
     ,resp_id => l_resp_id
     ,resp_appl_id => l_resp_appl_id
    );
--
l_request_id := FND_request.submit_request(application => 'FND',
                           program     => 'FNDWFBG',   
                           description =>  NULL,
                        start_time  => '2022/10/26 00:00:00',
                        sub_request =>  FALSE,
                           argument1  =>  null, 
                           argument2  =>   null, 
                           argument3  =>  NULL, 
                           argument4  =>   'Y' , 
                           argument5  =>   'N', 
                           argument6  =>   NULL
                           );

                           IF l_request_id> 0 THEN
                            Dbms_Output.put_line(l_request_id);
                            commit;
                           END IF;

END;
/

Schedule periodic workflow background process concurrent program through frontend.

 


Comments

Popular posts from this blog

How to drop index and before dropping it how to get the DDL.

PRVG-11250 : The check "RPM Package Manager database" was not performed because

ORA-00257:archiver error, connect internal only until freed

Verifying Daemon “Avahi-Daemon” Not Configured And Running …FAILED (PRVG-1360)

Linux OL7/RHEL7: PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm

SKIP DNS RESLOV.CONF CHECK DURING RAC CONFIGURATION

CPU Patch Analysis

How to write to a CSV file using Oracle SQL*Plus

How to troubleshoot Long Running Concurrent Request in EBS 12.2

How To Manage Space of The FRA in the Oracle DB