Run a SharePoint 3-state workflow on an InfoPath form

Watch a demonstration of how you can run a three-state workflow on an InfoPath form thereby setting the status of the SharePoint workflow either through the completion of SharePoint tasks or from within the InfoPath form itself.

The InfoPath 2010 with SharePoint 2010 video below is a demonstration of how you can run an out-of-the-box three-state workflow on an InfoPath form in SharePoint 2010. The steps to create such a solution have been laid out in the bonus article for InfoPath 2010 Cookbook 2 named Run a SharePoint three-state workflow on InfoPath forms that can be found in the InfoPath 2010 Cookbook 2 Club.

InfoPath 2010 with SharePoint 2010 video transcript

Here I'm in SharePoint 2010, where I've already published an InfoPath form template to this SharePoint form library. In addition, I've also already configured a three-state workflow to run on this SharePoint form library.

So if I click Add document to add a new form, you'll see that as soon as the InfoPath form opens, it will display the status of New here in the Status drop-down list box. I could theoretically speaking send the InfoPath form immediately to Under Review or Approved, but I'll leave it on New for now.

I'll enter some data, and then when I hit Save and save the InfoPath form back to the form library, the three-state workflow will be started. As you can see here, it is In Progress and the status is New. In addition, a task will have been created for the workflow with a status of Not Started.

The normal procedure would be now to do some type of work and then when that work has been completed, I can change the status of the task to Completed. And then when you do that and save the task, you'll see that the workflow will change its status to being Under Review and it is still In Progress. In addition, a new task will have been created - a Review task - with a status of Not Started.

But this solution allows the user to also review the InfoPath form by opening the form and then changing the status of the workflow from within the form itself. So from within the form I'll say that I'm approving this form, so it is Approved. And then when I save the form, you'll see that the workflow is now Completed with a status of Approved. And if I go to the Tasks list, you'll see that the Review task currently is also Completed.

If I were to try to change the status to an older status, so let's say I want to go back to New, you'll see that a validation error will appear saying that the status is invalid. That's because I've added validation to the InfoPath form to prevent an older status from being selected.

See more InfoPath 2010 tutorial videos »

 


Related InfoPath Articles:

 

Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author.

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners

InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013

InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010

InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers

InfoPath 2010 Cookbook 4: 101 Code Recipes for VB Developers

InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services