GoToActivity Class

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Assists in transferring control flow from a given activity to a child activity of an ancestor of the given activity.

Namespace: Microsoft.SpeechServer.Dialog
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)

Syntax

'Declaration
<ActivityValidatorAttribute(GetType(GoToActivityValidator))> _
<ToolboxBitmapAttribute(GetType(GoToActivity))> _
<GlobalizedCategoryAttribute("MSSCategory")> _
<DesignerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechExpandableDesigner, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType(IDesigner))> _
<GlobalizedDescriptionAttribute("GoToActivity")> _
Public NotInheritable Class GoToActivity
    Inherits Activity
[ActivityValidatorAttribute(typeof(GoToActivityValidator))] 
[ToolboxBitmapAttribute(typeof(GoToActivity))] 
[GlobalizedCategoryAttribute("MSSCategory")] 
[DesignerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechExpandableDesigner, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(IDesigner))] 
[GlobalizedDescriptionAttribute("GoToActivity")] 
public sealed class GoToActivity : Activity

Remarks

The target of a GoToActivity must be a child of an ancestor (parent, grandparent, great-grandparent, and so on) of the GoToActivity. In addition, the ancestor must be a SpeechSequenceActivity or one of its derived classes (CommandActivity, SpeechEventActivity, or SpeechSequentialWorkflowActivity).

For example, using the following diagram for reference, suppose that your speech application has a workflow that contains an IfElseActivity labeled ifElseActivity1, with two branches labeled ifElseBranchActivity1 and ifElseBranchActivity2. Suppose further that ifElseBranchActivity1 contains a GoToActivity labeled goToActivity1. The target of goToActivity1 cannot be ifElseBranchActivity2. The reason for this is that the parent of ifElseBranchActivity2 is ifElseActivity1, which is not a SpeechSequenceActivity (or one of the three classes derived from it). However, because ifElseActivity1 is a child of the workflow (type SpeechSequentialWorkflowActivity), ifElseActivity1 can serve as the target for goToActivity1. If you implement application logic similar to this, consider that when ifElseActivity1 is executed as a result of a jump to it, the condition or rule that determines the branch to take is evaluated again. If you want ifElseBranchActivity2 to be executed, change the value of the variable in the condition or rule to ensure that this happens.

Bb662171.b57ae58f-1d41-48a0-9027-bab92dc8a9c3(en-us,office.12).jpg

Inheritance Hierarchy

System.Object
???? System.Workflow.ComponentModel.DependencyObject
???????? System.Workflow.ComponentModel.Activity
????????????Microsoft.SpeechServer.Dialog.GoToActivity

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Windows Server 2003

See Also

Reference

GoToActivity Members
Microsoft.SpeechServer.Dialog Namespace