Service Studio 6.0 Help
About Session Variables
Session variables hold data that is persistent during the session. You can use these variables to save information during the end-user interaction. The session variables can be pre-defined or user-defined as explained below.
It is not possible to use a session variable to exchange information among the end-users and sessions.
You can set a default value for your local variables through the Default Value property. See the Variable Properties
Session variables are cleared to their default values
when one of the following System actions is used: Login,
LoginPassword,
or Logout.
Session variables should
be used with care and discipline since they can affect the scalability
of your eSpace. Furthermore, you should try to avoid handling large quantities
of data with session variables because, in each request, these variables
are transmitted twice between Platform Server and the Agile Platform Database
(or ASP. Net Session Server depending on your ASP.Net configuration).
When this happens, Service Studio presents
a warning
message.
Session Variable lifetime
The session variables are initiated automatically by Service Studio when the Platform Server session is created. While the session exists, you can use these variables in your business logic. When the session ends, the session variables are discarded.
The session variables are
available for each end-user interaction.
Pre-defined Session Variables
The pre-defined session variables, created handled automatically by Platform Server, are the following:
MobilePhone: In SMS flows, this contains the value of the phone number. In web flows this variable is also available but has an empty value.
Read. Phone number type.
UserId: Contains the end-user id. This variable is instantiated during the login operation, whether you are using an explicit or implicit login. At logout, this session variable is assigned a Null Identifier value. Learn more about Authenticating End-users.
Read only.
Username: Contains the end-user name. This variable is instantiated during the login operation, whether you are using an explicit or implicit login. At logout, this session variable is assigned a Null Identifier value. Learn more about Authenticating End-users.
Read only. Text type.
ExceptionMessage: Text that explains the reason for the last error, such as "Attempted to divide by zero". If the exception was raised due to an explicit Raise error, it will contain the text defined by the developer. How?
Read only.
TerminalType: Indicates the type of terminal that is being used. The possible values are: WAP, SMS, and Web. These values are instantiated when the session starts.
Read only.
User-defined Session Variables
You can define your
own session variables. To define a session variable, simply right-click
on the Session Variables folder
(in the eSpace tree under the Data layer),
and select the
Add Session
Variable option. See possible data
types for session variables.
See Also
Session Variable Properties | About Variables | About Sessions in Agile Platform