Download - SharePoint Workflow Whitepaper

Transcript
Page 1: SharePoint Workflow Whitepaper

1

SharePoint Workflow Authoring in Visio Premium 2010

Page 2: SharePoint Workflow Whitepaper

Table of Contents

Topics covered in this whitepaper include: SharePoint workflow authoring experience in Visio Premium 2010 Visualization of SharePoint Designer 2010 workflows Workflow visualization in SharePoint with Visio Services

ContentsCover Sheet................................................................................................................................. 2

Introduction.............................................................................................................................. 2

Table of Contents......................................................................................................................... 1

SharePoint Workflow Authoring in Visio Premium 2010...............................................................2

Workflow Validation..................................................................................................................5

Exporting Workflow to SharePoint Designer 2010..................................................................11

Visualization of SharePoint Designer 2010 Workflows...............................................................12

Export a workflow from SharePoint Designer 2010 into Visio Premium 2010.........................12

Collaborating on Workflow Design through Round-tripping....................................................14

Workflow Visualization in SharePoint with Visio Services........................................................14

Level of Workflow Support......................................................................................................16

Page 1

Page 1

Page 3: SharePoint Workflow Whitepaper

SharePoint Workflow Authoring in Visio Premium 2010

IntroductionMicrosoft® Visio® has long been the tool of choice for documenting processes. Ever since the

introduction of workflow support in Microsoft® Office SharePoint Server® 2007, we have been hearing from customers, “wouldn’t it be great to visualize SharePoint workflows in Visio like flowcharts? Wouldn’t it also be great to go from Visio business process diagrams to executable workflows on SharePoint?”

Since then, the Visio team and the Microsoft® SharePoint Designer® team have partnered to enhance the workflow authoring experience. In Visio Premium 2010, SharePoint workflows can be authored as a flowchart and exported to SharePoint Designer 2010. For business analysts who are used to defining business processes in Visio, it means there is now an easy way to translate business logic in Visio to workflow rules in SharePoint Designer.

Visio Premium 2010

SharePoint Designer 2010

Business AnalystBusiness Analyst IT ProfessionalIT Professional

Automate business logic

WorkflowWorkflowVisio Drawing

Workflows authored in SharePoint Designer 2010 can also be imported into Visio Premium 2010. For IT professionals who have been implementing SharePoint workflows in SharePoint Designer, it means there is now an alternative way to present these workflows in a visual representation for documentation and for sharing with a broader audience.

Visio 2010 Premium

SharePoint Designer 2010

Business AnalystBusiness Analyst

IT ProfessionalIT ProfessionalWorkflowWorkflow

Visio Drawing

SharePoint (Visio Services)

Process StakeholdersProcess Stakeholders

Visio Web Drawing

Visualizebusiness logic

Page 2

Page 2

Page 4: SharePoint Workflow Whitepaper

This whitepaper gives an overview of how Visio Premium 2010 and SharePoint Designer 2010 together enable easier workflow authoring and tracking. It also includes detailed tips for working successfully between Visio and SharePoint Designer.

SharePoint Workflow Authoring in Visio Premium 2010With Visio Premium 2010, we allow Business Analysts and Process Analysts who are already familiar with flowcharting in Visio to continue to author their business logic in Visio, but we also allow them to go further by exporting that business flow to SharePoint Designer 2010 such that the workflow can be automated in SharePoint.

In Visio Premium 2010, we are introducing a brand new drawing template for authoring SharePoint workflows. When you launch Visio, you can click on New under the File tab, click on the Flowchart Template Category, then click on Microsoft SharePoint Workflow to start authoring a SharePoint workflow.

Note that SharePoint Workflows should only be created from the SharePoint Workflow template, not other Flowchart templates. Visio does not recognize basic flowcharts or any other non-SharePoint Workflow shapes as SharePoint workflows.

Page 3

Page 3

Page 5: SharePoint Workflow Whitepaper

Page 4

Page 4

Page 6: SharePoint Workflow Whitepaper

Upon opening the drawing, three stencils are available: SharePoint Workflow Actions, SharePoint Workflow Conditions, and SharePoint Workflow Terminators.

All shapes in the SharePoint Workflow stencils directly correlate to workflow activities provided out-of-box in SharePoint. A workflow action is a “task” or a “step” in the workflow. “Send an Email” is an example of a SharePoint workflow action. A workflow condition is similar to a decision shape in a flowchart, where a flowchart path is dependent on some parameter or logic. An example of a SharePoint workflow condition is “Created By”, where the next workflow activities to execute depends on who created the item in the workflow. Finally, a workflow terminator is used to signify the start or the end of a workflow.

To start authoring a SharePoint workflow, you can drop shapes to the drawing canvas, just like creating any flowchart in Visio. All workflows should start with the Start shape, and end with the Terminate shape. For connectors following a condition shape, you can right-click on the connector, and click on “Yes”, “No”, or “(Blank)” to add a label to the connector.

Page 5

Page 5

Page 7: SharePoint Workflow Whitepaper

You can also modify the original shape text and replace it with text more relevant to your business process. This shape text is shown in SharePoint Designer after the workflow is exported from Visio. This can help the SharePoint Designer user better understand the purpose of the workflow activity.

Workflow ValidationTo successfully export a workflow to SharePoint Designer 2010, the workflow must first be valid. To validate a workflow, users can click on the Process tab, and click on the Check Diagram button.

In the event that your workflow has issues, an Issues window will pop up, and the shape having the issue will be highlighted.

Page 6

Page 6

Page 8: SharePoint Workflow Whitepaper

While some issues are more common than others, here is a complete table of possible issues as you validate your diagram. This table also includes sample diagrams for each issue, and suggestions on how to fix the diagram. All workflows to be exported to SharePoint Designer must be sequential workflows. State machine workflows and workflows with loops are not supported by SharePoint Designer, and Visio will raise validation issues for such workflows. In addition, Visio

does not support the exporting of workflows to Microsoft® Visual Studio®.

Rule Description Sample Diagram with Issue SuggestionsA Custom action cannot be added to a workflow diagram. The Custom action can only be generated when importing workflow from SharePoint Designer.

To signify an activity that does not yet exist, the “Add a Comment” action should be used. Users should not create a new Custom action from an existing one through copy and paste.

A Custom condition cannot be added to a workflow diagram. The custom condition can only be generated when importing workflow from SharePoint Designer.

To signify an activity that does not yet exist, the “Add a Comment” action should be used. Users should not create a new Custom condition from an existing one through copy and paste.

A Compound condition cannot be manually added to a workflow diagram. The compound condition can only be generated when importing workflow from SharePoint Designer.

To signify a condition that does not yet exist, the “Add a Comment” action should be used. Users should not create a new Compound condition from an existing one through copy and paste.

Page 7

Page 7

Page 9: SharePoint Workflow Whitepaper

Duplicate connections exist between workflow shapes.

Created by a Specified Person Update List ItemYes

Assign Item for Approval

No

Remove excess connector by selecting connector and delete.

Loop back to parent shape is not allowed. Created by a Specified Person Update List ItemYes

Assign Item for Approval

No

Neither Visio nor SharePoint Designer support workflows with loops. Check for loops and delete the looping connections.

Parallel activities that are also sequential are not allowed.

Avoid parallel activities that are also sequential by adjusting the flow logic such that the activities are only parallel or only sequential.

Compare document field Send an emailYes

No

Collect data from a userCreated by a specified person Yes

No Add time to date

Avoid connectors pointing to the same activity from multiple paths by duplicating the activity:

Page 8

Page 8

Page 10: SharePoint Workflow Whitepaper

Created by a specified person Compare document field Send an email

Add time to date

Collect data from a user

Collect data from a user

If dealing with parallel blocks thatare one after another (usually workflows constructed from SharePoint Designer), use the “Add a Comment” shape between the two parallel blocks such that the blocks are separated cleanly:

Assign a to-do item

Send an email Create list item

Do calculation

Add a comment

The condition shape does not have connections labeled with Yes or No.

Created by a specified person Yes

Add time to date

Start feedback process

Right-click on the connector to assign label “Yes” or “No”.

The condition shape must have at least one outgoing connection with label Yes or No.

Created by a specified person

Add time to date

Ensure condition shape has an outgoing connector connected to another workflow shape.

The connector is not a SharePoint Workflow connector. Ensure the correct connector is used by using the connector

Created by a Specified Person Update List Item

Assign Item for Approval

No

Avoid reusing connectors from other diagrams as they are not necessarily designed to be used with SharePoint Workflows. Delete the selected connector and replace with a new connector inserted through the connector tool or AutoConnect.

Page 9

Page 9

Page 11: SharePoint Workflow Whitepaper

tool or AutoConnect.The connector must be connected to two workflow shapes.

Created by a Specified Person Update List ItemYes

Assign Item for Approval

No

Ensure dangling connector is removed or is connected to a valid workflow shape.

The diagram must only have one workflow and one Start shape.

Created by a Specified Person

Send an Approval

Update List Item

Log to History List

Ensure all paths originate from the same Start shape by removing the second Start shape and connect the following activities to the first and only Start shape.

The shape is not a SharePoint workflow shape. Only SharePoint workflow shapes can be connected in a workflow.

Created by a Specified Person Update List ItemYes

Assign Item for Approval

No

Ensure that only workflow shapes from the SharePoint Workflow stencils are used. Non-workflow shapes are not recognized and would prevent the workflow from being exported to SharePoint Designer.

The Start shape must not have incoming connections.

Created by a Specified Person Update List ItemYes

Assign Item for Approval

No

Remove the incoming connector connected to the Start shape.

Page 10

Page 10

Page 12: SharePoint Workflow Whitepaper

The Terminate shape must not have outgoing connections.

Created by a Specified Person Update List ItemYes

Assign Item for Approval

No

Remove the outgoing connector connected to the Terminate shape.

The workflow must have a Start shape. Created by a Specified Person Update List ItemYes

Assign Item for Approval

No

Ensure the workflow in the page starts with a Start shape.

The workflow shape is not connected to a Terminate shape.

Created by a Specified Person Update List ItemYes

Assign Item for Approval

No

Ensure the workflow shape is connected to another workflow shape or a Terminate shape.

The workflow shape is not connected to the workflow.

Created by a Specified Person Update List ItemYes

Assign Item for Approval

No

Create List Item

Ensure the workflow shape is either removed or have it connected to another workflow shape on the page.

Workflow nesting levels must not exceed a maximum of 10.

n/a Visio can only handle up to 10 levels of nesting of workflow activities. Reduce the complexity of the workflow by splitting up the workflow into two or by eliminating activities.

Page 11

Page 11

Page 13: SharePoint Workflow Whitepaper

Exporting Workflow to SharePoint Designer 2010When you are done authoring your workflow in Visio, you can export the workflow to a file that can be consumed by SharePoint Designer 2010. By exporting the workflow to SharePoint Designer 2010, SharePoint site owners and IT Professionals can parameterize the workflows by binding workflow activity fields with SharePoint lookups and then publishing them as an executable workflow.

To export, simply go to the Process tab and click Export:

Visio will automatically validate the workflow first to make sure the workflow can be exported and consumed by SharePoint Designer. If there are issues related to the workflow, you will need to fix them (e.g. add connector, add Terminate shape), before you try exporting again. An issue-free workflow can be exported as a Visio Workflow Interchange (*.vwi) file.

The Visio Workflow Interchange file can in turn be imported into SharePoint Designer 2010. In SharePoint Designer 2010, users can first select Workflows in the Site Objects panel, then click

the Import from Visio button in the Workflows tab to import the workflow into SharePoint Designer 2010.

The imported workflow is surfaced in SharePoint Designer as text, and all custom shape text in the Visio diagram are imported into SharePoint Designer as activity labels (the gray text in the image below) to help clarify business intent:

Page 12

Page 12

Page 14: SharePoint Workflow Whitepaper

Visualization of SharePoint Designer 2010 WorkflowsWhile some workflows may be authored in Visio first, SharePoint site owners or IT Professionals may choose to start directly in SharePoint Designer 2010 and publish executable workflows from there. Visualizing such a workflow from SharePoint Designer can help with the documentation and communication of workflows to a broader audience. There are two ways the SharePoint Designer user can create such Visio visualizations:

1. Export a workflow from SharePoint Designer 2010 for use in Visio Premium 20102. Publish workflow and visualization together from SharePoint Designer 2010

We will discuss both approaches in this section.

Export a workflow from SharePoint Designer 2010 into Visio Premium 2010To visualize a workflow from SharePoint Designer 2010, the user can click the Export to Visio command on the Workflow tab and a Workflow Visio Interchange (*.vwi) file will be created:

Page 13

Page 13

Page 15: SharePoint Workflow Whitepaper

To import the file into Visio, create a new drawing using the Microsoft SharePoint Workflow template and click on the Import command in the Process tab:

From there, the workflow is visualized in Visio, and the user is free to edit and enhance the diagram just the same way as any flowchart using features such as Themes or Auto Align & Space:

Page 14

Page 14

Page 16: SharePoint Workflow Whitepaper

Collaborating on Workflow Design through Round-trippingOne additional advantage of being able to import and export a workflow between Visio 2010 and SharePoint Designer 2010 is that Business Analysts and IT Professionals can iterate together on the workflow design before implementing the workflow. Business Analysts can create and modify a workflow in Visio, and then pass it to IT Professionals who can determine more detailed workflow requirements in SharePoint Designer 2010. IT Professionals may in turn pass the workflow back to Business Analysts for final review before proceeding with implementation. For such design iterations, we recommend that users start from Visio to first define business requirements, and use round-tripping as a way to agree on the workflow sequence and SharePoint activities with IT Professionals. We do not recommend round-tripping when the workflows have already been parameterized and implemented in SharePoint Designer 2010. SharePoint Designer 2010 supports the notion of “steps” which Visio does not recognize during round-tripping. Users should therefore avoid using “steps” in workflows that are to be round-tripped between Visio and SharePoint Designer.

Workflow Visualization in SharePoint with Visio ServicesWe have discussed how workflows from SharePoint Designer 2010 can be visualized by exporting it to Visio Premium 2010. Now let’s talk about how you can visualize the workflow and see status of an executing workflow on SharePoint. SharePoint Designer 2010 supports publishing executable workflow as well as the visualization associated with the workflow to SharePoint. To do so, go to the Workflow Summary page, and check the “Show workflow visualization on status page” box (note that the checkbox is only available if the SharePoint server has Visio Services enabled and if Visio Premium 2010 is installed in the same machine as SharePoint Designer 2010):

Page 15

Page 15

Page 17: SharePoint Workflow Whitepaper

As a result, the workflow is not only being executed, but users can easily track progress of the workflow through visualization! For example, in the diagram below, there are icons indicating tasks “in progress” or “completed”. People assigned to the tasks are also displayed clearly within the Task shapes:

This is made possible by Visio Services, which enables viewing of Visio Web Drawings on SharePoint without requiring the Visio client to be installed for viewing.

Page 16

Page 16

Page 18: SharePoint Workflow Whitepaper

Level of Workflow SupportVisio only supports workflows intended to be published through SharePoint Designer. Workflows from Visual Studio, or custom activities authored by third party developers are not recognized by Visio. For all non-SharePoint activities that are unknown to Visio, Visio will visualize them as a “Custom action” or “Custom condition”, as shown below:

Conclusion

As businesses increasingly look to capture and optimize business processes to ensure compliance and efficiency, there is a great opportunity to automate these business processes as workflows on SharePoint. With Visio Premium 2010 and SharePoint Designer 2010, moving business processes to execution on SharePoint and tracking such workflows visually is easier than ever.

Page 17

Page 17