Debugging a legacy application recently gave us a deeper understanding of the order in which Oracle Application Express executes Application Processes and Page Processes when they share the same process point.
In our case, the point of interest was "Before Header".
When discussing this with a few other developers, some believed the order was:
-
First: Application processes – in sequence number order within the list of "Before Header" application processes
-
Then: Page processes – in sequence number order within the list of "Before Header" page processes
Most of us (myself included) had never really checked — and weren't entirely sure.
To confirm, I created a simple, single-page test application with 5 processes. Each process wrote a message to a table called logtable.
-
Application processes ("On Load: Before Header"):
test05
(sequence 5)test15
(sequence 15)test25
(sequence 25)
-
Page processes ("Pre-rendering – Before Header"):
test10
(sequence 10)test20
(sequence 20)
-
Added a simple Classic Report to display
logtable
's contents ordered by execution sequence.
Here's a screenshot of the application processes:
And here are the page processes:
Page Process - Before header: sequence 10
Page Process - Before header: sequence 20
The output was unambiguous:
Application and page processes are executed together in strict sequence number order. They are interleaved.
What does this mean for us as Oracle APEX developers?
If your Oracle APEX application has both application and page processes at the same process point, the sequence number alone determines execution order - not whether it's an application or page process.
A practical tip:
If you want all page processes to run *after* all application processes, give them higher starting sequence numbers (e.g., 1010, 1020, …).
Happy APEXing!!
No comments:
Post a Comment