Table of Contents

  • Introduction
  • Setting the Scene
  • Custom List
  • Building the Forms
    • New Class View
    • Legal Administrator View
    • Requester View
    • Chaser View
    • Completed View
  • Form Load Dominion
    • New Form View Rule
    • Legal Ambassador Form View Rule
    • Requester Class View Rule
    • Attorney Class View Rule
    • Completed Form View Rule
  • Form Videos
  • Edifice the Workflow
    • Workflow Videos
    • Contract Submitted
    • Returned to requester (Loop weather condition)
    • Sent to Attorney
    • Attorney Reviewing
    • Returned to Requester by Attorney
    • Negotiating Terms
    • Attorney Review Completed
    • Contract Executed
  • Conclusion
  • Come across Also

Introduction

In SharePoint 2013 Designer, SharePoint 2013 workflow at present comes with a new characteristic called Loop where a series of actions are executed repeatedly for as long as the specified conditions are met. However, with the correct prepare of conditions and actions the same be achieved in SharePoint 2010 workflow as well. In this article I am going to provide a pace-by-step detail of how a loop workflow can be congenital using a custom SharePoint 2010 listing, SharePoint 2010 Designer and InfoPath 2010 designer. In this example a Site collection with SharePoint 2010 Enterprise feature has been enabled.

Setting the Scene

A legal department needs a custom list, class and workflow where businesses can submit contracts to be reviewed and canonical. The forms and workflow should provide the option to render the contract back to the requester for farther data or for negotiation purposes. Below is a diagrammatic view of the workflow

Custom List

I take created a custom list called Contract Requests. I and then created a SharePoint group chosen Attorneys and given them Contribute admission. I take added all the attorneys to this group. In the List Settings nether General Settings click on Versioning settings as shown below.

Below is a screenshot of the Versioning settings. For this instance I accept set the limit as 16, even so, you tin alter that to your discretion. This setup is necessary for the cascading comments added by end users to the items throughout the life of the contract workflow.

Below is a screenshot of all the custom columns I have created for this list.

For the Choice columns, I take provided the choices as shown below.

Current Status Choices:

  • New
  • Awaiting additional information from requester
  • Request submitted
  • Sent to chaser
  • Attorney reviewing in procedure
  • Negotiating terms
  • Attorney review completed
  • Contract executed

Current WF Status Choices:

  • New
  • In-Progress
  • With Emily
  • With Attorney
  • With Requester
  • Completed

Below are screenshots of Action Required, Attorney and Loopback Control columns

I have also created 9 different views for this listing, 8 views match the 8 different choices in the Current Status column and the ninth is In-Progress view.

Beneath are screenshots of the filter I have applied for the In-Progress view.

Building the Forms

This department talks virtually building the spider web based form congenital using InfoPath designer 2010. This class is going to have the following five views.

New Form view

Requester View

Legal Ambassador view

Attorney View &

Completed view.

Specific weather are going to be applied based on which the forms will displayed. These atmospheric condition are met at a specific step of the workflow. Hence the views of the form are dependent on the workflow. Open up the list in InfoPath Designer 2010 straight from SharePoint using the Customize Form option from the ribbon. This option is available simply in the SharePoint Enterprise characteristic. The initial view of the class is every bit shown beneath. Discover the Action Required field is now a Repeating Department. This is why we turned on the Versioning Settings as shown before.

I am going to add all the controls and title in this default form and then make copies of it to make custom forms. In the forms I am going the delete the titles and controls non needed. Likewise, the abolish push for all the views accept the same action which is to close the course hence I am going to add that activity in the default form.

Below is a screenshot of the default view shown both in InfoPath designer and the web form. I have also provided a screenshot of the cancel button action.

InfoPath Designer

Web based grade

Now we are going to build the 5 custom views. The key thought I want to describe are the fields viewable and the Manage Rules I have setup on the Submit button for each of the Views.As I stated above all the cancel buttons have the aforementioned activity hence I made that once modify in the original default course.

New Form View

Below is the look and experience of the new form view.

Click on the Submit button and add an Action Dominion. Give it a proper noun that makes sense such as 'SubmitButton'. Exercise non make any changes to the condition. Add three actions, 1st set up Current Status = 'Sent to Attorney', 2nd Submit data and tertiary close this grade. Below is a screenshot

Legal Administrator View

Below is the look and feel of the Legal Administrator view. As you tin see we have added the 'Current Condition' and the 'Attorney' columns.

Click on the Submit push and add an Action Rule. Give it a proper noun that makes sense such equally 'SubmitButton'. Practise not make any changes to the status. Add 3 actions, 1st prepare Current Status = 'Sent to attorney', 2nd Submit information and 3rd close this form. Below is a screenshot

Requester View

This view is built for the requester when the contract request has been re-turned back for either more information or for negotiation. Below is the expect and feel of this view

Click on the Submit push button and add an Activeness Rule. Give it a name that makes sense such as 'SubmitButton'. Practice not make whatsoever changes to the condition. Add together three actions, 1st set up Loopback Command = 'ane', 2nd Submit data and 3rd close this course. Below is a screenshot

Attorney View

Below is the look and feel of the attorney view which is very like to the legal administrator view.

Click on the Submit push button and add an Action Rule. Give information technology a name that makes sense such equally 'SubmitButton'. Do non make any changes to the condition. Add two actions, 1st Submit data and 2nd close this form. Below is a screenshot

Completed View

This view is meant for viewing contracts that accept completed its transaction procedure. The submit push button is purposefully removed since no changes demand to exist made anymore. Below is the look and feel of the form

Form Load Rule

In this section I will draw the Action rules to display the form which is relevant to the workflow. Below are the conditions setup using Course Load equally shown below

New Form View Rule

Nosotros always want the new form to exist loaded when a new contract is submitted hence the condition is setup such that when the Current Condition & Electric current WF Status = 'new', open up the New Form.

Legal Administrator Form View Rule

When the form is opened by the legal administrator, we want the legal administrator view form to be used hence the condition is setup such that when the Current Condition = 'Request submitted' OR 'Chaser review completed', open the Legal Ambassador class.

Requester Form View Rule

During the workflow the contract is sent dorsum to the requester, at that betoken we desire the requester to view the requester course hence the condition is setup such that when the Electric current Condition = 'Pending additional information from requester' OR 'Negotiating terms', open the Requester view form. Below is a screenshot

Attorney Form View Dominion

When the form is opened past the chaser, we want the attorney view form to be used hence the status is setup such that when the Electric current Status = 'Sent to attorney' OR 'Chaser reviewing in process', open the Chaser view form .

Below is a screenshot

Completed Form View Rule

Finally, when the Electric current Status = 'Contract executed' load the Completed view form.

Form Videos

Below is a video I accept created which shows you lot the rules setup for each Submit button and the Form load rules.

(Click Here to view the video in loftier resolution)

Beneath is video I have created to examination the views of the course.

(Click Hither to view the video in high resolution)

Edifice the Workflow

Below is a screenshot of the unabridged workflow which provides an overall view of all the conditions and deportment which are sequenced to requite you the loop effect. I accept renamed the steps with titles that brand sense. Electric current Condition and Current WF Status are the two control columns. The Current WF Condition controls the step of the workflow, the Electric current Status controls who is currently working on the contract. It is of import to understand that the Electric current WF Status could be with someone, say, 'Daniel', but the Current Status is someone else.

Workflow Videos

I have at present provided three videos. The kickoff video is a perfect world scenario where the requester submits the contract, the role administrator reviews the contract, forwards information technology to the attorney, the attorney reviews the contract,

the attorney sends information technology to the requester for negotiation, the requester approves it and returns it back to the attorney, the chaser forward it to the legal administrator and the ambassador executes information technology.

(Click Hither to view the video in loftier resolution)

The second and 3rd video is a realistic world scenario where the requester submits the contract, the part administrator returns it back to the requester for changes, the requester makes the changes and returns it back,

The office ambassador forward to the chaser, the office administrator sends the contract back to the requester during the reviewing stride, in the reviewing the contract step the attorney sends the contract dorsum to the requester a few times, in the negotiating step the attorney sends the contract back to the requester a few times so forwards it to the part administrator who then executes the contract

(Click Hither to view the video in high resolution)

(Click Here to view the video in high resolution)

I am going to pause the explanation of the above workflow into viii separate parts.

Contract submitted

Returned to requester (Loop conditions)

Sent to chaser

Reviewing by attorney

Returned to requester by attorney (Loop conditions)

Negotiating terms (loop conditions)

Attorney review completed

Contract executed.

Contract Submitted

This set up of conditions and actions forces the following deportment to be run only one time at the showtime. This is why the initial choice of the Current WF Status column was New.

Below is the a screenshot of the item that is updated. These updates are very important. Without these updates the workflow volition either non run at all or the logic will non match our requirements.  The InfoPath grade updates the Current Condition to 'Request submitted' and this action updates Current WF status to 'With Daniel'. At this indicate we have to wait for the administrator to determine if he/she is going to return the contract dorsum to the requester or send it to the attorney for Reviewing.

Beneath is a screenshot of the body of the email which the requester and the legal department'south administrator volition receive.

Returned to requester (Loop atmospheric condition)

This step is where the loop status is first practical.

If the ambassador has decided to return the contract back to the requester so the below two sets of conditions and actions have effect. Every bit y'all take seen in the video, the ambassador will select the 'Awaiting additional information from requester' and submit. Too, the default value of the Loopbackcontrol column is 0. Hence all the three conditions friction match and hence the below workflow runs. The workflow and then has to wait until the Loopbackcontrol value is not equal to 0.

When the requester makes the changes and submits the class, the loopback command value is set to 1 and hence the contract is returned back to the administrator. This transaction process between the administrator

And the requester can occur every bit many times as needed.

Beneath is a screenshot of the two conditions and deportment.

Below is a screenshot of the Update item when the requester has made the change and hits the submit push. I accept highlighted that action yellow. As you can come across, I have set the value of the loopbackControl back to 0 This mode the loop process is set up for a re-use.

Below is a screenshot of the email when the requester received the email, the email sent past the administrator.

Below is a screenshot of the email torso when the legal ambassador has received the e-mail after the requester has made the modify.

Sent to Attorney

Once the administrator has completed his/her task, an chaser is selected and the current status is changed to 'Sent to attorney'. Beneath is a screenshot of the workflow

Beneath is a screenshot of the update item action

Below is a screenshot of the email which is sent to the attorney

Chaser Reviewing

The chaser to whom the contract has been sent, has to modify the condition to Attorney reviewing. The primary reason for his change is to record the timing. No emails are sent out during this pace. Below is a screenshot of the step

Returned to Requester by Attorney

This step is very like to the 'Returned to requester' by administrator. This step is where the loop condition is applied the 2d fourth dimension.

If the attorney has decided to return the contract back to the requester then the below two sets of conditions and actions take consequence.

As you have seen in the video, the chaser volition select the 'Pending additional information from requester' and submit. The Electric current WF status is 'With Chaser'

Also, the electric current value of the Loopbackcontrol cavalcade is 0. Hence all the 3 conditions friction match and hence the below workflow runs. The workflow and so has to wait until the Loopbackcontrol value is not equal to 0.

When the requester makes the changes and submits the form, the loopback command value is set to one and hence the contract is returned back to the attorney. This transaction process between the requester and the requester can occur as many times equally needed.

Below is a screenshot of the two weather and actions.

Below is a screenshot of the Update item when the requester has made the change and hit the submit push. I have highlighted that action yellow. Equally y'all tin see, I have set the value of the loopbackControl dorsum to 0. This fashion the loop process is ready for a re-use.

Below is a screenshot of the electronic mail when the requester received the electronic mail, the email sent by the attorney.

Below is a screenshot of the electronic mail which is sent to the attorney, the e-mail is sent by the requester.

Negotiating Terms

This stride is very similar to the 'Returned to requester by attorney'. This step is where the loop status is applied the third time.

The contract is currently in the negotiation step. When the attorney has decided to return the contract back to the requester then the below two sets of conditions and actions have effect. As yous have seen in the video, the chaser will select the 'Negotiating terms' and submit. The Current WF condition is 'With Attorney'

Also, the current value of the Loopbackcontrol column is 0. Hence all the iii weather match and hence the below workflow runs. The workflow then has to wait until the Loopbackcontrol value is not equal to 0.

When the requester makes the changes and submits the form, the loopback command value is ready to ane and hence the contract is returned back to the attorney. This transaction process betwixt the requester and the requester tin can occur as many times as needed.

Beneath is a screenshot of the two conditions and actions.

Beneath is a screenshot of the Update item when the requester has made the change and hit the submit button. I have highlighted that activity yellow. As you can see, I accept gear up the value of the loopbackControl back to 0 this way the loop procedure is fix for a re-employ.

Beneath is a screenshot of the email when the requester received the email, the electronic mail sent past the chaser.

Below is a screenshot of the email which is sent to the attorney, the email is sent by the requester.

Chaser Review Completed

This step is run after the chaser has completed the negotiating process with the requester and sending the contract to the legal administrator.

Below is a screenshot of the step

Below is a screenshot of the update detail action

Beneath is a screenshot of the electronic mail sent to legal administrator past the attorney

Contract Executed

This is the step where the legal administrator ends the workflow by executing the contract. In this step, the requester is sent an electronic mail and the contract end date is record.

Below is a screenshot of the workflow.

Beneath is a screenshot of the Update detail activeness

Beneath is a screenshot of the email sent to the requester

Conclusion

Nosotros have kept this example simple to explicate the conditions and actions using the Current WF status and Electric current status control columns. In this example we have kept the versioning settings to xvi, however, if yous anticipate the three loop process used several times then you might desire to consider increasing that number.

This workflow can also be used in SharePoint 2013 if the SharePoint 2010 workflow selection is selected.

See Also

  • SharePoint 2013 Portal
  • SharePoint 2013 - Service Applications
  • SharePoint 2013 - Resource for Developers
  • SharePoint 2013 - Resources for It Pros