12.6 EXECUTE for Query Context Procedure
This procedure executes automation actions for a given query context. The columns returned by the query context match those defined in the automation query, especially when columns are referenced as bind variables in the actions code.
Syntax
APEX_AUTOMATION.EXECUTE (
p_application_id IN NUMBER DEFAULT {current application id},
p_static_id IN VARCHAR2,
p_query_context IN apex_exec.t_context )
Parameters
Parameter | Description |
---|---|
p_application_id |
ID of the application which contains the automation. |
p_static_id |
Static ID of the automation to execute. |
p_query_context |
The context to run the actions for the query. |
Examples
This example executes the actions defined in the automation my_emp_table_automation
, but uses a different query context.
DECLARE
l_context apex_exec.t_context:
BEGIN
apex_session.create_session( 100, 1, 'ADMIN' );
l_context := apex_exec.open_query_context(
p_location => apex_exec.c_location_local_db,
p_sql_query => 'select * from emp_copy_table' );
apex_automation.execute(
p_static_id => 'my_emp_table_automation',
p_query_context => l_context );
END;
Parent topic: APEX_AUTOMATION