Pluggable Workflow Services
Last modified: April 16, 2010
Applies to: SharePoint Foundation 2010
Pluggable workflow services provide a mechanism that allows external applications or components to programmatically communicate with workflow instances currently running on the server.
In Windows SharePoint Services 3.0, workflows could respond to a limited number of events. To extend workflow capabilities, developers were required to have a workflow call an external service through code, and then write a Web service that took parameters in order to update a specific running workflow instance. The new workflows in Microsoft SharePoint Foundation 2010 offer broader extensibility than workflows from earlier versions, allowing interaction and response to a greater number of custom events, both internal and external. SharePoint Foundation gives a developer a means of coding workflows to listen for certain external events.
Pluggable workflow services provide a means for workflows to execute up to a specified point, and then wait for information from an external process.
The following is the flow of data as a pluggable workflow service starts:
The workflow code starts and loads the workflow engine.
The workflow engine reads channel classes and assemblies from the configuration file.
Channels are loaded from the Global Assembly Cache (GAC) and the workflow runtime is started.
SPWorkflowService is the abstract class that provides services access to the basic functionality and data. All pluggable services must inherit from this class.
Using pluggable services in a workflow to receive communications from external shipping system
A company has built an extensive order-handling system by using SharePoint Foundation. Each order is represented by a list item in their order list. They use workflows to automate their business processes from order entry to fulfillment. However, for shipping they use various carriers for delivery to their customers worldwide.
Recently they have had some challenges with getting timely updates from the shipping companies and integrating this information in the details of the order. They need a way to automatically receive updates from the shipping company so that their order information is constantly up to date. The shipping companies offer automated systems to notify customers of the delivery status of their shipments.
By using pluggable workflow services, their developer can pause the workflow while it waits for delivery notification from the shipper. When the workflow receives the delivery status, it updates the SharePoint list and continues to the next step in the workflow, which is invoicing.