How to: Create a SharePoint 2007 Workflow Project

You can design workflows to manage the life cycle of documents and list items in a SharePoint web site. To design a SharePoint 2007 workflow, create a SharePoint 2007 sequential or SharePoint 2007 state machine workflow project.

To create a SharePoint 2007 workflow project

  1. In the New Project dialog box, select either the Visual Basic or Visual C# node, select the SharePoint node, and then select the 2010 node.

  2. Select either the SharePoint 2007 Sequential Workflow template or the SharePoint 2007 State Machine Workflow template, type a name, and then click OK.

    The SharePoint Customization Wizard appears. Use this wizard to specify debug configuration settings. The Visual Studio workflow deployment process applies these settings when you debug the workflow template from Visual Studio.

  3. In the Specify the workflow name and site for debugging page, type the name that you want to use to identify the workflow template on the SharePoint server web site.

  4. Type or select the URL of the SharePoint web site that you want to use to run this workflow. This site must be on the local computer.

    Note

    You must have administrator access to the SharePoint web site.

    By default, the SharePoint Customization Wizard uses https://localhost/Docs. This might not be a valid URL on your root SharePoint server web site.

  5. Click Next.

    If the SharePoint web site does not contain a history list, the SharePoint Customization Wizard creates one automatically. A history list is a log that records the events of the workflow—for example, when a workflow starts or a task is created or completed.

    Note

    If the SharePoint Customization Wizard is unable to create a history list on the SharePoint Web site, you will receive an error. To resolve the error, you must manually create a history list on the SharePoint web site. For more information about how to do this, see the Office Online article Add or change a workflow for a list, library, or content type.

  6. In the Select the lists you will use when debugging page, set Library or list to the library or list on the SharePoint web site that you will use to initiate the workflow.

    For example, if your workflow is designed to track a document review process, specify a document library.

  7. Select the Automatically Associate Workflow check box, unless you want to associate the workflow with the list manually.

    Note

    If you select this option, the Visual Studio workflow deployment process adds the workflow template to the specified library or list when you debug the workflow template. If you clear this option, you must add the workflow template manually by using the Add a Workflow administration page in the SharePoint web site.

  8. Set Task list to the task list that you want to use.

    The task list displays the workflow tasks that are available to each workflow participant.

  9. Set History list to the list that displays all the events that occur as the workflow is running.

    If a history list does not exist on the local SharePoint web site, the workflow deployment process creates one.

  10. Click Next.

  11. In the You can specify the conditions for how your workflow is started page, select the workflow start conditions and then click Finish. For information about each condition, see Debugging SharePoint Workflow Solutions.

    After you finish the wizard, the Workflow Designer opens in Visual Studio. Use this designer to create a workflow schedule.

See Also

Other Resources

SharePoint 2007 Workflow Solutions

Creating SharePoint Workflow Solutions