The Background Engine is a PL/SQL procedure. The Background Engine checks for and executes any deferred or timed out activities that satisfy the arguments of the procedure at the time the procedure is invoked. If new activities are deferred or timed out after the initiation of the current Background Engine, the procedure will check one more time for any new activities to execute prior to ending. The procedure ends once all matching activities are executed.

2. How the Background Engine is called?

Following is the Background Engine API which takes the mentioned parameters. WF_ENGINE.BACKGROUND( itemtype in varchar2,

minthreshold in number default null,

maxthreshold in number default null,

process_deferred in boolean default TRUE,

process_timeout in boolean default TRUE)

3. How to Run the Background Engine from Oracle Applications?

Submit the Workflow Background Process Concurrent Program through

Navigate > Sysadmin > Request > Run

Item Type – Select the appropriate Item Type (say PO Approval)

Min and Max tershould – (specify 0 to 100 or you can leave it blank)

Defered = Yes (so that all defered activities are processed)

Timed out=Yes (so that all timedout activities are processed)

4. How to Run the Background Engine from SQL*Plus?

From SQL Prompt run the following command

SQL> EXEC WF_ENGINE.BACKGROUND

or from unix prompt

$ $FND_TOP/Admin/Sql/wfbkg.sql

5. Why run the Background Engine?

WF Engine does not handle all the activities. For the reasons like Timed Out, Defered or sometimes errored activities will be forwared to Workflow Background Engine. If that time the Workflow Background is not running then these process will be stuck in process only. Unless you start the Background these will not be processed. Even if you start the background engine with Defered = No and Timedout = No then also these will not be processed.

6. Is it necessary to schedule the Background Engine?

In continuation to the above answer to to the Question 5, Workflow Background Engine will process the activities only which are forwarded by the Workflow Engine for reasons like timed out, defered etc. Once these activities are processed, the Workflow Background Engine goes down. You need to start the Workflow Background Engine again for any new activities which are forwarded. Therefore, it is usually recommended to schedule the Workflow Background Engine periodically especially for the Item Types such as PO Approval etc..

Follow me on Twitter

Shivmohan Purohit - A Learner by Heart and ERP Professional by Work. Contribution to success of my organization and people around. Learning new things everyday.
Belongs to family, being a son, brother, a husband and a father of a joyful son. Looking to Collaborate with people around the work.
Looking forward to connect and learn with you