Exercise 1: Defining a Process in Visio 2010

In this exercise you will use the Visio SharePoint Workflow template to define a process outline of the Timesheet Approval process. This model can be exported to SharePoint Designer and server as a starting point for the completion of the process.

Task 1 – Define the Timesheet Approval process

In this first task, you will define the process in Visio 2010 using the SharePoint Workflow template

  1. Open Visio 2010 and create a new SharePoint Workflow drawing
    1. Open Visio 2010
    2. Choose the Flowchart template category and select the Microsoft SharePoint Workflow template
    3. Click the Create button to create the new drawing

      Figure 1

      Create new SharePoint Workflow

  2. Add the Start and Terminate shapes to define the beginning and end of the process
    1. Select the Quick Shapes section in the Shapes task pane
    2. Drag a Start shape onto the new drawing
    3. Drag a Terminate shape onto the new drawing
  3. Add a Compare document field shape to check if the timesheet includes overtime
    1. Select the SharePoint Workflow Conditions section in the Shapes task pane
    2. Drag a Compare document field shape onto the drawing
    3. Set the shape’s name to Check for Overtime

      Figure 2

      Check for Overtime shape

  4. Add an Assign item for approval shape to submit the timesheet to the manager for approval
    1. Select the SharePoint Workflow Actions section in the Shapes task pane
    2. Drag a Start approval process shape onto the drawing
    3. Set the shape’s name to Send to Manager for Approval

      Figure 3

      Send to Manager for Approval shape

  5. Add a Compare data source shape to check the results of the manager’s approval
    1. Select the SharePoint Workflow Conditions section in the Shapes task pane
    2. Drag a Compare data source shape onto the drawing
    3. Set the shape’s name to Check for Approval

      Figure 4

      Check for Approval shape

  6. Add a Set field shape to clear overtime if the manager rejected the overtime
    1. Select the SharePoint Workflow Actions section in the Shapes task pane
    2. Drag a Set field shape onto the drawing
    3. Set the shape’s name to Clear Overtime

      Figure 5

      Clear Overtime shape

  7. Connect the shapes to define flow of control
    1. Connect the Start shape to Check for Overtime
    2. Connect Check for Overtime to Send to Manager for Approval
    3. Connect Check for Overtime to the Terminate shape
    4. Connect Send toManager for Approval to Check for Approval
    5. Connect Check for Approval to Clear Overtime
    6. Connect Check for Approval to the Terminate shape
    7. Connect Clear Overtime to the Terminate shape

      Figure 6

      Shape connection

  8. Update all connections from decisions to be marked yes or no
    1. Right click the connection between Check for Overtime and Send to Manager for Approval and choose Yes
    2. Mark the connection between Check for Overtime and the Terminate shape as No
    3. Mark the connection between Check for Approval and the Terminate shape as Yes
    4. Mark the connection between Check for Approval and Clear Overtime as No
    5. Update the drawing’s layout to make it look like the image below

      Figure 7

      Shape connections with choices

Task 2 – Export the process to SharePoint Designer

In this task, you will export your Visio process so it can be loaded by SharePoint Designer. Once it is loaded, it can be used as a starting point for the completed Timesheet Approval process.

  1. Save the Visio process drawing
    1. Click the Save button on the Quick Access Toolbar
    2. Set the folder to %Office2010DeveloperTrainingKitPath%\Labs\ClientWorkflow\Source\[language]\Starter
    3. Set the File name to Timesheet Approval.vsd and click Save
  2. Export the process to SharePoint Designer
    1. Click the Export button in the Process ribbon tab
    2. Set the folder to %Office2010DeveloperTrainingKitPath%\Labs\ClientWorkflow\Source\[language]\Starter
    3. Set the File name to Timesheet Approval.vwi and click Save