I am trying to end all nested Conversations whenever a user Clicks a Button to navigate to the root Page. But my code is not working
Collection<ConversationEntry> conversationEntries= ConversationEntries.getInstance().getConversationEntries();
Iterator<ConversationEntry> iterator=conversationEntries.iterator();
while(iterator.hasNext()){
ConversationEntry conversationEntry=iterator.next();
if (conversationEntry.isNested()){
log.info("End Conversation {0}", conversationEntry.getId());
conversationEntry.setRemoveAfterRedirect(false);
conversationEntry.end();
}
}
Any Suggestion would be appreciated. Though I noticed that it was identifying and Nested Conversation , it wasn't ending them. I need the conversations to end before the next page appears
If you want Seam to have a nice declarative way of doing this, please vote for JBSEAM-3286