Skip to main content

Usage

This section describes an example of implementation Progress bar Pro in an Oracle APEX application.

Example for basic PROCESS implementation

The initial state of a basic PROCESS progress bar in page designer is presented below.

Steps:

  1. Add Process »My Process«

    Example of PL/SQL Code:

    declare
    l_processname varchar2(128 char) := 'PROCESS_01';
    begin
    UC_PROGRESSBAR_PKG.start_process(p_process_name => l_processname,
    p_maxval => 100);
    for i in 1..20
    loop
    -- Pause for 0.5 second.
    UC_PROGRESSBAR_PKG.set_status(p_process_name => l_processname,
    p_value => i*5,
    p_process_text => 'completed');
    sys.DBMS_SESSION.sleep(0.5);
    end loop;

    UC_PROGRESSBAR_PKG.stop_process(p_process_name => l_processname);
    end;
  2. Add a Button to the region and create the dynamic action (event Click)

  3. Create a True Action of type UC – Progress Bar Pro [Plug-In]

  4. Under Attributes the following must be set:

    • Process / Job Name: PROCESS_01 (Name must be the same as in Process PL/SQL code and we also recommend  that the process and job name is always unique)

          l_processname varchar2(128 char) := 'PROCESS_01';

  5. Below is an example of the page after successfully setting up Progress Bar Pro:

Example for basic JOB implementation

The initial state of a basic JOB progress bar in page designer is presented below.

Steps:

  1. Add a Button to the region and create the dynamic action (event Click)

  2. Create a True Action of type Execute server-side Code

    Example Code:

    if not UC_PROGRESSBAR_PKG.is_running(p_process_name => 'J_UC_PROGRESSBAR_SAMPLEJOB_01')
    then
    dbms_scheduler.set_job_argument_value(job_name => 'J_UC_PROGRESSBAR_SAMPLEJOB_01',
    argument_position => 1,
    argument_value => 'J_UC_PROGRESSBAR_SAMPLEJOB_01');
    DBMS_SCHEDULER.RUN_JOB(
    JOB_NAME => 'J_UC_PROGRESSBAR_SAMPLEJOB_01',
    USE_CURRENT_SESSION => FALSE);
    end if;
  3. Create a True Action of type UC – Progress Bar Pro [Plug-In]

  4. Under Attributes the following must be set:

    1. Action : Show progress bar (JOB name)

    2. Process / Job Name : J_UC_PROGRESSBAR_SAMPLEJOB_01 (Name must be the same as in PL/SQL code and we also recommend  that the process and job name is always unique)

  5. Below is an example of the page after successfully setting up Progress Bar Pro: