1 2 3 Previous Next 30 Replies Latest reply on Feb 3, 2008 5:37 PM by pmuir Go to original post
      • 15. Re: How to control end of conversations/state of stateful be
        pmuir

         

        "trouby" wrote:
        Well, sorry for being so annoying but I still don't get the point, If I have buttons that should start a conversation, propagation='none' is not an option


        Normally I find that you don't want to start a new conversation whilst another one is running. Post your use case for this.

        • 16. Re: How to control end of conversations/state of stateful be
          trouby

           

          "pete.muir@jboss.org" wrote:
          "trouby" wrote:
          Well, sorry for being so annoying but I still don't get the point, If I have buttons that should start a conversation, propagation='none' is not an option


          Normally I find that you don't want to start a new conversation whilst another one is running. Post your use case for this.



          My case? I think it's any case with buttons that always exist on the template,

          Lets make an example:
          I have a top menu(that is always with visible) with few options,
          [my items: a, b, c, d]

          Pressing on one item should start a conversation, as this item is heavily being managed later on.

          I have added a 'done' button with propagation='none' but no one is using it : )

          Pressing on another item(from the menu) in the middle of the current long running conversation causes the error,

          I solved it by 'joining' to the current conversation just to fix the error but this is not too logical as the last selected item is not being managed by the user anymore.



          Thanks.

          • 17. Re: How to control end of conversations/state of stateful be
            schlafsack

             

            "pete.muir@jboss.org" wrote:
            Post your use case for this.


            If I understand the topic of this thread, I *think* I've come up against a similar problem in the search application I'm writing to learn seam.

            My application has one page with a text box, a button, a results table and next/previous buttons.

            I'd like to define a conversation as:


            • submitting a search query using the button.
            • navigation forwards though the results using the next link.
            • navigation backwards though the results using the previous link.


              I'd also like the submission of a new query to start a new conversation. Ideally, clicking the button should end the existing conversation and begin a new one. So far I can't see an easy way of doing this.

              With a simple @Begin attribute on the search method, performing a second search throws an exception - which is expected, we are already in a conversation.

              Using @Begin(join=true) does not meet the requirement of starting a new conversation per search.

              I could add a clear button that calls an @End attributed method but this is does not really meet your average user's expectations of a search tool.






            • 18. Re: How to control end of conversations/state of stateful be
              pmuir

               

              "trouby" wrote:
              My case? I think it's any case with buttons that always exist on the template,

              Lets make an example:
              I have a top menu(that is always with visible) with few options,
              [my items: a, b, c, d]

              Pressing on one item should start a conversation, as this item is heavily being managed later on.

              I have added a 'done' button with propagation='none' but no one is using it : )


              So the menu items should have propagation="none". Why do you need to start a lrc immediately on clicking on the menu item (this is the use case we are interested in, of course you want to be able to navigate away in a freeform way from within another conversation).

              If really need to start a new lrc from a menu item, set the propagation to none, and start up a new conversation on the destination page using pages.xml.

              • 19. Re: How to control end of conversations/state of stateful be
                pmuir

                 

                "schlafsack" wrote:
                "pete.muir@jboss.org" wrote:

                • submitting a search query using the button.
                • navigation forwards though the results using the next link.
                • navigation backwards though the results using the previous link.


                  I'd also like the submission of a new query to start a new conversation. Ideally, clicking the button should end the existing conversation and begin a new one. So far I can't see an easy way of doing this.


                Normally you wouldn't make a search screen conversational. Why do you want to make it conversational?

                If you really do want to make it conversational, then you can use <end-conversation before-redirect="true" /> in pages.xml, and start a new conversation after the redirect. But I don't think this is the best way to write a search screen.


                • 20. Re: How to control end of conversations/state of stateful be
                  schlafsack

                   

                  "pete.muir@jboss.org" wrote:

                  Normally you wouldn't make a search screen conversational. Why do you want to make it conversational?


                  I wanted to be able to provide search refinement and result paging/navigation, thus storing per-search state, and allow multiple searches per session. It seemed to me like an ideal candidate for a conversation. Would you suggest a session state or stateless approach as an alternative?

                  "pete.muir@jboss.org" wrote:

                  If you really do want to make it conversational, then you can use <end-conversation before-redirect="true" /> in pages.xml


                  I'm not sure how I could use end-conversation to only end the conversation prior to a new search being performed, and keep the conversation alive for result paging/navigation. Could you give an example?

                  • 21. Re: How to control end of conversations/state of stateful be
                    gus888

                     

                    "pete.muir@jboss.org" wrote:
                    Normally you wouldn't make a search screen conversational. Why do you want to make it conversational?
                    Hi Pete, in fact, I want to make my search screen conversational, because I need to save some search criteria, e.g. searching a classmate, it need to first select a state, then choose a city based on the selected state, select-input school name, input name and begin searching, pagination.... After finishing searching, the front conversation bean become back-conversation and timeout cleaning after about 5min, or click finish search to end the conversation.

                    Is it correct design, or you may suggest a better search pattern? Thank you.

                    • 22. Re: How to control end of conversations/state of stateful be
                      pmuir

                      Have you taken a look at the way seam-gen does it? It produces a pageable, bookmarkable search screen that saves the search criteria without using a conversation.

                      • 23. Re: How to control end of conversations/state of stateful be
                        gus888

                         

                        "pete.muir@jboss.org" wrote:
                        Have you taken a look at the way seam-gen does it? It produces a pageable, bookmarkable search screen that saves the search criteria without using a conversation.

                        I went through all seam examples, and I found the following search beans:

                        1. booking - HotelSearchingAction: Session bean
                        2. blog - SearchService: default bean
                        3. dvdstore - FullTextSearchAction: Conversation bean with @Begin(join=true)
                        4. wiki - WikiSearch: Conversation bean with begin (join=true) in pages.xml

                        It seams that the blog-SearchService has bookmarkable but not pagable, but the SearchService only has one searchPattern criteria. The dvdstore and wiki search pages have pageable. Thanks.

                        • 24. Re: How to control end of conversations/state of stateful be
                          trouby

                           

                          "gus888" wrote:
                          "pete.muir@jboss.org" wrote:
                          Have you taken a look at the way seam-gen does it? It produces a pageable, bookmarkable search screen that saves the search criteria without using a conversation.

                          I went through all seam examples, and I found the following search beans:

                          1. booking - HotelSearchingAction: Session bean
                          2. blog - SearchService: default bean
                          3. dvdstore - FullTextSearchAction: Conversation bean with @Begin(join=true)
                          4. wiki - WikiSearch: Conversation bean with begin (join=true) in pages.xml

                          It seams that the blog-SearchService has bookmarkable but not pagable, but the SearchService only has one searchPattern criteria. The dvdstore and wiki search pages have pageable. Thanks.



                          SeamGen makes a usage of Seam framework, you should take a look at it, it has all the features you asked for and the implementation is very clean,



                          Asaf.

                          • 25. Re: How to control end of conversations/state of stateful be


                            I think part of the problem here is that outside of a few, small example applications provided by the gracious Seam team, there are no true examples of a large, enterprise-level application properly using Seam conversations.

                            Seam is so closely coupled with conversations that there is no true way of escaping them. Yet the amount of confusion over how to manage them in an Web environment where the user is truly allowed to go anywhere, do anything, start any process and end it at any time, should point out to the Seam team that *are* issues with conversations in general.

                            They're a great idea - but I know we're struggling with their usage. Results are unpredictable at best. The authors of Seam documentation attempt to show its great value but in practice it is hard to come by. Try using breadcrumbs based off of Seam conversations - I'll tell you upfront that it simply will cause more headaches than it is worth in a system with many pages and processes.

                            I think there needs to be a definitive, large-scale example on how to manage conversations in an enterprise application. There is simply too much confusion for this to be ignored.

                            My two cents.

                            • 26. Re: How to control end of conversations/state of stateful be
                              pmuir

                              Chris,

                              Interesting post. Thanks for the feedback. We do have one large scale app written in Seam in the examples dir - the wiki example which is the basis of the new Seam community site (which is up and running). The problem with large example apps is that they are hard to understand which makes them bad examples!

                              Before moving to JBoss I did work on a fairly large app with Seam using conversations, and had no real problems with conversation management. I've also seen apps use conversations well in support cases and when consulting.

                              My tip is to avoid starting conversations from navigation links (those links that take you to other areas of the app), always make navigation disable conversation propagation, and just use conversations *within* each area of the app.

                              • 27. Re: How to control end of conversations/state of stateful be

                                Pete,

                                Thanks for not taking my post harshly as it wasn't meant to be as such. I, for one, am extremely appreciative of what all of you are doing to evolve Seam and to engage the end-user as much as possible, through these forums and elsewhere.

                                We *had* been setting propagation="none" on most navigation links and just recently started to think that we actually *shouldn't* be doing this. So hearing from you that this is indeed something that should be set (to "none") helps greatly.

                                It is tips like these that could be really helpful to people struggling to grasp ho how to use conversations. Looks like the new Wiki will be a good source for this kind of information.

                                I'll take a look at the example itself as well.

                                Thanks!

                                • 28. Re: How to control end of conversations/state of stateful be
                                  gus888

                                   

                                  "pete.muir@jboss.org" wrote:
                                  My tip is to avoid starting conversations from navigation links (those links that take you to other areas of the app), always make navigation disable conversation propagation, and just use conversations *within* each area of the app.
                                  Excellent tip! Thank you very much, Pete.

                                  • 29. Re: How to control end of conversations/state of stateful be
                                    javichi_fer

                                    The problem I find when setting propagation="none" on my navigation links is that the conversation is not ended and is maintained on memory untill it expires.

                                    Wouldn't it be better to set propagation="end"?