13.8 SET_STATUS Procedure
This procedure sets status for an execution chain. This procedure must be called from within PL/SQL code.
Use the GET_EXECUTION
function to retrieve status messages.
Syntax
APEX_BACKGROUND_PROCESS.SET_STATUS (
p_message IN VARCHAR2 );
Parameters
Parameter | Description |
---|---|
p_message |
Current status message for the page chain. |
Example
The following example demonstrates a PL/SQL page process running in the background. After each unit of work, a status message is being reported to the APEX engine.
DECLARE
l_result varchar2(255);
BEGIN
apex_background_process.set_status( 'Part A: Process Orders' );
for i in ( select *
from orders
where status = 'OPEN' )
LOOP
l_result := process_order( p_param => i.order_id );
END LOOP;
apex_background_process.set_status( 'Part B: Process Bills' );
for i in ( select *
from orders
where status = 'DELIVERED' )
LOOP
l_result := emit_bill( p_param => i.order_id );
END LOOP;
END;
See Also:
Parent topic: APEX_BACKGROUND_PROCESS