Step 1: Add a CommandsActivity to a Communications Workflow Application
This is the first of two topics describing the steps to create the Add Commands to a Workflow walkthrough application. This sequence of topics demonstrates how to add command activities to a speech and an instant messaging Microsoft Unified Communications Managed API application using Microsoft Visual Studio 2008 development system. The procedures for creating the walkthrough application build sequentially. Completing the procedures in sequence is important.
In Visual Studio 2008, create a new Inbound Sequential Workflow Console Application.
In the Visual Studio 2008 Toolbox, expand Unified Communications Workflow to display workflow activities.
Drag and drop a SpeechQuestionAnswer activity from the Toolbox onto the design surface in communicationsSequenceActivity1 above disconnectCallActivity1.
In Visual Studio 2008, drag and drop a SpeechStatement activity onto the design surface in communicationsSequenceActivity1 between speechQuestionAnswerActivity1 and disconnectCallActivity1. This statement activity replays the recognition result.
On the design surface, right-click speechStatementActivity1 and then click Generate Handlers.
In the event handler, add the following statements:
string response = this.speechQuestionAnswerActivity1.RecognitionResult.Text; this.speechStatementActivity1.MainPrompt.SetText("you said" + response);
In the workflow designer right-click communicationsSequenceActivity1 and then click View Commands. The command workflow designer appears, as shown in the following topic, Step 2: Construct a Workflow in the CommandsActivity.