Partilhar via


Workflow Discovery Sample

This sample demonstrates how to make a workflow service discoverable and how to author a custom code activity that searches for a particular service.

Demonstrates

Discovery Find Activity and Workflow Usage

Discussion

In the first part of the sample, a workflow service is made discoverable using configuration. Configuration can also be used to apply the service appropriately with custom metadata (such as scopes). On the client, the sample uses a custom code activity, which uses Discovery to search for a service matching a particular contract. The code activity outputs a URI, which is later used by a send activity.

To set up, build, and run the sample

  1. This sample uses HTTP endpoints, which must have proper URL ACLs to run (see Configuring HTTP and HTTPS for details). Executing the following command at an elevated command prompt should add the appropriate ACLs. Substitute your Domain and Username for the following arguments if your shell does not understand the variable format.

    netsh http add urlacl url=http://+:8000/ user=%DOMAIN%\%UserName%

Ee818237.Important(en-us,VS.100).gif Note:
The samples may already be installed on your machine. Check for the following (default) directory before continuing.

<InstallDrive>:\WF_WCF_Samples

If this directory does not exist, go to Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4 to download all Windows Communication Foundation (WCF) and WF samples. This sample is located in the following directory.

<InstallDrive>:\WF_WCF_Samples\WCF\Basic\Discovery\WorkflowDiscovery