Using the Session Object

When session management is used, a persistent instance of the subclass of WebSession in the current schema is created. This instance can be referred to in code using the currentSession system variable.

Additional properties and methods can be added to this class for storing state information. As this is a persistent instance, any updating of these properties must be done in transaction state.

The currentSession object is valid only for the duration of the Web service call. Any attempt to reference its properties or methods outside of this call (for example, in notification code) will result in a null object reference error.