Workflows Designer

SPD 2010 can create Three types of workflows:

  1. List workflow - These workflows are directly associated with a list. This was only type of workflow supported by SPD 2007.
  2. Reusable workflow - These workflows can be associated with many lists or libraries or content types, and can be reused throughout  your Sharepoint sites as needed.
  3. Site workflow - These workflows are not  associated with a specific list or content type.

Workflow Designer

The Workflow Designer provides a visual representation of the declarative workflow, separated into the various steps, conditions, and actions.  With the designer open, clicking on the Step button in the Ribbon adds a new step to which conditions and actions can be added:

  • Conditions - These are the rules that are used to drive the workflow. If a condition is true, then whatever is contained within the conditional block will be processed. if a condition is not true, then the workflow will move along to the next condition, assuming there is another one. Clicking the Condition button in he Ribbon will display the complete  list of available conditions.
  • Actions - These are statements that perform a specific activity, such as sending an e-mail or  modifying a field. Clicking the Actions button in the Ribbon will display  the complete  list of actions available for use in workflows.
Creating a Site Workflow That Writes to A Custom List

  1. Open your site in SPD and click Lists and Libraries in the navigation pane on the left.
  2. Click the Custom List button in the Ribbon to create a new list called Employee Review with the following fields:
    - Rename Title to Employee
    - Manager: Single line of text
    - Rating: Single line of test
    - Comments: Multiple lines of text
  3. After all of the fields have been added click the save button to save the changes to the list.
  4. Click the Workflows link in the navigation pane on the left.
  5. Next from the Ribbon, click the Site Workflow button to create a new workflow.
  6. Name the workflow Employee Reviews and click OK. The Workflow Designer for the new workflow will automatically open.
  7. With the Workflow Designer open, you should see a blinking horizontal orange line, which is used to indicate where the next action or condition will be inserted. But before you add any steps to your workflow, from the Ribbon, click the Initiation Form Parameters button. This allows you to define parameters that are used to collect data when the workflow is started. In this case you want the user to fill out the form and then use the information that was entered throughout the workflow.
  8. From the Association and Initiation Form Parameters dialog, click the Add button.
  9. Name the field Rating, choose Choice as the Information type, and click Next. On the Column Settings screen, enter the values and click Finish.
  10. Press the Add button to add another field. Name this field Comments, set it as Multiple lines of text, and click Next and the Finish. Click OK button from the Association and Initiation screen.
  11. The Workflow Designer should open and there should be a horizontal, orange blinking cursor in a box titled Step 1. From the Ribbon, click the Action button and then click Lookup Manager of a User. Optionally, instead of clicking the Actions button, you can start typing and SPD will try to figure out what you want it to do.
  12. A description of the action will be added to step 1. Click the link that says "this user" to specify whose manager will be looked up. The Select Users dialog will open. Select Workflow Lookup for a User and click the Add button. The Lookup dialog will display.
  13. In the Lookup dialog, set the following options:
    • Data source: Workflow Context
    • Field from source: Initiator
    • Return field as: Login Name
    Click OK when you are done. 
  14. Click just below the action that was just completed but still within the Step 1 box. The orange cursor should show where the next action will be added. Click the Action Button again in the Ribbon and select Create List Item.
  15. In the new action, click the "this list" link.Select Employee Review. Click the Employee field and then click the Modify button to specify the values for this field. In step 9 and 10 you defined the values to be entered by the user. Because the name of the employee doing the review is the same as the person starting the workflow, you can get that automatically.
  16. Click the function button and set the following values in the Lookup dialog:
    • Data source: Workflow Context
    • Field from source: Initiator
    • Return Field as: Display Name
    Click OK and then Click OK again.

  17. Repeat the same steps described in step 15 for the Rating field, but select the following values for the lookup:
    • Data source: Workflow Variables and Parameters
    • Field from source: Parameter: Rating
    • Return field as: As String
    Click OK and then OK again. You'll be returned to the Create New List Item dialog.


  18. From the Create New List Item dialog window, click Add and choose the Manager field. Press the function button as described previously. Set the following values for the lookup:
    • Data source: Workflow Variable and Parameters
    • Field from source: Variable: Manager
    • Return field as: Display Name
    Press OK and the OK again. You'll be returned again to the Create New List item dialog window.
  19. Click ADD and choose the Comments field. Click the function button and set the following values for the lookup:
    • Data source: Workflow Variables and Parameters
    • Field from source: Parameter: Comments
    • Return field as: As String
    Press Ok and then OK again. Vearify that all of the fields have been created and then from the Create New List Item dialog, click OK. You should find yourself back at the Workflow Designer.
  20. With the Workflow Designer open, click the Action button in the Ribbon and select Assign a to-do item.
  21. Click the link for "a to-do item" and the Custom Task Wizard will open. Click next. On the second page of the wizard, enter Employee Review in the Name field and click Finish.
  22. Next, from the Workflow Designer click the "these users" link in the create to-do item action that you've been editing. From the Select Users dialog, click Workflow Lookup for a User, and then click Add. The Lookup for Person or Group dialog window will open.
    Set the following values for the lookup in the top section of the window:
    • Data source: User Profles
    • Field from source: Manager
    • Return field as: Login Name
  23. For the fields at the bottom of the Lookup for Person or Group dialog window, for the Field value choose Account Name from the drop-down. Next press the function button to the right of the Value field. In the dialog that opens, set the fields as follows:
    • Data source: Workflow Context
    • Field from source: Initiator
    • Return field as: Login Name
      Similar to step 13, the name of the manager is being returned, but in this case it is for the purpose of assigning a task to the manager, which is why the Login Name is used as the return field.
  24. Press OK on all the dialogs to accept the chanegs.
  25. The Workflow is now complete. From the Ribbon, click the Save button. Before the workflow can be used, it must first be published. To do so, click the Publish button in the Ribbon.
  26. TO try the site workflow, go back to your site and click Site Actions --> View All Site Content. At the top of the page, click the Site Workflow link.
  27. Click the Employee Review link which will open the page where you can fill out the form to start the workflow. Fill out the form and  press Start. To make this  form easier to access, you can copy the form's URL and create a link directly to the form.
  28. If you go back to Employee Review list, you'll see that a new item has been created, the manager has been successfully looked up, and the information entered into the form has been added. A task should have also been created for the manager, which you can see by clicking Site Actions ---> View All Site Content then clicking on the Site Workflows link.