Create a Sequential workflow using visual Studio 2010 in SharePoint 2010

sequential workflow in sharepoint 2013 using visual studio 2017

This SharePoint 2010 workflow tutorial explains, how to create a sequential workflow using Visual Studio 2010 in SharePoint 2010.


New to Office 365 SharePoint Online? Get Office 365 Enterprise E3 Subscription & Try out all the features

Create Sequential Workflow using Visual Studio in SharePoint 2010

Follow below steps to create the sequential workflow in visual studio 2010.

1. Create New Project using visual studio 2010.

2. In the New Project dialog box, Select the SharePoint and then select 2010.

3. Now select the Sequential Workflow Template.

4. Enter the name of Workflow and then click ok. See in fig

sharepoint 2010 sequential workflow in visual studio
SharePoint 2010 sequential workflow in visual studio

5. Now enter the site URL that you want to use it for debugging.

6. Select Deploy as a farm solution and then click Next.

7. Now leave the name of workflow and select the List Workflow. See in fig

sequential workflow in sharepoint 2013 using visual studio
sequential workflow in SharePoint 2013 using visual studio

8. Click on Next

9. Now select the list or library to associate your workflow. See in fig

sequential workflow in sharepoint 2013 using visual studio 2012
sequential workflow in SharePoint 2013 using visual studio 2012

10. Specify the conditions for how your workflow should be started. See in fig.

create sequential workflow in sharepoint 2013
create a sequential workflow in SharePoint 2013

11. Click on Finish.

12. See the following code for Workflow1.cs

using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Workflow;
using Microsoft.SharePoint.WorkflowActions;

namespace WorkflowProject1.Workflow1
{
public sealed partial class Workflow1 : SequentialWorkflowActivity
{
public Workflow1()
{
InitializeComponent();
}

public Guid workflowId = default(System.Guid);
public SPWorkflowActivationProperties workflowProperties = new SPWorkflowActivationProperties();
}
}

13. And see the onWorkflowActivated1 properties. See in fig

sequential workflow in sharepoint 2013 using visual studio 2017
sequential workflow in SharePoint 2013 using visual studio 2017

14. Now Save the solution and click on Deploy.

15. Now Open your SharePoint site and go to the custom list to which the workflow is associated by you.

16. Create a new item and you could be able to see a new column name which shows the status of the workflow. See fig.

sequential workflow in sharepoint 2010 visual studio examples
sequential workflow in SharePoint 2010 visual studio examples

17. In this project, I have not added any activity so the workflow status will show completed.

You may like following SharePoint 2010 workflow tutorials:

Hope this SharePoint 2010 workflow tutorial explains, how to create a sequential workflow using visual studio 2010 in SharePoint 2010.

Check out Best Alternative to InfoPath -> Try Now

FREE SHAREPOINT 2019 PDF

(Installation & Features)



About Navneet Singh

I am Navneet Singh, Working at C3it software solutions pvt. ltd. in Pune. My core skills are SharePoint 2013, Office 365, SharePoint 2010, SharePoint Designer, SharePoint Designer Workflow, Nintex Workflow, Infopath, Webpart, CSOM/SSOM, Power-shell, C#, ASP.NET and SQL Server.

View all posts by Navneet Singh →