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!

Apex 23.2 multiple sessions for the same user, prepare_url function with private_bookmark: works only on a single session

ExeccrJul 4 2024 — edited Jul 4 2024

Hi,

i'm pretty new to linking pages for notifications to be used outside apex, so i'm struggling with a checksum problem.

I'm trying to prepare an URL to use it in push notification and email that could work inside all the sessions one user had. By the way, i'm trying to generate an URL for an a Modal Page (n.32) , where i pass some items values (3) to load the data. The modal page is loading fine only on the device that has been used to press the test button.

Test mode: i have a button that call a simple procedure to send Push notification with a target url. In production i will have a Stored procedure that should generate the url and it will run under an automation.

The problem is: i can send push notifications to the same user that is logged on a mobile PWA application and on his laptop, but the link works only on the same device that the user had used to press the button.

In APEX_WORKSPACE_SESSIONS i can see the 2 sessions for the user.

First, i prepare the URL with this snippet:

v_session := APEX_CUSTOM_AUTH.GET_SESSION_ID;
v_app_id := v('APP_ID');
APEX_UTIL.PREPARE_URL(p_url => 'f?p=' || v_app_id || ':32:' || v_session
|| '::NO::P32_ID,P32_DESTINATION_ID,P32_CUSTOMER_ID:241,22,6',
p_checksum_type => 'PRIVATE_BOOKMARK'
, p_plain_url => true
);

And then i call apex_util.host_url and pipe it to the result of the PREPARE_URL function. Then i use this to send a push notification:

apex_pwa.send_push_notification(
p_user_name => upper('name.surname+contoso@contoso.com'),
p_title => 'This is a Test TITLE for ' || initcap('NAME SURNAME'),
p_body => 'Press this notification to get to the specific page! (P.No: 32 with ID 241)',
p_target_url => l_host_url || l_url);

And this is working, the modal page open with the correct data, but only on the device the user had used to press the button, even with the p_checksum_type => ‘PRIVATE_BOOKMARK’.

On the other devices i get the error:

Application 109 Dialog page 32 cannot be rendered successfully. Ensure the page template in use on page 32 is of template type "Dialog page", with appropriate JavaScript dialog initialization, dialog closure and dialog cancel code defined

More info:

Modal Page 32 have Rejoin Sessions Enabled for all Sessions (and is activated also in the INTERNAL workspace)

Modal Page 32 have Page Access Protection set to Arguments must have a checksum

P32_ID, P32_CUSTOMER_ID and P32_DESTINATION ID have Session State Protection set to Checksum Required - User Level.

Any hint?

Comments
Post Details
Added on Jul 4 2024
0 comments
392 views