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…


Piping the result of Activity<T> to another activity as an input argument

Expression activities (that is, activities that return a value, inheriting from Activity<T>, CodeActivity<T>, NativeActivity<T>, or AsyncCodeActivity<T>) return a value, the type of which is specified in the generic parameter <T>. To begin with, custom expression activities have a property called Result: http://msdn.microsoft.com/en-us/library/dd987724.aspx When your custom activity executes, it’s this property that must be set in…


Rules and rulesets in Workflow 4

It’s always difficult to find the lack of something in a search engine. Rulesets, a feature of Workflow 3, are not a feature of version 4, so it might be frustrating to try to deduce this from the existing documentation. When conditional operations are needed in WF4, the If activity is the option of choice-…