20.5 USER SESSION STATES

At any given moment during the user's interaction with the system, VOICE is said to be in one of the user session states, as shown in Figure 20.5. A user session state describes the different prompts and available variables for that state along with a list of other states to which the system can transition from this state. In each state, the audio prompt should be described, either in a form usable by the VoiceXML text-to-speech translator or as an audio file that will be played to the user. Each state should also contain a list of preconditions that must be met before this state can be entered into. The user session state description should also have any applicable Data Source Adapters defined as shown in Figure 20.5, which variables to pass through to those adapters, and what to do with the results of the queries that are passed back from the adapters. Figure 20.4 shows an example of a user session state “firsttime”, which is activated when the user has never called the system before and has yet to fill out any information. When John calls the VOICE system for the first time, this is the first user session state that is activated, which is then used to introduce John to the system, telling him what his options are.

images

Figure 20.4 Sample State section in the XML Application Schema, as used in the Restaurant Search Guide example.

Get Mobile Intelligence now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.