Lesson 5 introduces the structuring of dialog flows and the use of Module objects.
After completing this lesson you will know
· why to structure a dialog flow,
· how to create a Module object,
· what the Dialog Designer is,
· how to redeploy an application.
So far you have created an application that just consists of one single object playing an output to the caller.
During the course of this Tutorial you will enhance your application and add more objects to it – though the overall number will still stay quite small. More complex applications actually consist of a large number of single objects. Have a look at the complete Prime Insurance sample application provided with the VoiceObjects platform to get an impression on that.
In order to structure complex dialog flows that consist of large numbers of objects, designers split applications into logical units. Single objects are grouped into sub-dialogs that can be combined later on to form larger applications.
Structuring dialogs into units not only helps designers keep a clear dialog structure but – due to the reusability of complete modules – also helps to rapidly develop new applications based on existing components.
Several object types are provided by VoiceObjects to facilitate the building of logical units. The most common one is the Module object explained below, others are the Sequence and the Menu object (for details see the descriptions of the respective objects in the Object Reference).
For further information on reusability see Chapter 1 – Application Design – The Modular Concept in the Design Guide.
The Module object typically represents the start node in a dialog flow and is the basic component when building applications.
The Module object belongs to the object category Components. For a detailed description refer to Module in the Object Reference.
Module objects are intended to represent both stand-alone dialogs and sub-dialogs. The Prime Insurance application, for example, includes the sub-applications Health Insurance, Life Insurance, Car Insurance, Claim Check, and Claim Report, which are developed as separate Module objects. The Prime Insurance Portal – again a Module object – combines these applications into a single one.
As you will see later on, the Module object also allows you to specify global settings for an application, say for event handling and navigation, which can be inherited by subordinate objects in the dialog flow.
For further information on inheritance see Chapter 1 – Application Design – The Modular Concept in the Design Guide.
The main interaction of a root-level Module object is to play a welcome message to the caller, to process an embedded sequence of objects, and to play a goodbye message.
To create the Module object for the Tutorial application, do the following:
1. From the New menu, select Module or click the Module button
on the toolbar. An empty Module editor will open up.

2. In the Module editor, enter Life Insurance as the name for the new Module object in the Name field at the top of the editor window.
3. Expand the Welcome Message section by clicking the Maximize button
in the right corner of the toolbar or by clicking the left field of the toolbar.
@8Tip: In Desktop for Web all sections of an object editor that are represented by boxes can be expanded either by clicking the Maximize button
in the right corner of the toolbar or by clicking the left field of the toolbar. To collapse a box again, click the Minimize button in place of the previous Maximize button
, or click the left field of the toolbar again.
Since we have already created a welcome message for the Prime Life Insurance service with creating the Welcome Output object in Lesson 3, we do not have to type the message into the text field in the Welcome Message section but can link the Welcome Output object into it instead.
To link the Welcome Output object into the text field in the Welcome Message section, do the following:
1. Click the Context Menu button
to the right of the text field.
2. From the context menu, select Browse and then Output.
3. In the Search Result window, click the Welcome Output object to link it into the text field.
Your Welcome Message section looks like this now:

1. In the Goodbye Message section, enter an appropriate goodbye message like Thanks for calling. Goodbye!.
2. Leave all other values as default.
3. On the Module Editor toolbar, click Save and Close.
For an overview on all parameters that can be specified in the Module editor refer to Module in the Object Reference.
In the Object Browser, you will now see a Module folder in the Components folder, containing your Life Insurance Module object.

While the Object Browser simply lists all available autonomous objects of a project, the Dialog Designer displays objects within the tree structures of the complete dialog flows they are being used in, and allows you to modify them within this graphical environment. This helps you to keep a clear idea of your dialog even if it becomes very complex.
The Dialog Designer is the main work area of VoiceObjects Desktop for designing and developing applications.
For more information on the Dialog Designer see Chapter 5 – Dialog Designer in the Desktop for Web Guide.
To open the Dialog Designer for the Life Insurance Module object, do the following:
1. In the Object Browser, open the Components folder, and then the Module folder.
2. Select the Life Insurance Module object and right-click it.
3. From the context menu, select Display Dialog. The dialog flow will be displayed in a Dialog Designer in the right-hand pane of Desktop for Web.
Since the Life Insurance Module object doesn´t contain any other objects the dialog flow is very simple. In the course of the Tutorial you will see the display develop into more complex dialog flows.

Each item displayed in the dialog flow represents an object. The top left object of a dialog flow represents the object that you selected to be displayed (in this case the Life Insurance Module object).
If you double-click an object in the Dialog Designer of Desktop for Web the corresponding object editor will open up.
A right-click on an object opens a context menu with a number of commands that are available for that object.
Objects preceded by a plus box [+] include subtrees of one or more objects. Clicking the plus box [+] will expand the corresponding object and display its subtree. Clicking a minus box [-] in front of an object will collapse it.
Object names written in blue correspond to autonomous objects. Autonomous objects are visible and accessible within the Object Browser and can be added to other dialogs.
Object names written in black correspond to embedded objects. Embedded objects are automatically defined inside another object. They are only accessible within their parent object and are not visible from within the Object Browser.
For detailed information on all display features of the Dialog Designer see Chapter 5– Dialog Designer in the Desktop for Web Guide.
Later on you will see how you can manipulate objects within the Dialog Designer to create applications quickly and easily.
In order to test whether your application still works properly, you first need to change the start object of your service to the new Life Insurance Module object.
1. In the Object Browser, open the Service folder in the Configuration folder. Select your Tutorial Service object and double-click it. The corresponding Service editor opens up.
2. In the Application Parameters section, select the Life Insurance Module object as the start object by clicking the Context Menu button
to the right of the Start object field. From the context menu, select Browse and then Module. In the Search Result window, click the Life Insurance Module object and it will be linked into the Start object field.

3. On the toolbar of the Service editor, click Save and Close.
In order to test whether the modified application is still working properly you need to redeploy it.
1. In the Object Browser, right-click the Server object that hosts your service (VOServer).
2. From the context menu, select Control Center to open up the Control Center.
3. In the Service Manager section, select the Tutorial service.
4. Click the Context Menu button
to the right of the Tutorial service and click Redeploy.

You can now call your service again with the telephone number by which it can be reached.
The dialog flow of your application has changed slightly, now consisting of two prompts:
|
Object – Caller |
Dialog Flow |
|
|
Welcome to the Prime Life Insurance service! |
|
|
(EMPTY) |
|
|
Thanks for calling. Goodbye! |
Again, the output “Welcome to the Prime Life Insurance service! will be played back to you over the phone, this time activated by a Module object, followed by a goodbye message.
Next, you will add an Input object to the Life Insurance application, requesting input from the caller.