Execution Properties

This topic applies to Windows Workflow Foundation 4 (WF4).

This sample shows how to define and use an execution property in a custom activity. In this example, the execution property determines the console's foreground color. An example workflow shows how different logical paths of execution (branches of a Parallel activity) can maintain different console colors despite interleaved execution of activities (across the branches of the Parallel activity).

To set up, build, and run the sample

  1. Open the ExecutionProperties.sln sample solution in Visual Studio 2010.

    Note

    Viewing ThreeColors.xaml before building the solution displays an error, because the custom activities used must be built at the same time as the solution.

  2. Build and run the solution.

Dd744845.Important(en-us,VS.100).gif Note:
The samples may already be installed on your computer. 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\WF\Basic\CustomActivities\Code-Bodied\ExecutionProperties