An Approval Workflow for SharePoint 2010 with Visual Studio 2010 and Infopath 2010



I have developed an Approval Workflow that can be deployed on SharePoint 2010 and can be associated to any list or library; it has been developed using Visual Studio 2010.
This workflow creates approval tasks for the person who is responsible for the approval, you might think this similar to a usual SharePoint approval workflow, so here we are, to add the touch of spice to this solution, I want to throw some light on the task form, here I am using an InfoPath form when you go and edit this task. This opens up a hell lot of options to play with as InfoPath form is completely customizable. So you can modify the solution and the form as per your needs and requirements very easily.

Open property window of State Machine Workflow & add the following values to the properties :

Receiver Assembly = Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
Receiver Class = Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver
As a part of this package we are also providing you with the source code, the InfoPath form used and a WSP file as an example of how you can use this solution.
Enjoy !!!

Comments

Azeem @ TN said…
Hi Gaurav,

Thanks for the post. When I try to open the xsn form in VS.net 2010, I get the following message:

Forms that require the domain permission level contain features that access information on a network, such as data connections, linked images, and code

Any idea ?

Thanks,
Azeem
Azeem @ TN said…
Many Thanks for the post. While I was trying to open the Infopath form on Visual Studio 2010, I got the following message:

Forms that require the domain permission level contain features that access information on a network, such as data connections, linked images, and code.

Any idea ?

Thanks,
Az
Hi, Nice and informative post. I like this blog. SharePoint Consulting can provide a business with custom web parts and administrative tools. This helps an organization with development projects.
Anonymous said…
Hi,

I have a small issue to develop 2 step approval workflow in Visual studio. Below is my problem.

Can you please guide me to develop a visual studio workflow in SharePoint 2010 foundation? I Can't use in built approval workflow in Sharepoint designer because, Sharepoint foundation is not supports this workfow. So I have to go with VS only.

My requirement is like this. There are 3 roles - Entry Clerk, Supervisor, Manager.
Same way 3 status - Pending Verification, Require Clarification, Approved.

Entry officer will enter the list item and submit it. A task will generate for supervisor with status pending verification. If supervisor will rejects the item then status of the item will be require clarification else status will be approved. In case of rejection, task will be create for entry officer. Entry officer can resubmit the task wit modified values. Again the same process will go on still item approve. So any one guide me to develop this kind of workflow in VS 2010.

-Sai
Anonymous said…
Hey Its not working Properly, InfoPath Form is not opened when i edit the task. is there any setting for that?

Popular Posts

SharePoint Interview Questions and Answers

Download Infopath Form Templates

How to get current logged user information using JavaScript ?

Steps to set Form based authentication (FBA) for SharePoint 2010

SharePoint Interview Questions and Answers II

Get List Items - JavaScript

Cross Site List Rollup Web Part for SharePoint 2010

Hide Recently Modified Items

Change Language for current user with JSOM in SharePoint Online

SharePoint 2010 CSS Chart