We have Oracle Apex 4.0.2 version instances installed in Dev, Test, Prod environments.
We use the same application number across all the 3 environments
eg: App no. 200 is used in all the 3 environments.
When the App from Dev environment is imported to Test environment.
The users subscriptions for the interactive reports are getting deleted.
Any ideas or suggestions ?
This is actually a known feature (or bug, depending on your perspective). I ran into this myself, and managed to solve it with the help of Joel Kallman's excellent blog post.
I was able to get back the users subscriptions in the target environment with the below procedure.
In my scenario I am moving the app 200 from Dev to Test environment.
Extract wwv_flow.g_flow_id and wwv_flow_api.g_id_offset initializer statements.
In my scenario I was testing with 1 interactive report users subscription
begin wwv_flow.g_flow_id := nvl(wwv_flow_application_install.get_application_id,200); wwv_flow_api.g_id_offset := nvl(wwv_flow_application_install.get_offset,0); wwv_flow_api.create_worksheet_notify ( p_id => 3351032625694541+wwv_flow_api.g_id_offset, p_flow_id => wwv_flow.g_flow_id, p_worksheet_id => 11045125897667191+wwv_flow_api.g_id_offset, p_report_id => 11046318922668871+wwv_flow_api.g_id_offset, p_owner => 'abc.def', p_email_subject => 'Primary Report test', p_email_address => '[email protected]', p_start_date => '2012.09.07.01:00:00', p_notify_interval => 'D'); end;
Import the app 200 from Development environment to Testing environment.
Run the app in Test environment, You will see the interactive reports users subscriptions to the associated pages.
Note: This procedure applies only when you have same app id across all the enviornments