Step 4: Recognizing Order Status Responses
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.
This is the last of four topics describing the steps to create the Create an Automated Call Distributor walkthrough application. This sequence of topics demonstrates how the various capabilities of communications workflow activities can be combined to implement a basic Microsoft Unified Communications Managed API call distributor application using Microsoft Visual Studio 2008 development system. The procedures for creating the walkthrough application build sequentially. Completing the procedures in sequence is important.
To ask the user for their order number
In the Visual Studio 2008Toolbox, expand Unified Communications Workflow to display workflow activities.
Drag and drop a SpeechQuestionAnswer activity from the Toolbox onto the design surface in ifElseOrderStatus, above promptStatus.
Rename the question answer activity to qaOrderNumber.
Set the MainPrompt property for qaOrderNumber to What is the order number?
Specify user inputs for the qaOrderNumber.ExpectedSpeechInputs property so that the activity will recognize the words one, two, and three. For more information, see Authoring Grammars.
In the next procedure, a final IfElse activity to handle answers containing order numbers is added to the workflow.
To add an IfElse activity for order numbers
In the Toolbox, expand Windows Workflow 3.0 to display the core workflow activities.
Drag and drop an IfElse activity onto the design surface between qaOrderNumber and promptStatus.
Rename the new activity to ifElseOrderNumber. Rename the left branch to ifElseNumberOne and rename the right branch to ifElseNumberOther.
On the left branch, ifElseNumberOne, add a code condition called conditionOrderOne, and then add the following code.
e.Result = (this.qaOrderNumber.RecognitionResult.Text == "one");
Drag and drop promptStatus onto ifElseNumberOne.
On the design surface, drag and drop a SpeechStatementActivity onto ifElseNumberOther. Rename the activity as promptBackOrder. Set the MainPrompt property to This item is back ordered.
To build and debug the application
Create a debugging environment. For information about creating a debugging environment, see Establish Accounts on Office Communications Server.
Debug the application. For information about debugging applications, see Walkthrough: Debugging a Communications Workflow Application.