15.3 Understanding Page Processes

Create page processes to perform an action at a specified point during the rendering or submission of the page.

15.3.1 About Page Processes

A page process performs an action at a specified point during the rendering or submission of the page.

For example, you can create a page process to execute logic or to make a call to the APEX engine. A page process is a unit of logic that runs when a specific event occurs, such as loading or submitting a page.

From a functional perspective, there is no difference between page-level and application-level processes. The difference between these two process types is where the process is defined, that is at the page-level or at the application level.

You create a page process in Page Designer. In either the Rendering or Processing tab, locate the node where the process will occur, right-click, and select Create Process. The process Type determines what attributes you need to configure.

Supported Process Types

Note:

Depending on your application configuration, you may also have additional process type plug-ins. These display as <My Plug-in> [Plug-in].

Supported page process Types include:

  • Clear Session State - Process to clear session state stored within Oracle APEX.
  • Close Dialog - Process to close the current modal or non-modal dialog page.
  • Data Loading - Process to load data into the target table or collection based on the given data load definition.
  • Execute Code - Process to execute PL/SQL code.
  • Form - Automatic Row Processing (DML) - Process to insert, update, or delete a form region row(s).
  • Form - Initialization - Process to initialize form region items. Initialization can either be fetching data from the region source, using the primary key value(s) or simple initialization of the form region items. Human Task - Create - Process to create a human task, using an existing task definition from the application.
  • Human Task - Manage - Process to manage a human task. The different types of task management are Approve, Reject, Claim, Release, Delegate, Forward, Cancel, Comment and Invite Participant.
  • Interactive Grid - Automatic Row Processing (DML) - Process to insert, update, or delete Interactive Grid rows.
  • Invoke API - Process to invoke a procedure or function stored in the local database.
  • Reset Pagination - Process to reset pagination of reports on the current page.
  • Send E-Mail - Process to send an email, and optionally one or more attachments, from the application.
  • User Preferences - Process to set User Preferences for the end user.
  • Web Service - Process to consume the specified Web service.

15.3.2 Creating Page Processes

Create a page process in Page Designer.

To create a page process:

  1. View the page in Page Designer.
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.

      Page Designer appears.

  2. In either the Rendering or Processing tab, locate the node where the process will occur. Right-click and select Create Process.
  3. Page Designer indicates what to do next. If there is an error, the Show Messages icon displays in the Page Developer toolbar.
    1. Click the Show Messages icon on the Page Designer toolbar.
      The Messages dialog displays errors that must be addressed.
    2. Select an error to highlight the associated attribute in the Property Editor.

      To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the central pane.

  4. Identification, Name - Enter the name of the process for easy identification by developers.
  5. Identification, Type - Specify which process type to execute. The Type you select determines what attributes display next.

    Consider the following examples.

    • If Type is Execute Code:
      • Identification, Type - Select Execute Code.
      • Source, Location - Select where the process executes. Select either Local Database or REST Enabled SQL.
      • Source, Language - Select the language used to execute the entered code.
      • Source, PL/SQL - Enter the PL/SQL code to be executed..
    • If Type is Invoke API:
      • Identification, Type - Select Invoke API.
      • Settings, Type - Select what process executes. Options include PL/SQL Package or PL/SQL Procedure or Function.
      • Settings, Package - Enter the case-sensitive PL/SQL package name. You can type in the name or pick from the list.
      • Settings, Procedure or Function - Enter the case-sensitive procedure or function name defined in the selected PL/SQL package. You can type in the name or pick from the list.
  6. Under Execution :
    1. Execution, Sequence - Specify the sequence for this computation. The sequence determines the order of execution.

      If two components have the same sequence value, then they may be executed in a different order when the application is exported and imported into another environment.

    2. Execution, Point - Select the point at which this process is executed.
    3. Execution, Run Process - Select the frequency that this process executes.
  7. Under Success Message:
    • Success Message, Success Message - Enter the success message for this process.

      If the process runs and does not generate an error, then this process success message displays in the notification section of the resulting page displayed. If you are branching to another page using a URL redirect, you may need to check the preserve success message attribute.

      To learn more, select the attribute in the Property Editor and click the Help tab in the central pane.

  8. Under Error:
    1. Error, Error Message - Enter the error message for this process.

      This message displays if an unhandled exception is raised. After any error processing stops, a rollback is issued and an error message displays.

    2. Error, Display Location - Select where this process error message displays, when the process fails to complete successfully.
  9. Click Save.

15.3.3 Editing Page Process Attributes

Edit a page process in Page Designer.

To edit an existing page process:

  1. View the page in Page Designer.
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.

      Page Designer appears.

  2. Click the Processing tab in the left pane.
  3. In either the Rendering or Processing tab, expand the nodes to locate and select the process.

    Process attributes display in the Property Editor. Attributes are organized in groups.

    To find a group or attribute, enter keywords in the Filter Properties field. The Property Editor displays the group or attributes. Or, you can click Go to Group and select the group.

  4. Edit the appropriate attributes:

    Tip:

    To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the central pane.

  5. Click Save.

15.3.4 Controlling When a Page Process Executes

Control when a process executes by editing the Sequence and Point attributes.

To control when a process executes, edit the Sequence and Point attributes:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Click the Processing tab in the left pane.
  3. In either the Rendering or Processing tab, expand the nodes to locate and select the process.

    Process attributes display in the Property Editor. Attributes are organized in groups.

  4. Under Execution :
    1. Execution, Sequence - Specify the sequence for this computation. The sequence determines the order of execution.

      If two components have the same sequence value, then they may be executed in a different order when the application is exported and imported into another environment.

    2. Execution, Point - Select the point at which this process is executed.
    3. Execution, Run Process - Select the frequency that this process executes.
  5. Click Save.

15.3.5 Creating Page Process Success and Error Messages

Define both success and error messages that display when a process runs.

You can define both success and error messages that display when a process runs. How an error message displays depends upon the processing point. For processes with a processing point of On Submit - Before Computation and Validations or On Submit - After Computations and Validations, you can specify whether the error message displays inline on the current page (the default) or on a separate page. For all other page processes, error messages display on a separate error page.

To create a page process error or success message:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Click the Processing tab in the left pane.
  3. In either the Rendering or Processing tab, expand the nodes to locate and select the process.

    Process attributes display in the Property Editor. Attributes are organized in groups.

  4. Under Success Message:
    • Success Message, Success Message - Enter the success message for this process.

      If the process runs and does not generate an error, then this process success message displays in the notification section of the resulting page displayed. If you are branching to another page using a URL redirect, you may need to check the preserve success message attribute.

      To learn more, select the attribute and click the Help tab in the central pane.

  5. Under Error:
    1. Error, Error Message - Enter the error message for this process. This message displays if an unhandled exception is raised. After any error processing stops, a rollback is issued and an error message displays.
    2. Error, Display Location - Select where this process error message displays, when the process fails to complete successfully.

      Option include:

      • Inline in Notification - The process error message displays in the Notification area (defined as part of the page template).
      • On Error Page - Error displays on a separate error page.
  6. Click Save.

See Also:

Page Templates

15.3.6 Making a Page Process Conditional

Create a conditional page process by editing Server-side Condition attributes.

To create a conditional page process:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Click the Processing tab in the left pane.
  3. In either the Rendering or Processing tab, expand the nodes to locate and select the process.

    Process attributes display in the Property Editor. Attributes are organized in groups.

  4. Under Server-side Condition:
    1. Server-side Condition, When Button Pressed - If you want this page processing component to execute only when the specified button is clicked, select a button from the list. You can incorporate this button condition with other conditions to further refine when this page processing component executes.
    2. Server-side Condition, Execution Type - Select a condition type that must be met in order for this component to be rendered or processed:

      To learn more, select the attribute in the Property Editor and click the Help tab in the central pane.

  5. Click Save.