Compartilhar via


Simple Input Sample

Download sample

This sample illustrates the use of queues to send data into a workflow. It demonstrates the use of four API calls that are required to send data into a workflow using a WorkflowQueue object.

  1. The sample includes a custom activity that creates a named queue, subscribes to an event that indicates when a queue item is available, and dequeues an item from the queue. The host application contains the code that enqueues the item.

The test workflow is written to use the custom activity in a loop. The workflow will keep dequeuing items (which are assumed to be strings) until it finds the string "exit", at which point the loop and the workflow end.

To build the sample

  1. Download the sample by clicking Download Sample.

    This extracts the sample project to your local hard disk.

  2. Click Start, point to Programs, point to Microsoft Windows SDK, and then click CMD Shell.

  3. Go to the source directory of the sample.

  4. At the command prompt, type MSBUILD <Solution file name>.

To run the sample

  1. In the SDK Command Prompt window, run the .exe file in the SimpleInput\bin\debug folder (or the SimpleInput\bin folder for the Visual Basic version of the sample), which is located below the main folder for the sample..

See Also

Other Resources

Correlated Local Service Sample
Communications Samples

© 2007 Microsoft Corporation. All rights reserved.