Session Expiry

  
Hello All,

1] I have declared one session variable and I have put some value into it. When I don't do anything for some time session gets expire.But in outsystems inbuilt sessions are available like UserID,UserName,MobilePhone etc.they never expire.
I want some kind of popup on session expire which is I have declared or how to declare session like inbuilts are declared.
2] I want display calendar icon which is not displayed currently when I run a particular page.

pradip chavhan wrote:
hi pradeep,
1] default session expire time is 20 mins.
if you want to show the pop up message on session expire then you need right the code
On Session Start event under Actions- by right click u will find the option.
you can start the timer on session start action after 20 mins u can show message.

2] there are lots widgets available in the forum which will display calendar icon.


Hello All,

1] I have declared one session variable and I have put some value into it. When I don't do anything for some time session gets expire.But in outsystems inbuilt sessions are available like UserID,UserName,MobilePhone etc.they never expire.
I want some kind of popup on session expire which is I have declared or how to declare session like inbuilts are declared.
2] I want display calendar icon which is not displayed currently when I run a particular page.
 
 
 
Hi manish,
Thanks for your valuable reply. But I am new cummer on outsystem and I dont know how to generate an session expiry action so can you give me a step by step guidence for same.

I want to display current date when i click on calendar till now it will show me by default date or date which was I have set for it.But when I click on it it will show todays date.For calendar I have attached an oml so please check it once what I have done wrong. Please correct it.
Hi Pradip,

As Manish explained, you can NOT generate a session expiry action.
The closest you can do is to set up a timer on Session Start, to execute your code right before the session expires.
See the online help:
- http://www.outsystems.com/help/ServiceStudio/9.1/index.htm#t=Using_Timers%2FUse_Timers.htm
- http://www.outsystems.com/help/servicestudio/9.1/index.htm#t=Language_Reference%2FAbout_Sessions_in_OutSystems_Platform.htm

Joao

A timer won't work, because they are not user specific, they will trample all over each other as multiple users sign in. Also, a timer cannot interact with an open page. Finally, doing anything client side isn't going to work either, because multiple browser tabs/windows will interfere.

Any requests from the client to the server will restart the 20 minute countdown. Instead, you should do something like the following:

* Implement an entity to associate user to their most recent page load.

* Use the "OnBeginWebRequest" system event to update that entity, so you can keep track of when the most recent page load occured. On actions that should keep the session alive, you can update that too.

* Using a JavaScript timer, call a REST service that checks the most recent page load time from that Entity. If it has been more than 20 minutes, do whatever it is you need to do (plenty of posts in this forum to understand how to make a popup open from JavaScript).

 J.Ja
Hello Guyse,

I have one more problem like I want to cath exceptions and showing some user friendly messages.
e.g.
If I got an exception like of oracle ORA-01013 at the time of record update at this stage I want to show some kind if user friendly message.
on same page my session gets expired, I am used this session value at the time of record updation so I get another exception and i want to show some other message for user.
before go for update I want to check that session have its value or not but this thing gets automatically when session gets expire.


In asp.net or MVC we can have option to check session or show some popup message / notification message before session will get expired.
e.g. 20 sec before system will populate a popup will show session will get expired after 20 seconds. Once popup gets display timer gets from 20-0 once timer reach @0 page automatically redirected to home.

I am looking for same in outsystems.

I have posted 2 seperate questions
1] session
2] How to show multiple user friendly messages on exception basis on same page.

 

Hello Pradip,

Please start a new discussion for every new question, otherwise:
- it becomes harder for others to help you;
- it becomes much much harder for others looking for help on such topics later.

Thanks,

Joao