Workflow Designer: What properties appear in the Properties pane when activities are multi-selected?

When multiple activities are selected in the Workflow Designer surface with ctrl+click, it’s not immediately obvious which properties appear in the Properties pane, and can be set on multiple activities at a time. When activites are multi-selected, the following properties appear in the Properties pane: Properties that have a common name across all the selected…


Validation error message: "An error occurred while attempting to extract the target object of type ‘System.Activites.InArgument’ from the method call expression <activity><property>.Get"

When using the (non-Generic) version of InArgument, you may see the following error message during validation: The private implementation of activity ‘<activity>’ has the following validation error: “An error occurred while attempting to extract the target object of type ‘System.Activites.InArgument’ from the method call expression <activity><property>.Get”. Note that the expression determining the object of type…


Cancelling an AsyncCodeActivity

Even when AsyncCodeActivity.Cancel is called, the activity will still execute the EndExecute method, so it isn’t immediately obvious why a second path of execution is necessary. Implementing this method is useful only when AsyncCodeActivityContext.MarkCanceled is implemented, which in turn is useful mainly when cancellation is meaningful for the underlying operation (i.e. if work already completed…


WF 4 SqlWorkflowInstanceStore: Supported SQL Server versions

The SqlWorkflowInstanceStore is an out-of-box instance store implementation in Workflow 4 that uses Sql Server to store instances. This instance store was written to use the following databases: Sql Server 2005 Sql Server 2008 Unsupported versions include: Earlier versions of SQL Server All SQL Server Compact versions (since SQL Server compact does not support stored procedures, which…


Using a SymbolResolver to access host environment information

To access environment information from within an activity, you’ll need to use the System.Activities.Hosting.SymbolResolver class. Here’s the code to add the symbol resolver to the workflow application: class Program{    static void Main(string[] args)    {        WorkflowApplication WFApp = new WorkflowApplication(new Workflow1());        SymbolResolver symbolResolver = new SymbolResolver();        WFApp.Extensions.Add(symbolResolver);        symbolResolver.Add(“CustomObject”, new SymbolUserActivity.MyObject() { MyValue = 1, MyString =…


WF 3.5 Persistence and Tracking: Two databases or one?

This refers to the previous version of Workflow, but it came up in a recent discussion, so I thought I’d share the relevant points. When developing a Workflow solution that uses persistence and tracking, you may wonder if you should run the scripts for both schemas on the same database, or create separate databases for…