Background Process in APEX
567066Nov 22 2010 — edited Dec 17 2010Hi All,
I have the below code in the after submit process in one of the APEX page/screen and trying to run the below process in background , after submitting the process it comes back to the page immediately ( which is what I wanted) and launch the program code to run the program in back ground, but looks like its not doing the background process. ( not able to see any records populated into the custom table I use). Please advise whether I am missing anything or any changes are required on teh below program code.
Below is the code I am currently using. When I try to run the process without any background submission , it takes around 20-30 minutes, and give the expected results and workd just fine. please give your expert advice on this when time permits..
Thanks
Sheik
DECLARE
l_sql long;
l_job number;
l_return Varchar2(32767) ;
l_messages dbms_output.chararr;
l_numlines integer := 1000000;
Begin
l_sql := 'BEGIN
MEDDEV.DSD_MED_FIN_MAC_EXTRACT.MAIN(
P_PERIOD_ID => :P778_PERIOD_ID,
P_OVERRIDE => :P778_OVERRIDE,
P_RESULT => :P778_RESULT);
END;';
dbms_scheduler.create_job
(job_name => 'APEXEDIT',
job_type => 'PLSQL_BLOCK',
job_action => l_sql,
enabled => true);
l_job := APEX_PLSQL_JOB.SUBMIT_PROCESS(
p_sql => l_sql,
p_status => 'Background process submitted'
);
END;