Re: scxml dialog problem - if session is invalid, state machine hangs and navigation is broken

2006-10-28 Thread Craig McClanahan

On 10/27/06, Rahul Akolkar [EMAIL PROTECTED] wrote:


On 10/27/06, Torsten Krah [EMAIL PROTECTED] wrote:
 Hm ignore this - its working now, don't know why, but testet in dozen
 times without success, minutes after writing the mail it does :-|, maybe
 i found out why, only cleared out my cookies, i dont believe that this
 could be reason.

snip/

Hmm.

If I were invalidating the session while a dialog was active (never
tried that), I'd probably manually stop() the dialog and clean up
(IIRC, the context gets placed in the request scope after the restore
view phase) so the Shale dialog navigation handler delegates to the
original as desired (which, it seems, is already working for you).



I suspect this is a use case we'll want to document (for both the basic and
the SCXML implementations).  The dialog manager maintains all its per-user
state information in the HTTP session, so when you invalidate that it all
goes away -- the next request will have a problem because it will specify a
dialog identifier that no longer exists.

Manually stopping any dialogs that are currently in progress seems like the
right approach for a logout scenario.

-Rahul


Craig



Torsten

 Am Freitag, den 27.10.2006, 10:37 +0200 schrieb Torsten Krah:
  I've got a logout link on my pages which does invalidate the session
and
  return logout.
  If i use plain jsp it works.
 
  Now i've got a dialog.
 
  If i use a plain logout outcome from a commandLink, the navigation
  rule does what it should, the dialog state engine reaches it defined
  logout end state and navigates to the end state.
  But when using the logout from my backend action method which
  invalidates the session and the return logout, no navigation happens
  and the state machine does not reach its defined logout end state.
  Not reaching the end state should not matter, because the session is
  lost, so i think we don't need to care about, but the navigation
outcome
  should be handled and executed, shouldn't it?
 
  How to overcome this, i guess without the session the dialog data is
  gone, but in this case it would be nice if the outcome gets handled
from
  the faces navigation handler which works if no dialog is present.
 
  Hints, thoughts?
 
  Torsten
 
 





Re: scxml dialog problem - if session is invalid, state machine hangs and navigation is broken

2006-10-27 Thread Rahul Akolkar

On 10/27/06, Torsten Krah [EMAIL PROTECTED] wrote:

Hm ignore this - its working now, don't know why, but testet in dozen
times without success, minutes after writing the mail it does :-|, maybe
i found out why, only cleared out my cookies, i dont believe that this
could be reason.


snip/

Hmm.

If I were invalidating the session while a dialog was active (never
tried that), I'd probably manually stop() the dialog and clean up
(IIRC, the context gets placed in the request scope after the restore
view phase) so the Shale dialog navigation handler delegates to the
original as desired (which, it seems, is already working for you).

-Rahul




Torsten

Am Freitag, den 27.10.2006, 10:37 +0200 schrieb Torsten Krah:
 I've got a logout link on my pages which does invalidate the session and
 return logout.
 If i use plain jsp it works.

 Now i've got a dialog.

 If i use a plain logout outcome from a commandLink, the navigation
 rule does what it should, the dialog state engine reaches it defined
 logout end state and navigates to the end state.
 But when using the logout from my backend action method which
 invalidates the session and the return logout, no navigation happens
 and the state machine does not reach its defined logout end state.
 Not reaching the end state should not matter, because the session is
 lost, so i think we don't need to care about, but the navigation outcome
 should be handled and executed, shouldn't it?

 How to overcome this, i guess without the session the dialog data is
 gone, but in this case it would be nice if the outcome gets handled from
 the faces navigation handler which works if no dialog is present.

 Hints, thoughts?

 Torsten