Chapter 14. Building SharePoint Workflows
In This Chapter
Scanning the workflow options
Coding workflows in VSTO
Putting workflows to work
Users can build simple workflows in SharePoint Designer, but to create workflows that integrate with other services or program code, you have to use Visual Studio. You can build a workflow in Visual Studio using the New Project template for SharePoint workflows.
Workflow templates come in two types:
The Sequential workflow is like a flowchart. It's triggered by one event and goes from the top to the bottom, making decisions and transformations as it goes. It's just a line of
If
statements.The State Machine workflow is like a pinball machine. It starts in one place and then is bounced around from state to state by events. This workflow works like a Windows application with buttons.
Starting a Fresh Workflow
For this example, you start with a simple sequential workflow. Workflows are complicated enough that you aren't going to find out everything that they can do in this chapter, but we give you enough to get you started. MSDN can help you from there on out.
To start a workflow:
Click Create Project in the Visual Studio Start Page.
Select SharePoint and then 2010 from the tree view on the left side of the New Project dialog box.
Select the Sequential Workflow and name the project Example Workflow.
The name isn't very original, we know.
Accept the defaults for the name and the trust level and click Next.
Accept the defaults in the Workflow Type Selection dialog ...
Get VSTO For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.