Version 9.7
 —  Designing and Developing an Application  —

Session Data

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.

Note:
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:

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).

Start of instruction setTo define variables and types of variables:

  1. Within the Repository node of the application, double-click on SessionData. The Session Data entity is displayed.

    graphics/sessionData4.png

  2. Click Add Attribute. An attribute is added to the Session Data.

  3. Provide a name for the attribute and a relevant description.

  4. Select the type of attribute: Text, Long, Boolean, Double, Integer, Float, Byte or Date.

  5. Determine if it is an array.

  6. Enter a default value.

Start of instruction setTo Set and Use the Variables:

  1. 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.

    graphics/sessionData1.png

    The following illustrates mapping from the screen's field content to the Session Data

    graphics/sessionData2.png

    The following illustrates mapping from an Expression which uses the Session Data, to the Session Data.

    graphics/sessionData3.png

Top of page