Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Maintain cookies and security information by implementing session parameters in your application.
This project will introduce creating and accessing session data from a User logged into your application. Session data is global session-specific parameters that can be used on the Client and Server side.
Following the steps in this guide, you will be able to access the logged in User's information and their set values.
We will teach you how to access session data, that can later be used to provide Users with unique experiences and a more robust application.
NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes
Download the completed files for this tutorial: Sessions.xml.
The Sessions.xml file contains a completed example of session parameters. Utilize this file to see a finished example and return to it as a reference if you become stuck during this guide. Keep in mind, this download uses the exact names for entities used in this tutorial. If you would like to import this example and also create entities on your own, change the names of the entities you create.
You've just created your first Session Parameter. These values are used for content held in a cookie for a website or information that might be static for the User or session.
Best Practice: For information that will be static for the entire application and not based on the session, use a database option or a stored value in a Thing.
NOTE: There is a difference between Session parameters and Mashup parameters. Mashups can have input values that will be used for services or content of that Mashup ONLY. Session parameters are based on the user using the application in a session. This data will be accessible throughout the application and last until they have completed their usage. This guide shows how to create Session parameters that are considered global session parameters.
Congratulations! You've successfully completed the Create Session Parameters guide, and learned how to:
We recommend the following resources to continue your learning experience:
Capability | Guide |
Build | Create Custom Business Logic |
Build | Data Model Introduction |
If you have questions, issues, or need additional information, refer to:
Resource | Link |
Community | Developer Community Forum |
Support | Session Parameter Help Center |
The "Step 3: Access Session Parameters" didn't address how to use a session parameter in a service.