Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
9 replies
Subscribers
9 subscribers
Views
3316 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi Everyone, We have a requirement where we need to Store data in Session O
vamsiv
over 11 years ago
Hi Everyone,
We have a requirement where we need to Store data in Session Object. I tried to fetch session object but i am getting error while fetching it.
So I tried storing data in servicecontext object using a custom function by using the following methods
sc.setAttribute(attributeName,AttributeValue) and sc.getAttribute(attributeName) . But they are not working as expected.Can any one suggest me how to fetch a session object or Any other alternate approach to store data in a session...
OriginalPostID-81082
OriginalPostID-81082
Discussion posts and replies are publicly visible
Parents
0
Sathya Srinivasan
Appian Employee
over 11 years ago
I think you've explained the issue you're having already. Using session may not guarantee your scenario.
Depending on session to manage database connection is not a good design practice in a session independent framework. By that, I mean that the sessions do not dictate the process. The Appian Engines persists data between events/transactions. Your architecture should focus on this feature.
I suggest that when the user initiates the process, you pass in the preferred database as a parameter and use this within your design. This is the most straight-forward and easy way of handling your scenario. This will eliminate the need to manage sessions and avoid issues that may arise if a session times-out. No matter what session a user is on, the info about the selected database is now held as a process variable and you can use Expression builder to dynamically do operations.
Hope this helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Sathya Srinivasan
Appian Employee
over 11 years ago
I think you've explained the issue you're having already. Using session may not guarantee your scenario.
Depending on session to manage database connection is not a good design practice in a session independent framework. By that, I mean that the sessions do not dictate the process. The Appian Engines persists data between events/transactions. Your architecture should focus on this feature.
I suggest that when the user initiates the process, you pass in the preferred database as a parameter and use this within your design. This is the most straight-forward and easy way of handling your scenario. This will eliminate the need to manage sessions and avoid issues that may arise if a session times-out. No matter what session a user is on, the info about the selected database is now held as a process variable and you can use Expression builder to dynamically do operations.
Hope this helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data