lab environment -...

78
Workflows in SharePoint 2010 Hands-on Lab Released:

Upload: hatuong

Post on 31-Jan-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010

Hands-on Lab

Released:

Page 2: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Terms of UseThis document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

© 2011 Microsoft Corporation. All rights reserved.

This document reflects current views and assumptions as of the date of development and is subject to change.  Actual and future results and trends may differ materially from any forward-looking statements.  Microsoft assumes no responsibility for errors or omissions in the materials. 

THIS DOCUMENT IS FOR INFORMATIONAL AND TRAINING PURPOSES ONLY AND IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

2 © 2023 Microsoft Corporation. All rights reserved.

Page 3: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

About the AuthorAuthor: Ravi VridhagiriBio: As Chief Technology Officer for OnTerra Systems, Ravi Vridhagiri

is responsible for development of OnTerra’s new product offerings, and plays a prime role in OnTerra’s technology consulting commissions. He is a Microsoft-certified Technology Specialist in SharePoint application development – with more than 12 years of experience in various technology solution design and project implementations. He has extensive experience in Microsoft technologies, specifically Microsoft SharePoint, Microsoft C#, .NET, and more. He also is a certified Project Management Professional (PMP).

Mr. Vridhagiri earned a Bachelor of Science in Mechanical Engineering from the University of Madras in India in 1999. He went on to earn a Master’s of Business Administration (with specializations in Management of Information Systems and Finance) from the Rutgers University Business School in 2009.

Page 4: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Table of Contents

Lab Environment................................................................................................................................................................ 1

Lab Overview........................................................................................................................................................................2

Exercise 1: Workflows using SharePoint Designer 2010..................................................................................3

Exercise 2: SharePoint Workflows using Visio 2010.......................................................................................20

Exercise 3: Reusable Workflows using SharePoint Designer 2010...........................................................33

Exercise 4: Import Designer Workflows into Visual Studio 2010 (Sandboxed Workflow Solution)............................................................................................................................................................................... 44

Exercise 5: Workflow Forms.......................................................................................................................................54

Appendix.............................................................................................................................................................................. 67

4 © 2023 Microsoft Corporation. All rights reserved.

Page 5: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Lab EnvironmentDuring this lab, you will work in a simulated environment with the following computers or virtual machines:

Computers and Virtual Machines Used in This Lab

Icon Computer Name Description

DEMO2010AThis computer is configured as a stand-alone server running Windows Server 2008 with SharePoint Server 2010, SQL Server and Visual Studio 2010

Logon Credentials

The lab environment might require you to log on to the Hands-on Lab Environment using the following credentials, unless specified differently throughout the lab manual:

Username PasswordAdministrator pass@word1

1 Microsoft Confidential - For Internal Use Only

Page 6: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Lab OverviewAbstract

SharePoint 2010 provides more choices in tooling to better fit the needs of those creating and maintaining workflow models. The tools for workflow development include Visual Studio 2010, SharePoint Designer 2010 and Visio 2010.

During this lab, you will perform several exercises to achieve a better understanding of the capabilities and functionality of Workflows in SharePoint 2010.

You will start with basic exercises of understanding Workflows as a SharePoint composite application and create basic Workflow using SharePoint Designer 2010.

You will then use Microsoft Visio 2010 to design a business process flow, and export it as a SharePoint workflow.

You will then explore the reusable Workflows and customize it using Visual studio 2010. You will also deploy the customized reusable Workflow across multiple sites.

By the end of this series you will have designed Workflow forms (UI) used by the participants to interact with the Workflow.

Learning Objectives

After completing the exercises in this lab, you will be able to:

Create SharePoint list Workflows using SharePoint Designer 2010

Use Microsoft Visio 2010 to create a process flow diagram and export it as a SharePoint Workflow.

Use SharePoint Designer to create reusable site Workflows and export them to Visual Studio 2010 for further customization

Customize a reusable Workflow using Microsoft Visual Studio 2010 and add Workflow activities.

Create, Customize and Publish Workflow forms using SharePoint Designer 2010.

Estimated time to complete this lab: 120 minutes

2 © 2023 Microsoft Corporation. All rights reserved.

Page 7: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Exercise 1: Workflows using SharePoint Designer 2010ScenarioIn this exercise you will learn the basics of creating a List Workflow using SharePoint Designer 2010. You will create a Sales leads management application. You will learn about creating a Workflow that runs on a SharePoint list, and about publishing the List Workflow to SharePoint.

After completing this exercise, you will be able to:

Use SharePoint Designer 2010 to create Workflows

Create a List Workflow

Publish Workflows to SharePoint from SharePoint Designer 2010.

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A.

Create Opportunities SharePoint list

1. Open Internet Explorer browser and browse to http://intranet.contoso.com

2. From Site Action, Select More Options.

3. In the Create dialog window, select Custom list.

4. Type Opportunities as the name of the list. Click Create.

Add custom columns to the list

5. Navigate to the custom list (http://intranet.contoso.com/lists/opportunities/)

6. On the ribbon menu, click List Tools.

7. Click List.

8. Click Create Column.

3 Microsoft Confidential - For Internal Use Only

Page 8: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

9. Create a new column with the following specifications:

Name and Type:

Column Name: Details

Column Type: Multiple Lines of Text

Additional Column Settings:

Require that this column contains Information: Yes

Number of line for editing: 6

Click OK.

10. Similarly, create another column with the following specifications:

Name and Type:

Column Name: Primary Sales Representative.

Column Type: Person or Group.

Additional Column Settings:

Require that this column contains Information: Yes

Allow Multiple Selections: No

Choose From: All Users.

Click OK.

11. Similarly, create another column with the following specifications:

Name and Type:

Column Name: Status

Column Type: Choice (Menu to choose from).

Additional Column Settings:

Require that this column contains Information: Yes

Enforce Unique Values: No

Type each choice in a separate line:

4 © 2023 Microsoft Corporation. All rights reserved.

Page 9: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps Contacted

Qualified

Unqualified

Order Form Sent

Order Form Received

Closed.

Display choices using: Drop-Down Menu.

12. Click OK.

Create a custom SharePoint group - Accounts Manager

13. Browse to the SharePoint site http://intranet.contoso.com

14. From Site Actions, select Site Permissions.

15. On the ribbon menu, under Permission Tools, click Create Group.

16. Type Account Managers as the name of the group.

17. In the section Give Group permission to this site, select Design.

18. Accept the defaults for the other settings. Click Create.

19. On the Group list menu, click Add users.

20. Type contoso\alans; contoso\davids in the Users/Groups textbox. (Note: The contoso demo VHD has many built in users that you can use for these labs)

21. Click OK.

5 Microsoft Confidential - For Internal Use Only

Page 10: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed StepsCreate the SharePoint Designer 2010 Workflow

22. Click Start | All Programs | SharePoint | SharePoint Designer 2010

23. Click Open Site.

24. Type http://intranet.contoso.com/ as the Site name.

25. Click Open.

6 © 2023 Microsoft Corporation. All rights reserved.

Page 11: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

26. On the left pane, under Site Objects, select Workflows.

27. On the ribbon, under the Workflows tab, Click List Workflow.

28. Select the Opportunities list.

29. Type Opportunity Management as the name of the workflow.

30. Click OK.

7 Microsoft Confidential - For Internal Use Only

Page 12: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

Create Workflow conditions

Condition 1: If the Status of the lead is Contacted , the Account Managers should be notified.

31. On the ribbon, click Condition.

32. Click If current item field equals value.

33. Click field in the designer canvas. You should see the list of fields from the opportunities list. Select Status.

8 © 2023 Microsoft Corporation. All rights reserved.

Page 13: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

34. Click Value inside the Step 1 block of the designer canvas. You should see the available statuses. Select Contacted.

35. On the ribbon, click Action. This should display a drop-down list of all available actions.

36. Select Send an Email.

9 Microsoft Confidential - For Internal Use Only

Page 14: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

A new action should now be added to the Step 1 block.

37. Inside Step 1 box, click these users.

38. In the Define E-mail message dialog box, click the address book icon next to the To: field

39. In the Select Users dialog box, from the list Select from existing users and group, Click People/Group from SharePoint site.

40. Click Add.

41. In the Select People and Groups dialog, search for Account Managers. (This is the SharePoint group that you created earlier). Select Account Managers and click Add.

42. Click OK.

10 © 2023 Microsoft Corporation. All rights reserved.

Page 15: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

Format the email message to Account Managers

43. Back in the Define Email Message dialog box, Type Lead Contacted in the Subject field.

44. In the body field, type the following: "Opportunity lead has been contacted". Hit the enter key to move to next line

45. Click the Add or Change Lookup button.

46. Make the selection as follows:

Date source: Current Item

Field from source: Title

11 Microsoft Confidential - For Internal Use Only

Page 16: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

Condition 2: If an Opportunity is found to be Not Qualified , the accounts managers are notified and the opportunity is Closed.

47. Click OK.

48. Similarly, click the Add or Change Lookup button to insert Details and Primary Sales Representative into the message. Format the message to look as follows:

49. Click OK.

50. Right click inside the IF nested block within Step 1 block and Insert an Else-If Branch

12 © 2023 Microsoft Corporation. All rights reserved.

Page 17: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps51. On the ribbon, click condition.

52. Click to insert a if current item field equals value condition.

53. Follow the instructions 33 to 34, and set the condition to Else If CurrentItem:Status equals Unqualified.

54. On the ribbon, click Action.

55. Click Update a List Item to insert the action into Step 1 block.

13 Microsoft Confidential - For Internal Use Only

Page 18: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

56. Click this list.

57. In the Update List Item dialog box, Click Add

58. In the Value Assignment dialog box, select Status and set it to Closed. Click OK.

59. Click OK.

60. Click inside the Else-If block,

61. On the ribbon, click Actions.

62. Click to insert a Send Email action into the Else-If block.

14 © 2023 Microsoft Corporation. All rights reserved.

Page 19: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

Condition 3: If an Opportunity is Qualified, an approval process is initiated and a manager is assigned an approval task. The manager has to approve sending an Order Form to the lead."

63. Follow the earlier instructions to send a notification to Account Managers. This time, the email is to let them know that this Opportunity is closed as it is not qualified.

64. Repeat the steps from 50 to 53 to insert an Else-If condition and check for Status = Qualified.

65. From the ribbon, click Actions.

66. Click and insert an action - Start Approval Process.

15 Microsoft Confidential - For Internal Use Only

Page 20: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

67. Click these users.

68. In the Task Process dialog box, set the Participants (Approver), Title, Instructions and Duration as follows:(Follow the instructions in the steps 43 to 50 to configure the notification)

Here, a task is assigned to contoso\jeffh to approve the request to send an order form to a qualified opportunity.

69. Click OK to complete the Workflow design.

16 © 2023 Microsoft Corporation. All rights reserved.

Page 21: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed StepsSave and Publish the Workflow

70. On the left pane, under Site objects, click Workflows.

71. Click Opportunities Management workflow.

72. In the section Start Options, check the following check boxes

a. Allow this workflow to be started manually

b. Start workflow automatically when a new item is created

c. Start workflow automatically when an item is changed

73. On the ribbon, click the Save icon.

74. Click the Publish button to publish the workflow to the Opportunities list.

75. On the left pane, under Site objects, click List and Libraries.

76. Click the Opportunities list.

77. In the Setting section, check Require content approval for submitted items.

78. On the ribbon, click the Save icon to save the list settings as well as the workflow settings.

79. Open an Internet Explorer browser and browse to the Opportunities list located at http://intranet.contoso.com/lists/opportunities

80. On the ribbon, under List tools, select list.

81. Click List Settings.

17 Microsoft Confidential - For Internal Use Only

Page 22: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps82. In the List Settings page, under Permissions and Management section, click

Workflow Settings.

83. You will see the Opportunity Management workflow is active on this list

84. Navigate to the Opportunities list. (http://intranet.contoso.com/lists/opportunities)

85. Click Add a new Item.

86. Add a new Opportunity by filling out the form. Set the Status to Contacted. Click OK. This starts an instance of the Opportunity Management workflow for this list item.

87. Click the drop down menu on the newly added list item, and click Workflows.

88. Under the section Completed Workflows, you will see an instance of Opportunity Management workflow has started and completed successfully. The users in the Account Managers group would have received an email.

89. Follow the bread crumbs navigation and navigate to the Opportunities list.

90. Click the drop down menu on the list item, and click Edit Item.

18 © 2023 Microsoft Corporation. All rights reserved.

Page 23: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

91. Change the Status of the list item to Unqualified. Click OK.

92. Follow the instruction in step 87 and examine the workflow process.

93. Navigate back to the Opportunities list. Click the drop down menu on the list item, and click Edit Item

94. Change the Status of the list item to Qualified. Click OK.

95. Follow the instruction in step 87 and examine the workflow process.

19 Microsoft Confidential - For Internal Use Only

Page 24: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Exercise 2: SharePoint Workflows using Visio 2010ScenarioVisio 2010 comes with a new Microsoft SharePoint Workflow template for creating SharePoint Workflows. In this exercise, you will learn to use Visio 2010 and SharePoint Designer 2010 in concert to create a workflow. You will understand how each tool plays a specific role in the development process. You will explore the Visio and SharePoint Designer features that allow roundtrip import & export of workflow files - which enables an iterative process during workflow creation.

After completing this exercise, you will be able to:

Create a process flowchart with Microsoft Visio 2010 using SharePoint Workflow template.

Export the Visio flowchart as a SharePoint Workflow

Import the Visio flowchart into SharePoint Designer 2010 and customize it.

Publish the completed workflow to SharePoint.

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A.

Create Expense Reports SharePoint list.

1. Open Internet Explorer browser and browse to http://intranet.contoso.com

2. From Site Action, click More Options.

3. In the Create dialog, select Custom list.

4. Type Expense Reports as the name of the list. Click Create.

5. Navigate to the custom list at http://intranet.contoso.com/lists/expense reports/

6. On the ribbon, click List Tools

7. Click List.

8. Click Create Column.

9. Create a new Column with the following specifications:

Name and Type:

20 © 2023 Microsoft Corporation. All rights reserved.

Page 25: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed StepsColumn Name: Details

Column Type: Multiple Lines of Text

Additional Column Settings:

Require that this column contains Information: Yes

Number of lines for editing: 6

Click OK.

10. Similarly, create another column with the following specifications:

Name and Type:

Column Name: Amount

Column Type: Currency

Additional Column Settings:

Require that this column contains Information: Yes

Enforce unique values : No

Number of decimal places : 2

Default value : Currency

Currency Format : United States

Click OK.

11. The list is created and ready to use.

Design Workflow using Visio 2010

12. Click Start | All Programs | Microsoft Office | Microsoft Visio 2010

13. From the Template Categories, Select Flowchart.

14. Select Microsoft SharePoint Workflow. Select US Units.

15. Click Create.

16. On the left pane, in the section SharePoint Workflow Terminators (US Units) , choose Start. Drag it to the designer.

17. Similarly, select and drag a Terminate shape to the designer.

21 Microsoft Confidential - For Internal Use Only

Page 26: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

Add Workflow processes, tasks and conditions

Based on the submitted expense amount, there are two possible outcomes -

>>Auto approve if the amount is less than $1000

>>Route the request for approval if amount is greater than or equal to $100

18. From SharePoint Workflow Conditions, select and drag a Compare a document field shape to the designer. (This is the condition to check the entered expense amount)

19. From the SharePoint Workflow Actions, drag a Set content approval status (For auto approval) action and a Start approval process (for workflow) action to the designer canvas.

20. When you mouse-over the shapes, the connector arrows will appear. Connect the shapes by simply dragging these arrows between the shapes.

Note: The direction of the arrows is important.

22 © 2023 Microsoft Corporation. All rights reserved.

Page 27: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

21. Right click on the arrow leading from the Compare document field to Start approval process shapes. Click Yes.

22. Similarly, right click on the arrow leading from the Compare document field to Set content approval status shape. Select No.

23. The flowchart should look as follows:

23 Microsoft Confidential - For Internal Use Only

Page 28: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

You added the logic to check the approval status. If the approval status is Approved , an email notification is sent. If the approval status is Rejected , a message is logged to the workflow history.

24. After the approval process starts, the workflow has to wait for a response and wait until the approval status is set by the approver. To accomplish this, drag a Wait for field change to the designer. Connect the Start approval process to this action.

25. Add an action Compare document field and connect it to rest of the process. (This action block is to check the value in approval status at the end of the approval workflow process)

26. From the SharePoint Workflow Actions on the left pane, select and drag to the designer two more actions: Send an email and Log to history list.

27. Set the outcome of the Compare document field to branch out to these two action blocks.

28. Follow the instructions in step 21 and step 22 to set conditional branching. Set YES for branch to Send an email, and NO for the branch to Log to history list.

24 © 2023 Microsoft Corporation. All rights reserved.

Page 29: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

29. Connect the actions (Set content approval status, Log to history list and Send an email) to the Terminate event. The completed flow chart should look as follows:

Save and Export the Visio design

30. Click the Save icon and save this file as ExpenseManagement.vsd to your local drive.

31. On the ribbon, click the Process tab.

32. Click Export.

33. Save the exported file as ExpenseManagement_Exported.vwi to your local disk.

Import the Workflow into SharePoint Designer 2010

34. Click Start | All Programs | SharePoint | SharePoint Designer 2010.

35. Click Open Site, and type http://intranet.contoso.com (or the site location where you created the Expense Reports list)

36. On the left pane, select Workflows.

37. On the ribbon, click Import from Visio.

25 Microsoft Confidential - For Internal Use Only

Page 30: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps38. In the Import Workflow from Visio Drawing dialog box, browse to the location

of the ExpenseManagement_Exported.vwi file and select it.

39. Click Next.

40. Select the List Workflow option, and select Expense Reports list from the drop down list.

41. Click Finish.

Customize the imported Workflow.

42. The imported workflow process should look as follows:

26 © 2023 Microsoft Corporation. All rights reserved.

Page 31: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

43. In the outer most condition block, click field.

44. Select Amount.

45. Click equals and change the operation to is greater than or equal to.

46. Click value, and type 1000.

47. The outer most IF condition block should now resemble the following:

Before

After

48. In the action block Start Approval Process on this item with these users, Click this item. Select Current Item.

49. Similarly, In the same block Start Approval Process on this item with these users, click these users.

27 Microsoft Confidential - For Internal Use Only

Page 32: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

By default, when approval process is started, the Approval Status value is Pending. In this step, you are making the workflow wait for an event that changes the Status from Pending . This means, when the approval status is changed to either Approved or Rejected , the workflow will continue on to the next steps.

50. In the Select Task Process Participants dialog box, set the following:

Participant: contoso\davids

Title: Expense report approval needed.

Duration per Task: 5 Days

51. Format the instructions to include the message as shown in the screenshot below. Follow the instructions in Exercise 1 and click the Add or Change Lookup button to include the Created By and Amount fields into the message.

Click OK.

52. Change the action then Wait for field this test valueFrom:

To:

28 © 2023 Microsoft Corporation. All rights reserved.

Page 33: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

53. Check the result of the Approval process by checking the Approval Status field.

54. In the action block Email these users, click these users.

55. In the Define Email Message dialog, select the address book button next to the To: field.

56. Select Workflow Lookup for a user... and then click Add >>

29 Microsoft Confidential - For Internal Use Only

Page 34: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps57. Select the following in the Lookup for Person or Group dialog box.

Data Source: Current Item

Field from Source: Created By

Return field as: Email Address

Click OK.

58. Click OK.

59. Complete the Define E-mail Message window with a notification message as follows.

60. In the nested Else block, click this message.

61. Click the String Builder button.

30 © 2023 Microsoft Corporation. All rights reserved.

Page 35: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps62. Type "The Expense has been rejected".

63. Click OK.

64. In the outer Else block (Condition where the submitted amount is less than $1000), set the Approval status field to Approved with a message "Automatically Approved".

65. The completed workflow should now look as follows:

Configure the Workflow settings

Set the workflow to Start automatically when a new item is created

66. On the left pane, under Site objects, click Workflows.

67. Click ExpenseManegement_Exported.

68. In the section Start Options, Check the option Start workflow automatically when a new item is created.

31 Microsoft Confidential - For Internal Use Only

Page 36: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed StepsSave and Publish the Workflow

69. Click the Save icon to save the workflow and the settings.

70. On the ribbon, click the Publish. The workflow is automatically published to the Expense Reports list as a List Workflow

Test the workflow

Login as a Contoso user (contoso\alans) and not as Administrator. Workflows does not start automatically when logged in as System Account.

You will observe that when the expense amount is less than $1000, the expense is automatically approved. When it is over $1000, an approval workflow is initiated.

71. Open Internet Explorer browser and browse to the expense reports list at http://intranet.contoso.com/lists/expense reports/

72. Login as Contoso\alans and password pass@word1.

73. Click Add a new item.

74. Fill the form to add a new expense item for amount less than $1000. Check the workflow process (Follow the instructions in Lab 1 to check the Workflow Status and Workflow history)

75. Navigate back to the Expense Reports list page. Click Add a new item.

76. Add a new expense item for amount more than $1000. Examine the workflow process.

32 © 2023 Microsoft Corporation. All rights reserved.

Page 37: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Exercise 3: Reusable Workflows using SharePoint Designer 2010ScenarioWorkflows created in SharePoint Designer, or declarative workflows, consist of XML statements instead of code. SharePoint Designer 2010 introduces reusable workflows, which are portable, declarative workflows that can be used by different lists in SharePoint sites.

In the exercise you will learn to create a reusable workflow using SharePoint Designer 2010. You will create a site column and associate it with the reusable workflow. You will then explore ways to attach the workflow to a list or library by using either SharePoint Designer 2010 or via the workflow settings page.

After completing this exercise, you will be able to:

Create a simple, reusable workflow using SharePoint Designer 2010.

Create Site Columns for use in the Workflows

Associate Site Workflows with the Site columns.

Publish Site Workflow across multiple sites and to different document libraries

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A.

Create Site Column

Describe Site Column

1. Click Start | All Programs | SharePoint | SharePoint Designer 2010.

2. Click Open Site.

3. Type http://intranet.contoso.com. Click OK.

4. On the left pane, under Site Objects, select Site Columns.

5. On the Columns tab, click New Column.

33 Microsoft Confidential - For Internal Use Only

Page 38: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

6. Select Choice.

7. In the Create a Site Column dialog box, Set the following attributes:

a. Name: Contoso Department

b. Description: Departments in our Organization

c. Select Existing Group, and choose Custom Columns from the drop down.

Click OK.

34 © 2023 Microsoft Corporation. All rights reserved.

Page 39: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

8. In the Column Editor dialog box, set the following:

a. Choices:

Human Resources

Information Technology

Finance

Operations

b. Clear the value in Default value field.

c. Display as: Drop-down Menu

d. Uncheck the option Allow "Fill-in" choices.

e. Un check the option Allow blank values.

Click OK.

35 Microsoft Confidential - For Internal Use Only

Page 40: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

9. Look under Custom Columns. A new Site column Contoso Department should be created.

Create reusable SharePoint Designer Workflow

By associating the Site column with this workflow, we are also enabling the use of this workflow on all

10. On the left pane, under Site Objects, select Workflows.

11. On the Workflow Tab, click Reusable workflow.

12. In the Create Reusable Workflow dialog box, set the following:

a. Name: Department Approval Workflow.

b. Description: Routes a document or list item for department's approval.

c. Content Type: All

Click OK.

13. On the ribbon, under the Workflow tab, click Association Columns.

36 © 2023 Microsoft Corporation. All rights reserved.

Page 41: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Stepslists and libraries that contain this Site column.

14. Click Select Site Column.

15. Under Custom Columns, select Contoso Department. Click OK.

16. Click OK.

Add Workflow conditions

In this step, we are assigning a task to David Simpson (contoso\davids) to review and approve this item (document or list item). As per this scenario, David is the person in the HR department incharge of over-seeing any portal content that is tagged as belonging to the HR department

17. Click inside Step 1 of the workflow.

18. On the Ribbon, click Condition.

19. Click and Insert a If current item field equals value condition.

20. Click field inside the condition block

21. Select Contoso Department.

22. Similarly, click value in the condition block and select Human Resources.

37 Microsoft Confidential - For Internal Use Only

Page 42: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

23. On the ribbon, click Action

24. Click Start Approval process. This inserts the action inside the IF condition block.

25. Click these users.

26. Follow the instructions in Exercise 1 to create an approval process as follows.The Task Process Participants dialog should look as follows:

38 © 2023 Microsoft Corporation. All rights reserved.

Page 43: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

27. Click OK.

28. Within the Step 1, click just outside the IF block. Insert an Else-If Branch from the ribbon.

29. Follow the Instructions from steps #20 to 27 to add conditions. Each condition checks the departments to which the document/item belongs to. Start approval processes and assign it to individuals belonging to respective department.

30. The completed workflow should look as follows:

39 Microsoft Confidential - For Internal Use Only

Page 44: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

31. Click the Save icon to save the workflow

32. Click the Publish button to publish the workflow to your SharePoint site.

Associate workflow with SharePoint libraries & list with Site Columns

The Site column has been added to the Corporate Policies library. Whenever a new document is uploaded, the document can be classified as belonging to a particular organizational department.

33. Open Internet Explorer browser and browse to http://intranet.contoso.com.

34. From Site Actions, select More Options.

35. Select the Document Library template.

36. Type Corporate Policies as the name of document library. Click Create.

37. Navigate to the Corporate Policies document library.

38. On the ribbon menu, click Library Tools

39. Click Library.

40. Click Library Settings.

41. Under the section Columns, click Add from Existing site column.

42. Select Custom Columns from the Select site columns from drop down list.

43. From the list of Available site columns, select Contoso Department. Click Add.

40 © 2023 Microsoft Corporation. All rights reserved.

Page 45: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

44. Click OK.

Configure Workflow 45. Back in the document library settings page, Under Permissions and Management, click Workflow Settings.

46. From the list of available templates, select Department Approval Workflow.Type a unique name for this workflow: Department Approval for Policies.

47. Accept default values for the Task List and History List (The workflow will create the lists for you, if they do not already exist)

48. Check the option Start this workflow when a new item is created.

49. Click OK.

50. Navigate to the document library settings page by following the breadcrumbs navigation.

51. Under General settings, click Versioning Settings.

52. Select YES for the Require content approval for submitted items? option.

53. Accept the defaults for other settings and click OK.

Create a sample document for upload

54. Click Start | All Programs | Microsoft Office | Microsoft Word 2010.

55. In the word editor, type "This is a sample Contoso policies document". Save this test document as Vacation Policies.docx to your local drive.

Upload a document to the document library and test the workflow

56. Navigate to the Corporate Policies document library.

57. Click Add document.

58. Browse to the Vacation Policies.docx word document from your local drive and upload it.

59. Type Contoso Vacation Policies as the name and the title of the document. Select Human Resources as the Contoso Department. Click Save.

41 Microsoft Confidential - For Internal Use Only

Page 46: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

You can create a custom list such as Announcements or News and add the Contoso Department site column to it. This would mean that a new announcement or news is associated with (or) comes from the respective department. When a portal contributor adds a news or announcement, a notification is sent to the respective department for approval before it is visible to the portal users.

60. Click on the drop-down menu next to the uploaded document and click Workflows.

61. Under the section Running Workflows, you will see an instance of the Department Approval workflow running on this document. The Status of the workflow should be In Progress.

62. Click the link In Progress.

63. In the Workflow status page, you will see that a new approval task has been created and assigned to contoso\davids for approval. The user contoso\davids would have received a notification email with the links to the task screen from where he can approve or reject the document.

42 © 2023 Microsoft Corporation. All rights reserved.

Page 47: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

Approving the document makes it available for viewing by all authorized users. Rejecting the document makes it unavailable for viewing by users of the document library.

43 Microsoft Confidential - For Internal Use Only

Page 48: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Exercise 4: Import Designer Workflows into Visual Studio 2010 (Sandboxed Workflow Solution)ScenarioIn this exercise, you will save a declarative workflow designed in Microsoft SharePoint Designer as a template in a SharePoint solution package (.wsp) file. You will learn to import your workflow template into the Microsoft Visual Studio 2010 development system, and repackage it as a Visual Studio 2010 project. You will leverage the Visual Studio workflow project to create a solution package that contains both a declarative workflow and custom-coded workflow activities.

After completing this exercise, you will be able to:

Export the SharePoint Designer reusable workflow to a .wsp file.

Import the .wsp file into Visual Studio by using the Import Reusable Workflow project template.

Alter the workflow by adding code and workflow activities.

Use the imported workflow in a SharePoint site.

NOTE: This Exercise is Optional

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A.

Export the Designer Workflow

1. Click Start | All Programs | SharePoint | SharePoint Designer 2010

2. Click Open site.

3. Type http://intranet.contoso.com (or the site where you created and published the Department approval workflow in Exercise 3). Click OK

4. On the left pane, under Site objects, select Workflows.

5. Under Reusable Workflow, you should see Department Approval Workflow (Created from Exercise 3)

6. Right click on Department Approval Workflow and click Workflow Settings.

7. On the ribbon, under the Workflows tab, click Save as Template.

44 © 2023 Microsoft Corporation. All rights reserved.

Page 49: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

8. The workflow will be saved into the Site Assets library. You will see the following message:

9. Click OK.

Download the workflow solution package.

10. Open Internet Explorer browser and browse to http://intranet.contoso.com/ (or to the site where you published the workflow)

11. From Site Actions, select View All Site Content.

12. Click on Site Assets.

13. Locate Department Approval Workflow. From the drop-down menu, select Send To. Click Download a Copy.

14. Save the file as Department Approval Workflow.wsp on to your local drive.

Import the .wsp file into Visual Studio 2010

15. Click Start | All Programs | Microsoft Visual Studio 2010 | Microsoft Visual Studio 2010.

16. From the File menu, choose New. Select Project.

45 Microsoft Confidential - For Internal Use Only

Page 50: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps17. Under Installed templates, Expand Visual C#

18. Expand SharePoint. Click 2010.

19. Select the Import SharePoint Solution Package from the list.

20. Type DepartmentApproval as the name of the project, and browse to a location on your local drive where you want to save the project. (Ex: C:\SharePoint Projects\)

21. Check Create directory for solution.

22. Click OK.

23. In the SharePoint Customization Wizard dialog, enter the following:

a. Local site for debugging: http://intranet.contoso.com

b. Check the option Deploy as a sandboxed solution.

46 © 2023 Microsoft Corporation. All rights reserved.

Page 51: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

24. Click Next.

25. Browse to the location of the Department Approval workflow.wsp file. Click Next.

26. Select all the items in the list. Click Finish.

47 Microsoft Confidential - For Internal Use Only

Page 52: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps27. Wait for a few seconds for the import to complete.

Customize the imported Workflow.

Visual Studio 2010 offers a host of capabilities with custom coding. However, the scope of this Lab does not cover heavy custom coding. The intention of this lab is to introduce the concepts of exporting reusable workflows to Visual Studio for customization.

In the following steps, you will add a very simple workflow event which involves no coding. While the actual outcome of the event is not very significant, the same steps can be extended to create complex coding.

The toolbox contains a number of events that can be dragged to the designer and tailored for custom action.

28. From the Solution Explorer, expand all elements under Modules.

29. Locate a file with the .xoml extension

NOTE: The name of the file could be different in your solution.

30. Right click the .xoml file, and click View Designer.

31. The workflow (flowchart) will open up in the designer canvas.

32. From the toolbar, click the icon for Toolbox

33. The toolbox will be displayed on the left pane.

48 © 2023 Microsoft Corporation. All rights reserved.

Page 53: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

Add Workflow Activities.

34. From the toolbox, drag a LogToHistoryListActivity event and drop it right below the OnWorkflowActivated event.

35. Right click on the LogToHistoryListActivity1 event, and click Properties.

49 Microsoft Confidential - For Internal Use Only

Page 54: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

36. In the Properties window, set the following Properties.

a. History Description: This is a Custom Workflow Event.

b. History Outcome: Custom Event triggered.

37. Click the Save icon to save the workflow.

38. From the Build menu, select Deploy DepartmentApproval. Wait for the

50 © 2023 Microsoft Corporation. All rights reserved.

Page 55: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Stepssolution to be deployed to the site as a feature and become activated.

39. Click Resolve Automatically in the Deployment Conflicts screen.

40. Close the Visual Studio Solution.

Test the Workflow 41. Open Internet Explorer browser and browse to your SharePoint site at http://intranet.contoso.com

42. From Site Actions, click Site Settings.

43. Under the section Site Actions, click Manage Site Features.

44. Scroll down the list until you find the workflow deployed as a feature. The name of the feature would be Workflow template "Department Approval Workflow" from Web template <your site name>. You will also see that this workflow has been activated.

45. Navigate to the Corporate Policies library that you created in Exercise 3.

46. On the ribbon, click Library Tools.

47. Click Library.

48. Click Library Settings.

49. Under the section Permissions and Management, click Workflow Settings.

50. You will see a new upgraded version of the workflow active in the document library

51 Microsoft Confidential - For Internal Use Only

Page 56: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

51. Navigate to the Corporate Policies document library. Click Add a new document.

52. Browse to a new document (You should create a new test document as you did in Exercise 3) and upload it.

53. Click Save.

54. Click In Progress.Note: Sometimes the workflow can take a few seconds to few minutes to start when there is a heavy load on the SharePoint server. You could possibly see a message: " Note: Due to heavy load, the latest workflow operation has been queued. It will attempt to resume at a later time."

Wait for a few seconds (or minutes) and refresh the browser window.

55. Check the Workflow History section in the workflow status page. You will see that before the first task is assigned the custom event is triggered. A message is logged to the history list.

52 © 2023 Microsoft Corporation. All rights reserved.

Page 57: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

53 Microsoft Confidential - For Internal Use Only

Page 58: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Exercise 5: Workflow FormsScenarioThroughout the earlier labs, the workflows created and displayed user forms. Since the forms were auto generated, you probably did not pay much attention to it. In this lab, you will take a closer looks at the workflow forms. You will add conditions, actions and activities to the workflow and examine the resulting forms that the workflow creates. Finally, you will customize the layout and the functionality of the workflow forms before deploying it as a part of the workflow package.

You will create a 'Purchase Request" list and attach a workflow to automatically approve the request if the value of purchase is less than a certain amount. Otherwise, route the request for approval.

After completing this exercise, you will able to:

Create and customize a workflow Initiation Form

Create and customize a workflow Task Form

Publish workflow packages with InfoPath forms.

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A.

Create SharePoint List 1. Open Internet Explorer browser and browse to http://intranet.contoso.com

2. From Site Action, Select More Options.

3. In the Create dialog, select Custom list.

4. Type Purchase Orders as the name of the list. Click Create.

Create additional list columns

5. Navigate to the custom list at http://intranet.contoso.com/lists/Purchase Orders/

6. On the ribbon menu, click List Tools,

7. Click List.

8. Click Create Column.

9. Create a new column with the following specifications:

Name and Type:

Column Name: Details

54 © 2023 Microsoft Corporation. All rights reserved.

Page 59: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed StepsColumn Type: Multiple Lines of Text

Additional Column Settings:

Require that this column contains Information: Yes

Number of line for editing: 6

Click OK.

10. Similarly, create another columns with the following specifications:

Name and Type:Column Name: PO AmountColumn Type: Currency

Additional Column Settings:Require that this column contains Information: YesEnforce unique values : No Number of decimal places : 2 Default value : Currency Currency Format : United States

Click OK.

Configure additional list settings

11. On the ribbon, click List Settings.

12. Under General Settings, Click Versioning Settings.

13. Select YES for the option Require Content approval for submitted items.

14. Click OK.

Design a SharePoint Designer Workflow

15. Click Start | All Programs | SharePoint | SharePoint Designer 2010

16. Click Open Site.

17. Type http://intranet.contoso.com/ as the site name. Click Open.

18. On the left pane, under Site Objects, select Workflows.

55 Microsoft Confidential - For Internal Use Only

Page 60: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

19. On the ribbon, under the Workflows tab, click List Workflow.

20. Select Purchase Orders.

21. Type PO Management as the name of the workflow. Click OK.

56 © 2023 Microsoft Corporation. All rights reserved.

Page 61: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

22. On the ribbon menu, click Initiation Form Parameters.

23. Click Add.

24. In the Add Field dialog, create a new field Approver of type Single line of text. Click Next.

25. In the Column Settings page, set the Default value to [email protected]

57 Microsoft Confidential - For Internal Use Only

Page 62: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

The scenario here is that if the PO amount is less than $5000, the PO is automatically approved; otherwise it goes to the approver

Click Finish.

26. Click Add.

27. Create a new field called Auto Approval Amount. Select Number as the Information Type.

Click Next.

28. Set the default value to 5000 in the Column Settings screen. Click Finish.

29. Click OK.

30. Save the Workflow

58 © 2023 Microsoft Corporation. All rights reserved.

Page 63: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Stepsfor approval. 31. Publish the workflow.

Customize the Initiation Form

32. Click on the Workflow tab

33. Under List workflow, you will see PO Management. Right click PO Management and click Workflow Settings.

34. In the Forms section, you will see a InfoPath form named PO Management.xsn, of type Initiation. This is the INITIATION FORM.

35. Click on the form to open it in InfoPath designer 2010. The InfoPath form will look as follows:

Note: You can change the form layout and the look and feel of the form if you want. But for the purpose of this Exercise, close the form without making any changes.

36. In the workflow designer canvas, click inside the Step 1 block.

37. From the ribbon menu, click Condition, and select If current item field equals value.

38. Click field and select PO Amount.

59 Microsoft Confidential - For Internal Use Only

Page 64: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

39. Click equals, and select "is greater than".

40. Click value. Click the [fx] button

41. Set the following Lookup InformationData Source: Workflow Variables and ParametersField from source: Auto Approval Amount

42. Click OK.

Create Task Form 43. On the ribbon, click Action.

44. Under Task Actions, select Assign a To-do Item.

60 © 2023 Microsoft Corporation. All rights reserved.

Page 65: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

45. Click a to-do item.

46. Click Next in the Custom Task Wizard dialog box.

47. Create a new task as follows:

Name: PO Approval Needed.

Description: The PO amount is greater than the set amount. Please review and approve.

61 Microsoft Confidential - For Internal Use Only

Page 66: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

48. Click Finish.

49. Click these users.

50. Select Workflow Lookup for a User... and click Add >>

51. Select the following:

Data Source: Workflow Variable and ParametersField from source: ApproverReturn field as: As String

62 © 2023 Microsoft Corporation. All rights reserved.

Page 67: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

Click OK.

52. Click OK.

53. Save the workflow

54. Publish the workflow.

55. Go to the Workflow Settings tab as before, and check out the Forms section.

56. You will see another form with File Name PO Approval Needed.xsn of Type Task.

57. This is the TASK FORM

Click the form to Open it in InfoPath 2010, and take a look. You can change the layout and the arrangement of the fields if needed. However, for the purpose of this lab, close the form without making any changes.

Test the Workflow 58. Open Internet Explorer browser and navigate to the Purchase Orders list.

59. Click Add a new Item.

60. Create a new PO request as follows:

63 Microsoft Confidential - For Internal Use Only

Page 68: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

Click Save.

61. For the purpose of this lab, and to view the Workflow Initiation form, let us start the workflow manually.

62. From the drop-down menu for the list item, select Workflows

63. Under Start a New Workflow, click PO Management.

64. You should see the Workflow Initiation form and the default values.

65. Click Start.

66. The workflow has started on the List item. The Status of the workflow is In Progress.

64 © 2023 Microsoft Corporation. All rights reserved.

Page 69: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed Steps

67. Click the link In Progress.

68. In the Task section of the workflow status page, you will see that an approval task is assigned to [email protected] (The approver from the Initiation form)

69. From the top right, click on the drop-down next to the currently logged in user name. Select Sign in as Different User.

70. Login to the SharePoint site as contoso\davids (password: pass@word1)

71. In the Workflow Status page, under Tasks section, select the item in the Related Content Column.

72. On the Ribbon, click Approve/Reject

65 Microsoft Confidential - For Internal Use Only

Page 70: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Task Detailed Steps

73. Set the Approval Status to Approved. Click OK.

74. Back in the Workflow Status page, click the Title PO Approval Needed.

75. Click Complete Task. (In the Task Form)

76. In the Purchase Orders library, you will now see that the Approval Status is Approved, and the PO Management Workflow is Completed.

66 © 2023 Microsoft Corporation. All rights reserved.

Page 71: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Appendix

Task Detailed StepsYou have now completed this lab

67 Microsoft Confidential - For Internal Use Only

Page 72: Lab Environment - download.microsoft.comdownload.microsoft.com/.../Lab03-Workflows-in-SharePo…  · Web viewHe also is a certified Project Management Professional (PMP). ... SharePoint

Workflows in SharePoint 2010- Exercise 5: Workflow Forms

Appendix

Labcode Manual Version Last UpdateVersion 7 12/8/2010 6:38:00 PM

Lab Notes

Description Details

Virtual Machine Requirements

Virtual Machine Name Details

68 © 2023 Microsoft Corporation. All rights reserved.