Creating a background process with apex_plsql_job

APEX supports running background processes. This can be useful, for example, when you want to postpone all reports printing to evening hours or you want to e-mail some information to a large number of e-mail addresses. After submitting the job, the user can continue working with the application and is able to monitor the job. This recipe will show you how to submit a background process. We will create a button on a report page which shows an overview of all upcoming events. When the user clicks the button, a background process is submitted which starts a procedure that sends the overview to a number of e-mail addresses.

Getting ready

Make sure you have a report of all upcoming events. If you don't have it, create one:

  1. In the application builder, click the Create page button.
  2. Click Report.
  3. Click Classic report.
  4. Enter a page number or a page name. Click Next.
  5. Select Do not use tabs and click Next.
  6. Enter the following query:
    select id
    , title
    , date_published
    , text
    from app_news;
    

    [1346_07_14.txt]

  7. Click Next.
  8. Click Next.
  9. Click Finish. The report is ready now and you can choose to run it or edit it.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.96.105