-
1. Re: Stopping and starting long running conversations
gavin.king Nov 10, 2005 10:35 PM (in response to jajansen)You don't need this functionality to implement your usecase. Just end the conversation on the "Ok and create another" action. And start a new conversation when the form is submitted.
I think you've somehow misunderstood something here....
P.S.
The problem is that conversations (of necessity) are created and destroyed at the beginning and end of the actual *request*. We don't destroy conversations in the middle of requests, since that could break all kinds of stuff.
I suppose you could use a browser redirect. Not sure what is the best way to do this in JSF.
Alternatively, I guess we *could* provide some way to destory a conversation "early", at the beginning of the RESTORE_VIEW phase, for example... -
2. Re: Stopping and starting long running conversations
jajansen Nov 11, 2005 6:00 AM (in response to jajansen)gavin, what i've understood about conversations is that it can span multiple requests, right? So my usecase is containes multiple requests that build the data necessary, and the last request ("Ok and create another") will persist the data. At this point in time I need to start a new conversation for the next 'new user dialog'
The way I've modelled it is that there is an actionmethod that begins the conversation (annotated with begin and called from a command action). This initialilzes the form (queries some dropdown data on the form). The last request persists and navigates back to the empty form (that needs initialization in a 'new' conversation, i thought).
I suppose I could just reinitialize the conversation and keep it for the next set of requests (for the next user dialog). That way the conversation would live for as long as the use continues to do 'new user dialogs'. It would end when the user switches to another use case. -
3. Re: Stopping and starting long running conversations
gavin.king Nov 11, 2005 6:09 AM (in response to jajansen)"jajansen" wrote:
At this point in time I need to start a new conversation for the next 'new user dialog'
Negative. You only need to end the first conv at that point."jajansen" wrote:
The last request persists and navigates back to the empty form (that needs initialization in a 'new' conversation, i thought).
Negative. Why on earth would you need the new conversation just to populate the form with blanks? -
4. Re: Stopping and starting long running conversations
jajansen Nov 11, 2005 6:15 AM (in response to jajansen)Negative. Why on earth would you need the new conversation just to populate the form with blanks?
Because the form is not filled with blanks. There is some data in dropdown boxes that needs to be fetched from the database. -
5. Re: Stopping and starting long running conversations
gavin.king Nov 11, 2005 6:23 AM (in response to jajansen)Data in dropdown boxes doesn't sound like conversation-scoped state ;-)
Try putting it in the request, session, or application scope. -
6. Re: Stopping and starting long running conversations
jajansen Nov 11, 2005 6:29 AM (in response to jajansen)Right, good point. I'll try that ;-)