We are build a chatbot application with a complex conversation tree where a request is built based on numerous inputs from customer conversation and finally is send to our own captive application. The session model object maintains a map of where a given customer is in the conversation tree , which drives the next set of question/interactions in the conversation. Needless to say that multiple customer will be interacting with chatbot simultaneously, with every customer having a different state of the conversation tree. This is a spring boot application on Tomcat 9.0, Java 1.8 We are trying to use session_scoped spring bean to persist the flow of our chatbot conversation tree. We have requirement to reset this bean when it reaches one of the step. We are facing issue in resetting session scoped bean.

Alternatively we are trying to preseve an in memory map of session id is to sessionModel. But we have quite complex object which we preserve.

Challenge is that model is updated from many places and the updates made to the current state in the session are not not reflecting correctly to the sessionmodel.

0

There are 0 best solutions below