SetTaskStatusActivity 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.

Sets the parameters of a specified logging task.

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

Syntax

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

Remarks

A task can be thought of as a logical sequence of speech activities aimed at a single objective in the interaction. A task has a name, an exit status, and a message. Tasks can be nested so that, for example, a GetCreditCardInfo task can be a subtask of a FinalizeCheckOut task. A given task generally consists of a sequence of dialog turns, but this is not a requirement. Tasks are completely virtual constructs: there is no class that directly represents a task. One SetTaskStatusActivity is used to mark the beginning of a task, and a second is used to mark the end of the task. When a task contains a branch in its control logic, each branch can contain a SetTaskStatusActivity to mark the end of the task.

When a SetTaskStatusActivity is executed, it provides the values for an entry that is recorded in the trace log for the application. For more information, see Logging Administration and the other topics in that section. The entry that is recorded on entry to the task, TaskEnteredEvent, contains default values for the task (which do not appear in the log under normal circumstances) and generic information about the task, such as time stamp, thread and process IDs, and its location. When the task finishes execution, a TaskExitedEvent is recorded that contains information similar to that described for the TaskEnteredEvent. Following the TaskExitedEvent is a TaskStatusEvent, which contains the TaskMessage and TaskStatus.

To signify the start of a task, drag and drop a SetTaskStatusActivity onto the Workflow Designer design canvas above the first task activity. Specify the TaskMessage and TaskName and a TaskStatus of Unset for this SetTaskStatusActivity. To signify the end of a task, drag and drop a second SetTaskStatusActivity onto the design canvas below the last task activity. The TaskName for the ending SetTaskStatusActivity must be the same as that for the first SetTaskStatusActivity. The TaskMessage should be set to an appropriate value and TaskStatus should be set to Success or Failure, depending on the outcome of the task. Because a task can end in success or failure, there should be two SetTaskStatusActivity instances marking the end of the task, each in its own branch. The Speech Server LoggingInstrumentation sample has a structure similar to what has been described here. For more information about this sample, see LoggingInstrumentation (Managed Code Sample).

Inheritance Hierarchy

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

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

SetTaskStatusActivity Members
Microsoft.SpeechServer.Dialog Namespace