Session Data is an entity used to save session context information. Each application has a single Session Data entity, located in the Repository folder. New applications are created with an empty Session Data entity which cannot be deleted. The Session Data entity enables defining variables and their types in the session context during design time. In Runtime, a Session Data object is created for each session, and it is possible to set and then use the variables' values in the current session. When using these variables in Connection Pools, whenever a connection is returned to the pool, the Session Data is reset with the default values.
When executing a path using the Execute Procedure node, by default a new session is created for the executed procedure, therefore a new Session Data object is created for the executed procedure. To use the same Session Data object as the Procedure, map the session ID to the executed procedure ID.
The Session Data entity can be used in the following entities:
Path Procedure mappers
Business Activity Mappers
For applications created in earlier ApplinX versions, when synchronizing the application database, an empty Session Data entity is created. The old database cannot contain a data structure named "SessionData" (and when such a data structure exists, it must be renamed prior to the import process).
To define variables and types of variables:
Within the Repository node of the application, double-click on SessionData. The Session Data entity is displayed.
Click. An attribute is added to the Session Data.
Provide a name for the attribute and a relevant description.
Select the type of attribute: Text, Long, Boolean, Double, Integer, Float, Byte or Date.
Determine if it is an array.
Enter a default value.
To Set and Use the Variables:
Setting and using the values is implemented by mapping to or from the session data variables (refer to the Mapper).
The following illustrates mapping from the Session Data to the Procedure's outputs.
The following illustrates mapping from the screen's field content to the Session Data
The following illustrates mapping from an Expression which uses the Session Data, to the Session Data.