Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2, Session Management and "WorkFlow".

 
Glen Divers
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a use case, where after the user "logs in" to the application (handled by Spring Security) I need to start a "setup wizard" comprising three views and their associated actions. These must be processed in strict sequence and the user must not be allowed to break out by either typing a URL into the browser or loading a bookmark. Once the "setup wizard" is complete and the user moves into the application proper, (s)he should not be able to re-enter the setup wizard, unless he first logs out & logs in again. I had considered experimenting with the JQuery plugin to see if I could implement this as a series of modal dialogs, but of course I need javascript active at the client for this to work.

This appears to be the realm of either the ScopeInterceptor or the SpringWebflow plugin, but I'm having difficulty in finding tutorials or example code other than that cwiki.apache.org/S2PLUGINS (and the car insurance example mentioned by the SpringWebflow plugin, is not shipped with the download.) to help me decide which of these, if either, I should use. I'd be grateful for any pointers or suggestions.

In addition, since research suggests that it is practically impossible to prevent, I need to be able to handle the situation where, after establishing the session, the user opens multiple browser tabs into my app and runs multiple functions at the same time, for example, starts editing orders for two different customers in two seperate tabs. How do I keep "session data" seperate for the two tabs and stop these actions from walking all over each other.

And my final use case, is that I have one other "activity" that *absolutely must* be a session singleton. That is, it cannot start if the user is running another action, and while it's active, the user cannot start another action. What techniques/patterns is everyone using to handle this?

Regards
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites. IIRC this has been brought up before.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic