Workflows are useful tools for routing documents that live in a repository such as SharePoint 2007. Creating them is more difficult than you may think until you have done a few of them. Below, I’ll describe the steps needed to create a simple serial workflow in SharePoint using an InfoPath form to capture the data.
The example used here is an approval workflow for an engineering document. When the document is completed and submitted to the system, a workflow is initiated and an email is sent to the first approver, Manager A. After the email is sent, the workflow goes into a wait state until the next action occurs. When Manager A receives the email and signifies his/her approval within the InfoPath form, the second step in the workflow is triggered: an email is sent to Manager B for approval and again, the workflow goes into a wait state. The third step sends email to Manager C for final approval and goes into a wait state. The final step is when the Manager C signifies approval: email is sent to the document originator and the workflow itself is stopped.
- Open SharePoint Designer 2007
- Choose Open Site and open the site where you want to create your workflow
- From the File menu, choose New -> Workflow
- Choose the Library/List to associate with the Workflow; give the workflow a name
- At the bottom of the window, choose Initiation
- Press Add and name your initiation parameter; here we use “workflowstatus”
- Choose Single line of text for the Information Type
- Press Next
- Set the Default value to “notstarted”
A separate step is created for each of the Condition/Action pairs described at the beginning of this document.
Each step needs a Condition to be met for an Action to occur; think If/Then statements in code. We use our Initiation parameter to set the serial status (workflowstatus from above). The values for the workflowstatus parameter will be notstarted when initiated, Manager A on first approval, Manager B on second approval, and Manager C on final approval. The workflow then ends.
Use the Conditions button on the interface to create the If portion of your criteria, and the Actions button to create the Then statements.
- Press the Conditions button and select Compare any data source
- You will see the template for an If statement: If value equals value
- Press on the first value link in the If statement
- A form field appears with a Formula icon next to it
- Click the Formula button
- Select from the pulldown menu Source: Workflow Data
- Select from the pulldown menu Field: Initiation: workflowstatus
- Press OK
- Press the second value link in the If statement
- Type in the form field ‘notstarted’
- Press the Actions button
- Choose Set workflow variable
- Click the link workflow variable
- Select Initiation: workflowstatus from the pulldown menu
- Click the link value
- Type into the form field ‘Manager A’
- Press the Actions menu again
- Choose from the menu Send an Email; a sample email window pops up
- Click the address book icon to fill in the To address
- You can either hard-code an address, look one up in the directory, or pull the address from a form field in the InfoPath form.
- Type in the Subject of the mail; click the formula icon to place a field value here, such as Title
- Type your message in the Body. Press Add Lookup to Body at the bottom on the window to add form fields to your message, such as a link to the document.
- Press OK
Repeat this process for the next three steps: check if the workflowstatus parameter has changed to the next variable, check to see if the previous approval has been granted, then set the workflowstatus to the next variable, send the email to the next approver, and set the workflow into a Wait state until the next approval is received. The actual steps I used are illustrated below.




Workflows are a great way to route documents that require one or more approvals. An additional benefit is that there always is a clean audit trail illustrating the lifecycle of the document. Creating a workflow in SharePoint requires a little practice and some simple steps in logic. When creating workflows, I find it best to sit with paper and pen and draw out all the Conditions and Actions before I begin touching the interface.


I have a client who is upgrading their internal systems and processes. They have chosen to use both SharePoint 2007 (because they are inherently a Microsoft house) and Ektron CMS400.net. SharePoint will be used to migrate from QuickPlace; Ektron is being used as an engineering document repository. Neither has any connection to or knowledge of the other. They do have an existing Intranet (one that I built years ago when an employee there). It’s a mix of LAMP and ColdFusion and anything else people wanted to try over the years. And it is a mess. The same sentiments apply as in yesterday’s post: I can’t find anything ... Our Intranet sucks.