Warm tip: This article is reproduced from stackoverflow.com, please click
oracle oracle-apex oracle-apex-18.2

Oracle APEX: Reset session on every application launch?

发布于 2020-04-15 10:26:50

My use case is actually from the standpoint of an Oracle APEX developer. I'm on version 18.2.

I am working on a single-page application. Every time I run my APEX application from Page Designer, I want the session state of my application to essentially reset. Item values should all start out as NULL, or at their defaults.

I've been playing with a Dynamic Action on Page Load, but that's overkill: if I'm testing multi-step series of operations, simulating an end user, across those actions I want session state retained. But every time I make development changes in Page Designer and then click the "Run" button to launch my application, I want a clean slate.

Is it possible? How do I go about it?

Thanks.

Questioner
Tebbe
Viewed
33
Littlefoot 2020-02-04 03:35

How about a simple workaround?

I understand this is a one-page application. Let's call it Page 1. OK, that's what the final result will be.

But, for testing purposes, create another page (Page 2) and a button on it which will perform redirection to page in this application (the one you're working on - Page 1).

Link Builder contains the Clear session state section which lets you specify which page's session state you want to clear - obviously, that will be Page 1.

Basically, you'd make changes to Page 1, but run Page 2 and push the button to go to Page 1. Its session state will be cleared and let you do any tests you want.