PDA

View Full Version : how to use conversation scope to get value in all the flow



vijaybihari
Oct 27th, 2009, 05:15 AM
Hi ,
I have saved during Spring mvc one object in session(ABC). and now I want to use this object in web flow

I am able map object from session to the conversation object using this command in action class in one flow
ABC abc=(ABC)context.getExternalContext().getGlobalSes sionMap().get("ABC");
context.getConversationScope().put("abc", abc);

Now when i am moving from one flow to other and trying to retrive the abc object using conversation scope I am getting NULL value
ABC abc=(ABC)context.getConversationScope().get("abc");
abc.getabc();

Can anybody help me out of how to use conversation Scope
am I doing something wrong?

InverseFalcon
Oct 27th, 2009, 12:15 PM
For one, I think globalSession is different from session.

More importantly, you mentioned you're moving from one flow to another. If these are top level flows, then when the first flow ends, the entire conversation ends, and conversation scope is cleaned out. Remember, conversationScope only lasts for the top-level flow and all subflows invoked from it.

vijaybihari
Oct 28th, 2009, 04:10 AM
Thanks .. I think it is very much clear on all the points..

Stilll Not CLear on how GlobalSessionScope is different from Session Scope.
Could you explore little bit more on this.
Thanks
Vijay Kumar