The Goto object lets you abandon the current dialog flow and process a selected object instead. You can also process the object as a sub-dialog and then return to the original position in the dialog flow.
i8 Note: The Goto object should be used sparingly and with caution. In the majority of cases, the intended dialog flow can equally be achieved by simply referencing the destination object directly.
The Object Definition below covers the configuration of the Goto object with VoiceObjects Desktop. For information on how to define this object type using VoiceObjectsXML, refer to the VoiceObjectsXML Definition paragraph.
The Goto object belongs to the object category Logic.
The Definition of the Goto object provides one section:

In addition, the Goto object provides a Reference Library section for advanced use. The Reference Library section does not belong to the actual Definition section but is a separate major section and thus represented as a first level entry in the Outline (and as a separate tab in Desktop for Web).
For further details regarding additional object configuration refer to Precondition and Properties in this Object Reference.
In the Object field, the destination object to be processed next is defined.
The Finish Tasks field defines whether currently active business tasks are to be finished or not when the Goto object is processed. It can be set to None (the default), which means that no task will be finished, Active, which means that only the currently active task will be finished, or All, which means that all tasks, active or inactive, will be finished. In case one or more tasks get finished, they will automatically be marked with status Caller Abort, which means they will be logged as incomplete to Infostore.
If the Return check box is selected, the dialog processing returns to the current position in the active dialog flow after having processed the destination object.
If the Return check box is clear (the default), the currently active dialog flow is abandoned and the destination object is processed. Note that in this case, when the destination object (which might be a Module or a Sequence object, thus a whole sub-application) has been processed completely, the call does not return to the original flow but will simply terminate.
The Goto object offers the capability to process dynamic dialog blocks at call time by referencing a Variable object as the destination object. The content of the Variable object is interpreted as the reference ID of an object, and the corresponding object is processed.

i8 Note: If no object with this reference ID is available, VoiceObjects Server triggers an Error – Internal.
When using this advanced Goto behavior, care must be taken that the objects that are to be dynamically processed are all included within the application definition cache that the server loads when deploying a service (see Chapter 4 – Service Deployment in the Deployment Guide for details). This is best ensured by placing all objects that may potentially be processed into the Goto object’s Reference Library. You can also place these objects inside a Module object. See Module object description in this Object Reference for more details.
The Goto object is represented by the VoiceObjectsXML element <goto>. It has two attributes and two groups of children.
In addition, the element has the standard attributes described in the XDK Guide.
· object [required]
Defines the object to be processed.
· finishTasks
Defines whether business tasks are to be finished or not. One of none, active, all. If not specified, defaults to none.
· return
Defines the return mode. Can either be true or false. If not defined, it defaults to false.
· <expression usage=”precondition”> or
<variable usage=”precondition”> or
<collection usage=”precondition”> or
<script usage=”precondition”>
Defines the precondition for the Goto object.
· <sequence usage=library>
Defines the object library for the Goto object (to ensure that the target object is in the service cache when using dynamic targets).
<goto object=”#MainMenu”/>
The following table contains all the object types that can reference a Goto object. Note that in the overwhelming majority of cases, the use of the Goto object can be replaced by simply using the destination object of the Goto itself.
|
Icon |
Object Name |
Use Case Example |
|
|
A Goto object can be used within the embedded sequence of a Module object. |
|
|
|
A Goto object can be used within a Sequence object in a dialog flow. |
|
|
|
A Goto object can be used as the destination object within a Menu item. |
|
|
|
A Goto object can be used as the destination object within a Correction item inside a Confirmation object. |
|
|
|
A Goto object can be either in the THEN item or the ELSE item of an If object. |
|
|
|
Goto objects can be used in any WHEN item or the ELSE item of a Case object. |
|
|
|
Goto objects can be used within the embedded sequence of a Loop object. |
|
|
|
Goto |
A Goto object can be referenced via a Goto object. Note that while this is technically possible, it normally does not make much sense. |
|
|
A Goto object can be the destination of a Hyperlink object. Note: While being technically possible this should be avoided. |
|
|
Any object type providing |
An object can be processed via a Goto object when a certain event occurs. |
|
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 Goto object should describe the target of the Goto. The short description should contain a brief explanation of what is done within the target dialog flow. The table below lists two examples:
|
Name |
Description |
|
|
After the third No Match event, the dialog is switched to a more guided version to help novice users. |
|
|
Terminate the current dialog flow and jump back to the main menu. Used when the transaction could not be completed successfully. |