5 Replies Latest reply on Aug 23, 2010 7:21 PM by rafaels

    Counting users in a conversation

    rafaels

      Is there an easy way to count how many users are in a given conversation? I mean, if I have defined a checkout conversation and I want to know how many users are currently in this conversation, how can I count the the number of conversation contexts?
      Thanks

        • 1. Re: Counting users in a conversation
          kapitanpetko

          Conversation is just a part of the session, and 1 session = 1 user. So there is only on user per conversation. Or do you mean named (natural?) conversation?


          To state the obvious once again: forum's formatting sucks bigtime.

          • 2. Re: Counting users in a conversation
            rafaels

            Hi Nikolay, I got your point but that is not what I need and I was not clear in my explanation. Just because there are n active sessions, it doesn't mean that all users are in the same conversation.

            In the hotel booking example, I may have some users just looking for hotels and I may have others users booking an hotel. All users are in their sessions but I would like to count how many users are in the booking conversation.

            It's more like counting actives LRC, in an easy way maybe using a Seam component.

            • 3. Re: Counting users in a conversation
              kapitanpetko

              A conversation is just a number, it knows nothing about what the user is doing. Have a look at natural conversations, that might help you do what you need. No sure how well those work of if anyone uses them at all. You'll need to implement counting logic yourself. Read the source for more details.


              HTH

              • 4. Re: Counting users in a conversation
                alartin

                Write a customized ConversationInterceptor to capture what you want or write a conversation event observer bean.

                • 5. Re: Counting users in a conversation
                  rafaels

                  Sean, I was trying to avoid that but it looks I don't have other way. I didn't want to observe all conversation event and keep a status table of them to count only the actives.

                  So, thanks