Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Export an APP or PAGE to CLOB

Nic PilotJul 29 2022

Hi APEX Community,
I’m looking for a way to export an app or a page to CLOB
APEX Version 19.2.0.00.18

I’ve tried this code which seems to be working fine.

-------------------------------------
--> Export APP to CLOB
-------------------------------------
if p_export_type = 'APP' then
	l_export := wwv_flow_utilities.export_application_to_clob (
				   p_application_id            => p_app_id,
				   p_export_ir_public_reports  => 'Y',
				   p_export_ir_private_reports => 'N',
				   p_export_ir_notifications   => 'N',
				   p_export_translations       => 'N',
				   p_export_pkg_app_mapping    => 'N',
				   p_with_original_ids         => true,
				   p_exclude_subscriptions     => false
			);
					
					
-------------------------------------
--> APP PAGE to CLOB
-------------------------------------
elsif p_export_type = 'PAGE' then
	l_export := wwv_flow_utilities.export_page_to_clob(
					p_application_id            => p_app_id,
					p_page_id                   => p_page_id,
					p_export_ir_public_reports  => 'Y',
					p_export_ir_private_reports => 'N',
					p_export_ir_notifications   => 'N',
					p_with_original_ids         => true
			);
end if;  

But there is an issue.
It seems that the wwv_flow_utilities.export_page_to_clob is setting some session variables which cause an issue for the next wwv_flow_utilities.export_application_to_clob.
For example,
If I run the export_application_to_clob first, it’s OK, my app is exported successfully. 
Then I run the export_page_to_clob, it’s still OK, my page is exported successfully. 
But if I run the export_application_to_clob again, the CLOB is not ok, all the shared components are missing…. 

I imagine that something needs to be reset somewhere in the session after the export_page_to_clob or before the export_application_to_clob.

I will be very grateful if anyone can help me with this….
With Thanks & Regards

Nicolas

Comments
Post Details
Added on Jul 29 2022
10 comments
733 views