OutSystems Platform allows you to develop web applications, that by their definition are stateless: each request an end-user makes to the server is not aware of the previous requests.
To overcome the limitations of these stateless requests, the Platform uses several mechanisms to allow the server to maintain information about the previous requests the end-user made. One of the mechanisms are Sessions.
In OutSystems Platform a Session is created in the first request the end-user makes to the Platform Server and allows to keep context during the end-user interactions with the server. The session consists in the set of session variables defined in the modules the end-user accesses during its interaction. The session variables can be used when you are implementing the business logic of your module, for example, in user-actions, screen preparations, and screen actions.
The session is created on the server and can be shared by several modules if you are using the Single Sign-On feature that enables an unified view of users and sessions by a set of modules. See more about Single Sign-On.
The session begins on the first request of the end-user and ends when:
That end-user logs-out;
Automatically, due to a time-out caused by the user not making requests to the server for a certain amount of time.
There are, however, some details specific to the channel used for the end-user interaction. Learn more about OutSystems Platform Session Lifetime.
When the end-user makes the first request to the server, either in a Web or SMS interaction, a new session is created. When this happens the OnSessionStart event is fired, and the action that handles it is executed. See more about the OnSessionStart Event.
The session time-out specifies the period of time that a session can remain idle, without any end-user interaction, before the Platform Server ends the session automatically.
The default value for the session time-out depends on the application server:
.NET: 20 minutes and this value can be configured in machine.config file;
J2EE: 60 minutes and this value can be configured in /etc/.java/.systemPrefs/outsystems/prefs.xml file.
When using actions from a referenced module, a session is created with all the producer module session variables. This ensures that the referenced actions can maintain the session variables state between invocations. See Consumer and Producer eSpaces.