Monday, September 21, 2009

SharePoint Designer 2010 Workflow Second Look

So, after last weeks first look at SharePoint Designer 2010 workflow, I think it’s time to take another look and see what our future brings. At least if you are a SharePoint Designer :-)

In the previous post I introduced you to the designer experience, showing you the new authoring surface and some of the dialogs. In this post I’m going to show you some new features and also how to export and import workflows from Visio 2010.

Exporting SharePoint Designer workflows to Visio

First, let’s start by creating a very simple workflow to notify the site owners of new items. In the image below, I have added a single Send an email action.

Figure 2

The Email action will be familiar to most SharePoint Designer workflow developers but some new features are very cool. Check out the new sources in the workflow lookup. The sources you see in the image below are in addition to the current item and workflow data sources.

Figure 1

Note also that you can build the subject inline now, rather than having to rely on an added Build dynamic string action.

Let’s see what happens when we export this workflow to a Visio 2010 workflow format. hitting the Export to Visio button in the Ribbon and saving the file results in a Visio Workflow Interchange (vwi) file. When you go into Visio, you can choose to import that file in order to make changes to the flow. In our case, this isn’t much, but it does yield a more traditional view of the workflow process.

Figure 3

The thing you need to know, however, is that you cannot really make and configuration changes to the workflow in Visio. Granted, you can add new actions and rearrange the flow, but you cannot set the properties for any of the actions.

For this, you need to export the workflow from Visio again into the same VWI format used for sending workflows back and forth between SharePoint Designer 2010 and Visio.

Even if Visio cannot change the properties, any properties you set in SharePoint Designer survives the import and export routine. Thus, when importing the Notify Administrator workflow that was exported from SharePoint Designer back into SPD again, al the properties remain in place. This is very useful, since a SharePoint Designer workflow author can set up all the various actions of a workflow and allow Visio users to rearrange the workflow without fear of losing the configuration.

Let’s up the ante a bit to see what we can get out of the Visio authoring experience.

Using Approval Process

Let’s add an approval process to our workflow. Using the SharePoint Designer workflow authoring surface, I make sure the workflow cursor is below the first step and type step to add a new step to the workflow. I then place the cursor inside the step and type ‘appro’ and hit enter to get a list of the available approval actions, as seen below.

Figure 4

The first action is the one I want, so I’ll add that, resulting in the action as seen below.

Figure 5

Now, up until this point, at least after setting the ‘these users’ parameter, you have a pretty common approval workflow, more or less just like it was in SharePoint Designer 2007. However, and this is going to blow your mind, take a look at what happens when I click the Approval Process link.

Figure 6

You may not immediately see the immense power that resides in this page. Notice, for instance, that you can add more Task Outcomes than the basic Approved and Rejected results. Each outcome will result in a button added to the workflow completion form, giving you more options for completing the approval (Yes, No, Ask again in a week, Keep dreaming, Hahahaha, When pigs fly, etc.)

Notice also the Settings, where you can select whether to allow assignees to reassign the task or request changes.

However, and this is the bit that will completely blow your mind, look at the Customization section. The bottom three links lead to some rather awesome options for controlling what goes on in your workflow. For example, let’s click the Change the behavior of the overall task process link, and take a look:

Figure 7

Oh, yes, those are events that you can design or modify any way you wish. The other three links in the Configuration section leads to other events.

I’ll talk more about the options here in issue 3 of the SharePoint 2010 Beta series, but let me just tell you that you have some pretty amazing options for controlling the approval workflow here, far beyond anything that comes out-of-the-box on SharePoint 2007.

Keep your eyes peeled for the next couple of days, as I will post more information from Visio and SharePoint Designer 2010. Feel free to post comments or questions as well, either here or to furuknap<[at]>gmail.com, and I’ll try to answer as much as I can :-)

.b

If you like this post or this blog, please visit the sponsors from SharePointAds.com and hear what they have to say:

0 comments: