The Concurrent Processing Framework
Oracle EBS uses a concurrent processing framework to run background jobs like reports, imports, interfaces, and batch processes. Understanding how to submit, monitor, and troubleshoot concurrent programs programmatically is essential for EBS developers building custom integrations or automating workflows.
Submitting a Concurrent Request
DECLARE
l_request_id NUMBER;
BEGIN
FND_GLOBAL.APPS_INITIALIZE(1234, 50000, 222);
l_request_id := FND_REQUEST.SUBMIT_REQUEST(
application => 'AR', -- Application short name
program => 'RAXTRX', -- Program short name
description => 'Auto Invoice Import',
start_time => NULL, -- Run immediately
sub_request => FALSE,
argument1 => '204', -- Org ID
argument2 => 'BATCH_SOURCE_01', -- Batch source
argument3 => TO_CHAR(SYSDATE, 'YYYY/MM/DD HH24:MI:SS'),
argument4 => CHR(0) -- End of arguments marker
);
IF l_request_id = 0 THEN
DBMS_OUTPUT.PUT_LINE('Submit failed: ' || FND_MESSAGE.GET);
ELSE
COMMIT; -- Required to release the request to the manager
DBMS_OUTPUT.PUT_LINE('Request ID: ' || l_request_id);
END IF;
END;
The COMMIT after a successful submit is critical. Without it, the concurrent manager will never pick up the request because it reads committed data from FND_CONCURRENT_REQUESTS.
Monitoring Request Status
DECLARE
l_phase VARCHAR2(80);
l_status VARCHAR2(80);
l_dev_phase VARCHAR2(30);
l_dev_status VARCHAR2(30);
l_message VARCHAR2(2000);
l_complete BOOLEAN;
BEGIN
l_complete := FND_CONCURRENT.WAIT_FOR_REQUEST(
request_id => l_request_id,
interval => 10, -- Check every 10 seconds
max_wait => 600, -- Wait up to 10 minutes
phase => l_phase,
status => l_status,
dev_phase => l_dev_phase,
dev_status => l_dev_status,
message => l_message
);
IF l_dev_status = 'NORMAL' THEN
DBMS_OUTPUT.PUT_LINE('Completed successfully');
ELSE
DBMS_OUTPUT.PUT_LINE('Failed: ' || l_message);
END IF;
END;
Querying Request History
SELECT request_id, phase_code, status_code,
actual_start_date, actual_completion_date,
completion_text
FROM fnd_concurrent_requests
WHERE concurrent_program_id = (
SELECT concurrent_program_id FROM fnd_concurrent_programs
WHERE concurrent_program_name = 'RAXTRX')
ORDER BY request_id DESC
FETCH FIRST 10 ROWS ONLY;
Viewing Output and Log Files
Concurrent request output and log files are stored on the server filesystem. Query FND_CONCURRENT_REQUESTS.OUTFILE_NAME and LOGFILE_NAME to find the file paths. For custom concurrent programs, write output using FND_FILE.PUT_LINE(FND_FILE.OUTPUT, ...) and log messages using FND_FILE.PUT_LINE(FND_FILE.LOG, ...).