Workflows with Visual Studio 2010

Only workflows with 3.5, not compatible with framework 4.0. SharePoint is not in cycle with the Framework releases.

SharePoint Designer can now create a reusable Workflow template that can be saved as a WSP that can be imported into Visual Studio. It is one way from SharePoint designer into Visual Studio, you can't take it back out and use it in SharePoint designer again.

There is something called SPWebConfigModification that looks like you can add entries to the web.config programmatically.

You can use the server explorer in Visual Studio and the new SharePoint server view to navigate to locations on the site by right clicking and selecting 'View in Browser'.

Important point when your importing workflows, you can't import just the workflow, there is only a template for creating an import project that imports all of it to a new project.

This is good, he's discussing how you can give users SharePoint designer to create workflows, then when they submit them you can import them into Visual Studio and validate them before they are used. You can provide them extra actions by building them in Visual Studio that will then show up in SharePoint designer.

Nice uses for Workflows now that they can be associated just with a Site:

  • Accessing External Data through the BCS
  • General Business logic
  • Managing Site Permissions
  • Managing Site or Item (across) access

Site Workflows

  • Manage the workflows under Site Actions
  • The workflows must be started manually
  • Must either initiate them programmatically or create a workflow initiation form (template in Visual Studio 2010)

When you create a workflow, when you select the type of workflow to create you cannot change it. So a list workflow is always a list workflow, and a site workflow is always a site workflow and never the twain shall meet.

He demonstrated how he created a workflow that creates a task when someone wants to have a blog. Once he approves the task, it runs the custom activity that creates a new sub site and applies the blog template. Shows that you can use Site Workflows for administration tasks.

EDS – External Data Exchange allows modeling of communication to a workflow. It implements interfaces for how to communicate to workflows and out of workflows. Allows for simpler communication to the workflow from ASPX pages, or an application that doesn't require extra work.

Workflow runtime handles storing the state of the workflow after a message is sent out. When a message is returned to the workflow, the WF runtime restores the workflow from storage and then passes the message to the workflow. Important note, you will still need the instance id of the workflow to pass messages back in.

OOoh, just saw a new navigation feature on 2010. There's a little folder that shows you the breadcumb in tree format, VERY slick!

Lots of demos, and it's kind of tricky figuring out what is new and what is carried over.

The communication functionality and the Site Level workflows really add quite a bit of power to workflows. Like he said, there's not really any one gee whiz feature in workflows, they've just added some nice pieces that make it much easier to develop workflows and more flexibility.

Workflow 4.0 is not an incremental update, it's basically a re-write.


  • Workflows are a powerful way to model functionality in SharePoint
  • Improvements to the engine and tools in SharePoint Server 2010/Visual Studio 2010 make Workflow an even more attractive way to develop in SharePoint
    • SPD Export
    • EventReceivers
    • Local Services
    • Visual Studio tools