2 Replies Latest reply on Mar 24, 2008 2:12 PM by cpopetz

    How do I keep a conversation alive in an @End method

    kenclark

      When I am in a method annotated with @End and I encounter an error condition for which I want to display a message to the user and have him retry, how do I keep the conversation alive?


      Thanks,
      ken

        • 1. Re: How do I keep a conversation alive in an @End method
          shane.bryzak

          You can just end the conversation manually, instead of using @End.  Simply call Conversation.instance().end() to end the conversation.

          • 2. Re: How do I keep a conversation alive in an @End method
            cpopetz

            Ken Clark wrote on Mar 24, 2008 01:31 AM:


            When I am in a method annotated with @End and I encounter an error condition for which I want to display a message to the user and have him retry, how do I keep the conversation alive?

            Thanks,
            ken

            @End only ends the conversation if you return a non-null outcome from the method, and only if the method doesn't throw an exception.  So you can return null (and thus redisplay with errors) and have the conversation still live.