다음을 통해 공유


InstantMessagingBot (Communications Workflow Sample)

This sample instant messaging (IM) workflow application demonstrates how to implement a generic IM bot program using communications workflow activities. In this sample, data is stored in a Microsoft SQL Server database and accessed using ADO.NET. The script to create the data structures in the database is located in CreateDatabase.sql. The script to populate the data structures is located in PopulateDatabase.sql.

The bot asks the user a series of questions to pinpoint the troubleshooting topic of interest for them. The bot also lets the user choose to start over, quit the application, or choose to go back to a previous question.

  • Use the Resources class to dynamically set prompt properties, for example MainPrompt and SilencePrompt, of the InstantMessagingPrompts class.

  • Use semantic interpretation markup to create a grammar from a list of categories.

  • Use the SrgsSemanticInterpretationTag class to set the value of array items in an SrgsItem class.

  • Use the StringBuilder class to construct prompts.

Prerequisites

See the prerequisites list in Walkthrough: Debugging a Communications Workflow Application.

Running the Sample

To build and debug the sample application

  1. Create a debugging environment. For information about creating a debugging environment, see Provision and Deploy a UCMA Workflow Application.

  2. In the %ProgramFiles%\Lync Server 2010\UCMA v3.0 SDK\Samples\Workflow directory, open InstantMessagingBot.

  3. Debug the InstantMessagingBot IM workflow application. For information about debugging this application, see Walkthrough: Debugging a Communications Workflow Application.

See Also

Other Resources

Unified Communications Managed API 3.0 Workflow SDK Documentation