Sequence

Overview

The Sequence object is used to arrange objects to be processed sequentially. It is typically used to structure applications into blocks that can be re-used at various places within the respective application or within other applications.

If you want to encapsulate an entire sub-application such as asking callers for their contact information, it is preferable to use a Module object, which can include global settings such as Tuning or Event Handling.

The Object Definition below covers the configuration of the Sequence object with VoiceObjects Desktop. For information on how to define this object type using VoiceObjectsXML refer to the VoiceObjectsXML Definition paragraph.

The Sequence object belongs to the object category Components.

Dialog Flow Scenario

This dialog flow example describes a typical dialog in a restaurant booking application. The caller is asked to select a cuisine (e.g. Italian, Chinese, etc.). The available restaurants are then obtained from a database, and presented to the caller in a browsable list.


Object – Caller

Dialog Flow

Dialog flow from:   Ask for Cuisine

Dialog flow from:   Get Restaurant List

Dialog flow from:   Present Browsable List

Object Definition

The Definition of the Sequence object provides one section:

·          Object Sequence
To specify the objects to be processed sequentially.


 

For information regarding additional object configuration, refer to Precondition and Properties in this Object Reference.

Object Sequence

The Object Sequence section defines the objects to be processed in order of their respective position in the sequence. A Sequence object may contain any number of objects.

VoiceObjectsXML Definition

The Sequence object is represented by the VoiceObjectsXML element <sequence>. It has two groups of children.

In addition, the element has the standard attributes described in the XDK Guide.

Sequence

Children

·          <expression usage=”precondition”> or
<variable usage=”precondition”> or
<collection usage=”precondition”> or
<script usage=”precondition”>
Defines the precondition for the Sequence object.

·          +(<module>, <input>, <output>, <sequence>, <menu>, <confirmation>, <list>, <osdm>, <plugin>, <connector>, <script>, <log>, <if>, <case>, <goto>, <loop>, <expression>, <recording>, <transfer>, <pause>, <exit>)
Defines the list of objects within the Sequence object. The order of elements defines the order of the objects in the Sequence object.

 

Example

<sequence>

  <output>

    <outputItem><text>Please enter your car data
    now.</text></outputItem>

  </output>

  <input link=”#Get car info”/>

</sequence>

Object Interoperability

The following table contains all object types that can reference a Sequence object:


Icon

Object Name

Use Case Example

Module

A Sequence object is always referenced within a Module object –either as an embedded or autonomous object.

Sequence

A Sequence object can be nested within other Sequence objects.

Menu

A Sequence object can be used as the destination object within a Menu item.

Confirmation

A Sequence object can be used as the destination object within a Correction item inside a Confirmation object.

If

A Sequence object can either be within the THEN item or the ELSE item of an If object.

Case

A Sequence object can be used in any WHEN item of a Case object.

Loop

A Sequence object is always referenced within a Loop object –either as an embedded or autonomous object.

Goto

A Sequence object can be referenced via a Goto object.

Hyperlink

A Sequence object can be the destination of a Hyperlink object.

Object Naming Conventions

In order to leverage the capabilities of the integrated documentation of VoiceObjects it is important to provide intuitive and self-explanatory object names and descriptions.

The name of a Sequence object should describe the sequence of steps that are processed. The short description should point out any assumptions or restrictions that apply. The table below lists three examples:


Name

Description

 Process order

Performs the steps necessary to process an order. Requires that a Collection object Order Items previously has been filled with the items to be ordered.

 Format back-end data

Prepares the data retrieved from the back-end for presentation to the caller. Required before processing another Sequence object Present back-end data.

 Check validity of input

Checks whether the caller input is consistent and conforms to the back-end requirements. Involves both internal computations and back-end access.