Home > Working with Application Pages > Editing a Page Definition > Understanding 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 Application Express 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.
Topics:
You create a process by running the Create Process Wizard. During the wizard, you define a process name, specify a sequence and the point at which the process will execute, and select a process category. You can change nearly all of these attributes on the Edit Page Process page.
Navigate to the appropriate Page Definition. See "Accessing a Page Definition".
Under Processes, click the Create icon.
Select a category. Table: Process Categories describes available page process categories.
Process Categories
Process Category | Description |
---|---|
Data Manipulation |
Data Manipulation process types are frequently used by wizards to support data manipulation language (DML) actions. Application Builder supports the following declarative data manipulation processes:
|
Close Popup Window |
Applies to processes running within a popup window. Upon execution, this process type closes the current popup window. |
Form Pagination |
Implements pagination through the detail records associated with a master detail form. Most often used in master detail forms (such as in the Master Detail Wizard), this process checks the master table to determine which set of detail records you are in and determines what the next detail record should be. See Also: "Creating a Master Detail Form" |
On Demand |
Creates an application-level process that can only be executed when called from a specific page. When you create this process type at the page-level, you are creating reference to an existing application-level process. See Also: "About On Demand Application Processes" |
PL/SQL |
Runs the PL/SQL you provide. Use this process type to execute a block of PL/SQL entered directly into the process or to simply call an existing API. |
Reset Pagination |
In Report regions, resets pagination back to the first result set. The Application Express engine keeps track of where the user is within a given result set. This process category returns the user to the beginning result set. In other words, this category resets the counters associated with the report region to return the first part of the result set the next time the result set displays. |
Session State |
Sets the values of existing session state items to null. Select this process type to clear the cache for applications, sessions, or items as well as to clear existing user preferences. See Also: "Managing Session State Values" and "Managing User Preferences" in Oracle Application Express Administration Guide |
Web Services |
Implements a Web Service as a process on a page. Running the process submits a request to the service provider. See Also: "Invoking a Web Service as a Process" |
Follow the on-screen instructions.
Once you create a process, you can control when the process executes and what the process does by editing attributes on the Edit Page Process page.
To edit an existing page process:
Navigate to the appropriate Page Definition. See "Accessing a Page Definition".
Select the process name.
The Edit Page Process page appears.
You control when a process executes by specifying a sequence number and a process point under Process Point. You can prevent a process from running during subsequent visits to a page by selecting one of the following options under Run Process:
Once for each page visit
Once for each session or when reset
Enter the appropriate code for PL/SQL process types. For PL/SQL anonymous block processes, enter the appropriate code under Process. For Clear Cache processes, enter the appropriate code under Source. In the event a process fails, you can optionally define an error message in the Process Error Message field.
You can make a process conditional by selecting a condition type and entering an expression under Conditional Processing.
Additionally, you can also make a selection from the When Button Pressed attribute. When you select a button from this list, the process only executes if a user clicks the selected button.