How to enable a Visual Studio workflow on SharePoint and attach it to a document library

Learn how to enable a custom Visual Studio workflow on SharePoint and associate a custom Visual Studio workflow with a document library.

ADVERTISEMENTS

Before you can use a Visual Studio workflow on a list, library, or content type in SharePoint, the workflow’s feature must have been installed and activated on a SharePoint site.

Checking whether a workflow has been installed and activated

To check whether a workflow has been installed and activated:

  1. On the Site Actions menu of the root site of a SharePoint site collection, click Site Settings.
    Site Settings menu item on the Site Actions menu of a SharePoint site.

    Site Settings menu item on the Site Actions menu of a SharePoint site.

  2. On the Site Settings page under Site Collection Administration, click Site collection features.

    Site collection features on the Site Settings page of a SharePoint site.

    Site collection features on the Site Settings page of a SharePoint site.

  3. On the Site Collection Features page, check whether the name of the workflow is present and whether its Status is set to Active. If its Status is not set to Active, click the Activate button to activate the workflow.

    Workflow features on Site Collection Features page of a SharePoint site.

    Workflow features on Site Collection Features page of a SharePoint site.

Attaching a Visual Studio workflow to a document library

To associate a Visual Studio workflow with a document library:

  1. Go to the document library to which you want to add a workflow.
  2. On the Settings menu, click Document Library Settings.

    Document Library Settings menu item on the Settings menu of a document library on a SharePoint site.

    Document Library Settings menu item on the Settings menu of a document library on a SharePoint site.

  3. On the Customize Document Library page under Permissions and Management, click Workflow settings.

    Workflow settings on the customize page of a SharePoint document library page.

    Workflow settings on the customize page of a SharePoint document library page.

  4. On the Add a Workflow page, select a workflow template and follow the instructions on the page to configure the workflow.

The steps described above also apply when you want to attach a SharePoint out-of-the-box workflow to a document library.

Related Articles

ADVERTISEMENTS