Attach workflow to content type in SharePoint 2010

This SharePoint workflow tutorial explains, how we can attach a workflow to a content type in SharePoint 2010.

A SharePoint workflow can be attached to a list, site or to a content type in SharePoint 2010. But there are only two options in the workflow wizard: list or site workflow. So how do you associate the workflow with a content type? In order to associate the workflow with a content type, you have to change the AssociationCategories element value in the workflow’s Elements.xml file to ContentType.

For this Double-click the Elements.xml file for the workflow to open it.

Locate the AssociationCategories element and change its value to ContentType like:

<AssociationCategories>ContentType</AssociationCategories>

Click on the Workflow1 project item folder and open the Properties window. And change the value of the Auto Associate property from True to False.

Then press F5 to build, package and deploy the project.

Then go to the Site Actions ->Site Settings and under document content types click the Document content type.

You may like following SharePoint workflow tutorials:

Now click the workflow settings link, the Workflow settings page is displayed. Click the Add a workflow link, the add a workflow page will be displayed and from there you can select the workflow for the content type.

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

>