Section I – SCXML > SCXML > Session Scope Bottom of Page
| Genesys 8.0 SCXML Technical Reference
< Modularity System Functions >

## Session Scope

A session will contain the following ECMAScript object structure and scope:

- ECMAScript Global Object — This is the root of all ECMAScript objects and functions

- ECMAScript Core objects (String, Number, Math, Date, and so on) and global functions (isNAN, for example).
- `_genesys` Object — This is the root object for accessing all Genesys-specific ECMAScript objects and functions (SCXML extensions and functional modules). This object is under the ECMAScript global object (scope). See the `_genesys` Object section for details.
- `_data (<datamodel>)` Objects — These are the objects that are created based on the orchestration logic (SCXML document), for example, data to be used during the processing of the logic and expected initiation and return parameters for the session.
- Developer-Defined Global Variables, Objects, and Functions — These are the global scope ECMAScript elements that are defined by the developer in the application logic.
- `_event` — This is the object which represents the latest event received by the session and has triggered the current transition.
- `_sessionid` — The variable 'sessionid' is bound at load time to the system-generated ID for the current SCXML session. It remains bound until the session terminates.
- `_name` — The variable '`name`' is bound at load time to the name of the state machine, which is specified in the "name" attribute of the `<scxml>` element. It remains bound until the session terminates.
- Local Scope Elements — This content is only accessible from within the execution of a given state element. So each active state element will have its own separate scope. A state's scope is accessible by using the following convention: `_state-name`. When resolving a variable during processing, the platform will start checking with the current state, then check the scope of the parent state, and so on until it reaches the global state of the `<scxml>` element. There is not a local scope for each transition. The local scope of the state that contains the transition element will be used. In addition, there will a local scope for expression processing which will not be part of the state scopes. When the processing of the state element is completed, the scope content is destroyed. The following is the available content:

- Developer-Defined Local Variables, Objects, and Functions — These are the local-scope ECMAScript elements that are defined by the developer in the logic as part of any SCXML executable content elements (for example, `<script>`).

Section I – SCXML > SCXML > Session Scope Top of Page
| Genesys 8.0 SCXML Technical Reference
< Modularity System Functions >