.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Workflow History not found in SharePoint

Posted By:Jean Paul       Posted Date: September 27, 2013    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article we can explore a common scenario associated with creating Workflows in Visual Studio 2010.

In this article we can explore a common scenario associated with creating Workflows in Visual Studio 2010.


You are creating a workflow through Visual Studio 2010.  The SharePoint 2010 templates are installed and while selecting Workflow template and entering site url you receive the following error:

The SharePoint site at URL is missing a target, task, or history list.  Each of these lists is required to associate a workflow template.  Please create a list and then launch this wizard.

Root Cause

Workflow requires the following lists for its working:
·  Workflow History of Template 140
·  Workflow Tasks of Template 107


There are many solutions to the above problem like:
1.  Create a new site from a site template that includes Workflow History & Task list (Example Team Site template)
2.  Create the 2 lists Programmatically
3.  Create the 2 lists using PowerShell
Here I would apply the second solution, using C# code to create the 2 lists.


Create a new SharePoint Console Application and change the project properties as:
·  Target Framework to 3.5
Add the following code to the Main() method.  Please change your url accordingly.


class Program
  private static string URL = "http://yourblanksite";

  static void Main(string[] args)
  using (SPSite site = new SPSite(URL))
  using (SPWeb web = site.OpenWeb())
  web.Lists.Add("Workflow History", string.Empty, SPListTemplateType.WorkflowHistory);
  web.Lists.Add("Workflow Task", string.Empty, SPListTemplateType.Tasks);


Execute the above code and if it completed without errors, your problem is solved. 


Inside SharePoint you can verify our new lists as shown below.


Inside Visual Studio 2010, try creating the workflow again and you should not see the error.  The select lists page should display the new lists which we have created. 

Please note that the lists are displayed here based on their Template Id.

Template Enumeration Reference

You can refer the Template Enumeration (SPListTemplateType) here.

Name Description
InvalidType Not used. Value = -1.
NoListTemplate unspecified list type. Value = 0
GenericList Custom list. Value = 100.
DocumentLibrary Document library. Value = 101.
Survey Survey. Value = 102.
Links Links. Value = 103.
Announcements Announcements. Value = 104.
Contacts Contacts. Value = 105.
Events Calendar. Value = 106.
Tasks Tasks. Value = 107.
DiscussionBoard Discussion board. Value = 108.
PictureLibrary Picture library. Value = 109.
DataSources Data sources for a site. Value = 110.
WebTemplateCatalog Site template gallery. Value = 111.
UserInformation User Information. Value = 112.
WebPartCatalog Web Part gallery. Value = 113.
ListTemplateCatalog List Template gallery. Value = 114.
XMLForm XML Form library. Value = 115.
MasterPageCatalog Master Page gallery. Value = 116.
NoCodeWorkflows No Code Workflows. Value = 117.
WorkflowProcess Custom Workflow Process. Value = 118.
WebPageLibrary Wiki Page Library. Value = 119.
CustomGrid Custom grid for a list. Value = 120.
SolutionCatalog Solutions. Value = 121
NoCodePublic No Code Public Workflow. Value = 122
ThemeCatalog Themes. Value = 123
DataConnectionLibrary Data connection library for sharing information about external data connections. Value = 130.
WorkflowHistory Workflow History. Value = 140.
GanttTasks Project Tasks. Value = 150.
Meetings Meeting Series (Meeting). Value = 200.
Agenda Agenda (Meeting). Value = 201.
MeetingUser Attendees (Meeting). Value = 202.
Decision Decisions (Meeting). Value = 204.
MeetingObjective Objectives (Meeting). Value = 207.
TextBox Text Box (Meeting). Value = 210.
ThingsToBring Things To Bring (Meeting). Value = 211.
HomePageLibrary Workspace Pages (Meeting). Value = 212.
Posts Posts (Blog). Value = 301.
Comments Comments (Blog). Value = 302.
Categories Categories (Blog). Value = 303.
Facility Facility. Value = 402
Whereabouts Whereabouts. Value = 403
CallTrack Call Track. Value = 404
Circulation Circulation. Value = 405
Timecard Timecard. Value = 420
Holidays Holidays. Value = 421
IMEDic IME (Input Method Editor) Dictionary. Value = 499
ExternalList External. Value = 600
IssueTracking Issue tracking. Value = 1100.
AdminTasks Administrator Tasks. Value = 1200.
HealthRules Health Rules. Value = 1220
HealthReports Health Reports. Value = 1221

The link is added in the References section too.




In this article we have explored a common error scenario associated with workflow creation and a solution for it.

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend