The Life Circle of a Dialogue
- When Switching between Two Apps...
- An Example
- The Lifetime of Contexts
When Switching between Two Apps...
There are some situations in a speaker's interacting with the DS when he/she keeps switching conversation flow between two apps. When a switch happens, all the contexts of the current app will be overwritten by that of the new app. In this case, our system will store all the contexts of the current app lest its contexts be lost. This mechanism makes it possible to switch conversation flow between two apps without compromising on losing their contexts. But for this feature, the DS could not handle more than one conversation flow at a time.
An Example
The best way to understand this mechanism is of course through an example. First, let's assume a speaker says to the DS, "I wanna go to see a movie. Could you recommend some good ones for me?" But after a while, she, on a whim, asks, "How's the weather outside?” hoping that it is not raining so that she won't have to bring an umbrella or get wet. Also, suppose the speaker's first question---"Could you recommend..."---goes to the conversation flow of appA, and the second question---"How's the weather?"---goes to that of appB. Then after appA's switching to appB, the contexts of appA are stored in the DS. In the future, whenever the conversation flow goes back from appB to appA, appA's previous contexts, if any, can be retrieved. Hence, the speaker will feel like the conversation flow of appA goes on without any disruption. Were the contexts of appA not stored, after appA's switching to appB, the DS would never know the speaker wants to see a movie and is asking it to recommend a good one for her.
The Lifetime of Contexts
Furthermore, regarding the lifetime of the contexts of an app, they are stored in the DS as long as the app is running, which means the contexts will be erased only if the app is closed.