Share via


Walkthrough: Hello World

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 topic demonstrates the basic operations for creating a Microsoft Unified Communications Managed API application:

  • Create a Unified Communications Managed API application

  • Add instant messaging (IM) functionality

  • Add speech functionality

Prerequisites

For a list of prerequisites, see Walkthrough: Debugging a Communications Workflow Application.

Creating the Hello World Speech Application

To create a speech communications workflow application

  1. In Microsoft Visual Studio 2008 development system, on the File menu select New and then click Project.

  2. In the New Project dialog box within the Project types pane, expand Visual C# or Visual Basic and then click Communications Workflow.

  3. In the Templates pane, click Inbound Sequential Workflow Console Application.

  4. In the Name and Location boxes, enter a name and path for the project and then click OK.

  5. In the Visual Studio 2008Toolbox, expand Unified Communications Workflow.

  6. Drag and drop a SpeechStatement activity onto the design surface in communicationsSequenceActivity1 above disconnectCallActivity1.

  7. In the Properties window, enter hello world as the value for the MainPrompt property.

  8. Create a debugging environment. For information about creating a debugging environment, see Establish Accounts on Office Communications Server.

  9. Update variables in Program.cs. For more information, see “Update Template Code” later in this topic.

To build and debug the application

Creating the Hello World IM Application

To create a IM communications workflow application

  1. In Visual Studio 2008, on the File menu select New and then click Project.

  2. In the New Project dialog box within the Project types pane, expand Visual C# or Visual Basic and then click Communications Workflow.

  3. In the Templates pane click Inbound Sequential Workflow Console Application.

  4. In the Name and Location boxes, enter a name and path for the project and then click OK.

  5. In the Visual Studio 2008Toolbox, expand Unified Communications Workflow.

  6. Drag and drop an InstantMessagingStatement activity onto the design surface in communicationsSequenceActivity1 above disconnectCallActivity1.

  7. In the Properties window, enter hello world as the value for the MainPrompt property.

  8. Create a debugging environment. For information about creating a debugging environment, see Establish Accounts on Office Communications Server.

  9. Update variables in Program.cs. For more information, see “Update Template Code” later in this topic.

To build and debug the application

Update Template Code

An Initialize method is included in Program.cs, added to communications workflow projects by the new project template. The default Initialize method:

  • Initializes the WorkflowRuntime run time

  • Starts the CollaborationPlatform platform

  • Establishes an ApplicationEndpoint endpoint

Use the ApplicationProvisioner sample application to create Active Directory objects and display the settings needed to make the following changes to the default Initialize method in Program.cs. For information about using the ApplicationProvisioner sample application, see the topic Using ApplicationProvisioner in the help file UCMACore2.0.chm.

  • Set the value of the gruu string variable to match the Gruu value displayed in the View Server dialog box.

  • Set the value of the first empty string parameter in the GetLocalCertificate method to match the Server Fqdn value displayed in the View Server dialog box.

  • Set the value of the second empty string parameter in the GetLocalCertificate method to match the name of the local certificate issuer.

  • Set the value of the port number parameter in the ServerPlatformSettings method to match the Listening port value displayed in the View Server dialog box.

  • Set the value of the applicationUri string variable to match the Contact Uri value displayed in the Edit Contact dialog box.

  • Set the value of the ocsFqdn string variable to match the Application pool value displayed in the Application Provisioner window.

  • Set the value of the ocsTlsPort string variable to the port number on which Microsoft Office Communications Server listens for TLS messages.

See Also

Other Resources

Unified Communications Managed API 2.0 Workflow SDK Documentation

Unified Communications Workflow Sample Applications