Workflow Background Process in Oracle Apps

Workflow Background Process is a concurrent program which is run for processing deferred activities, timed out activities, and stuck processes using the parameters specified. The background engine executes all activities that satisfy the given arguments at the time that the background engine is invoked. This procedure does not remain running long term, so you must restart this procedure periodically. Any activities that are newly deferred or timed out or processes that become stuck after the current background engine starts are processed by the next background engine that is invoked.

Workflow Background Process is run with the help of Workflow Background Engine which is PL/SQL Procedure which runs this concurrent program with specified parameters.




Workflow Background Process Parameters:

  • Item Type – Specify an item type to restrict this engine to activities associated with that item type. If you do not specify an item type, the engine processes any activity regardless of its item type.
  • Minimum Threshold – Specify the minimum cost that an activity must have for this background engine to execute it, in hundredths of a second.
  • Maximum Threshold – Specify the maximum cost that an activity can have for this background engine to execute it, in hundredths of a second. By using Minimum Threshold and Maximum Threshold you can create multiple background engines to handle very specific types of activities. The default values for these arguments are null so that the background engine runs activities regardless of cost.
  • Process Deferred – Specify whether this background engine checks for deferred activities. Setting this parameter to Yes allows the engine to check for deferred activities.
  • Process Timeout – Specify whether this background engine checks for activities that have timed out. Setting this parameter to Yes allows the engine to check for timed out activities.
  • Process Stuck – Specify whether this background engine checks for stuck processes. Setting this parameter to Yes allows the engine to check for stuck processes.
Note: Make sure you have a least one background engine that can check for timed out activities, one that can process deferred activities, and one that can handle stuck processes. At a minimum, you need to set up one background engine that can handle both timed out and deferred activities as well as stuck processes.


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


DECLARE
   l_responsibility_id   NUMBER;
   l_application_id      NUMBER;
   l_user_id             NUMBER;
   l_request_id          NUMBER;
BEGIN
   --
   SELECT DISTINCT fr.responsibility_id, frx.application_id
     INTO l_responsibility_id, l_application_id
     FROM apps.fnd_responsibility frx, apps.fnd_responsibility_tl fr
    WHERE     fr.responsibility_id = frx.responsibility_id
          AND LOWER (fr.responsibility_name) LIKE LOWER ('OM SuperUser, Comm');

   --
   SELECT user_id
     INTO l_user_id
     FROM fnd_user
    WHERE user_name = 'XXXXX';

   --
   --To set environment context.
   --
   apps.fnd_global.apps_initialize (l_user_id,
                                    l_responsibility_id,
                                    l_application_id);
   --
   --Submitting Concurrent Request
   --
   l_request_id := fnd_request.submit_request (application => 'FND',
                        program          => 'FNDWFBG',
                        description      => NULL,
                        start_time       => NULL,
                        sub_request      => FALSE,
                        argument1        => 'OEOH', --Item Type
                        argument2        => NULL,   --Minimum Threshold
                        argument3        => NULL,   --Maximum Threshold
                        argument4        => 'Y' ,   --Process Deferred
                        argument5        => 'N',    --Process Timeout
                        argument6        => NULL    --Process Stuck
                    );
  
  
  COMMIT;
  
  IF l_request_id = 0
  THEN
     dbms_output.put_line ('Concurrent request failed to submit');
  ELSE
     dbms_output.put_line('Successfully Submitted the Concurrent Request: '||l_request_id);
  END IF;
  
EXCEPTION
WHEN OTHERS THEN
  dbms_output.put_line('Error While Submitting Concurrent Request '||TO_CHAR(SQLCODE)||'-'||sqlerrm);
END;
/

Comments

All Categories

Call Fusion BIP Report2 Change Password1 Code Combinations2 Compute Instance2 CTE1 Customer1 Data Aggregation2 Database5 Date Conversion1 DB Adapter2 Decryption1 Development1 EBS4 Encryption1 ESS Jobs3 Examine1 FBDI3 Fusion APIs1 Fusion BIP7 GIT2 GL3 GL Journals1 GL_DAILY_CONVERSION_TYPES1 GL_DAILY_RATES1 ICS1 Identity Domain1 Integrations1 Java1 Journal Import1 Keys1 Legal Entity1 LookupTypeLOV1 LOV1 LOVs1 MultiPartAPIs1 Networking1 NVL2 NVL in OIC2 OCI11 OCI Billing1 OCI Compute5 OCI Cost Management1 OCI Events Service1 OCI Free Tier3 OCI Notifification Service1 OCI Security3 OIC4 OIC Mapper2 Oracle26 Oracle ADF17 Oracle APEX1 Oracle Apps59 Oracle Apps R126 Oracle ATP1 Oracle BIP8 Oracle Cloud12 Oracle Cloud Free Tier1 Oracle cloud Infrastructure9 Oracle Cloud Security2 Oracle Cloud VM1 Oracle DB4 oracle ebs5 Oracle ERP4 Oracle ERP Adapter2 Oracle ERP Cloud7 Oracle financials2 Oracle Forms1 Oracle Fusion57 Oracle Fusion BIP4 Oracle Fusion ERP17 Oracle Fusion Financials18 Oracle Integration Cloud3 Oracle OAF17 Oracle OCI14 Oracle OIC22 Oracle SOA 12c10 Oracle SQL17 Oracle VBCS1 Oracle VBS2 Oracle Visual Builder Cloud Service1 Oracle Visual Builder Studio2 Oracle Workflow Notifications1 Others10 Payables2 Payables Import1 Properties1 R121 Register BIP as ESS Job1 Reset Password1 Responsibility1 REST4 Security List1 Site Map1 SOAP2 SOAP API2 SOAP UI3 SQL16 SQL Functions3 SQL Queries14 SQL Query8 SQL Tips3 SSH1 TCA1 Value Sets1 VBCS1 Virtual Machine2 Virtual Machines1 XML1 XSLT1
Show more