I was working recently on a SharePoint Workflow project and was exploring some of the Office SDK samples. The latest Office SDK (http://www.microsoft.com/downloads/details.aspx?familyid=6D94E307-67D9-41AC-B2D6-0074D6286FA9&displaylang=en) includes samples that were built for VS 2005 but you can convert nearly all of these over to work with VS 2008 using the .NET conversion wizard. I was exploring one of these samples and found some code that worked with IWorkflowModificationService and then realized that there are at least 4 workflow services exposed by the SharePoint workflow host. The IWorkflowModificationService (as documented at http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.iworkflowmodificationservice_members.aspx) has just a single exposed method for EnableWorkflowModification(). This method performs some of the same functionality that that the activity shape Microsoft.SharePoint.Workflow.EnableWorkflowModification performs. Then I noticed that in the workflow designer in VS 2008 this activity actually has an InterfaceType which referes to IWorkflowModificationService. Interestingly, when I clicked the … on this part of the property box the object explorer filtered my referenced assemblies by ExternalDataExchangeAttribute and gave me the filtered window as seen below:
The items listed above are the four available workflow services provided with the SharePoint Workflow host. For this reason a considerable number of the built-in SharePoint activities are just wrappers that work with the workflow services. This was a very interesting find for me because it helps me to understand the way that workflow services are working under the surface the SharePoint workflow host.
While I was looking at the MSDN documentation for IWorkflowModificationService I also found there is good documentation for these other workflow services including ISharePointService, ITaskService, and IListItemService. Because these are exposed you can quickly come up with the implementation behind most of the built-in SharePoint activities.