SharePoint Designer’s new workflow editor: introduction
Hi everybody, I’m Travis from the SharePoint Designer development team. Hopefully by now some of you have been able to download and evaluate the beta for SharePoint and SharePoint Designer 2010. (If you haven’t, consider this a sneak preview for the upcoming release.) SharePoint Designer 2010 has a brand new workflow editor. If you’ve used SharePoint Designer workflows in the past, the new editor might seem a bit overwhelming at first, but we’re confident that once you get used to it you’ll really appreciate the new features. These new tools give you more power and expressiveness in your workflows, and let you build them even faster than before.
For the purposes of this tour, I’m assuming that you have at least a little experience building workflows with SharePoint Designer. If you’d like to learn more about SharePoint workflows, check out the introductory content on Office Online.
Let’s take a look. First, create or open a site in SharePoint Designer. (SharePoint Designer 2010 only works against SharePoint 2010 servers, so you’ll need to have a test server up and running to follow along.) Once your site is opened, you’ll see the new site settings page, along with the ribbon, also new for this version. SharePoint Designer 2010 lets you create more types of workflows than before. In addition to a List Workflow, a workflow attached to a list just like you could create in the 2007 version, you can also create Reusable Workflows that can be used on multiple lists or content types, and Site Workflows that don’t use a list at all. (To see more options for creating workflows, check out the Workflows page by using the navigation pane on the left.) For now, let’s create a regular list workflow. Click the List Workflow button on the ribbon and then choose a list to attach it to from the dropdown list, such as Announcements. You’ll be asked to name your workflow, so give it a memorable name (I suggest “foofles”) and press Enter to create the workflow.
After you do that, you’ll be immediately taken to the new workflow editor. If you have any experience with the old one at all, you’ll notice that the new one is strikingly different. First off, like just about everything else in the new SharePoint Designer, it lives in a tab, so you can switch to other tabs, do other stuff, and then come back and continue working without having to save or close. You may also remember that the old workflow designer showed you one step of your workflow at a time, but the new one shows you your entire workflow at once. With a new workflow you should see a single box called “Step 1,” and a blinking orange cursor that I have lovingly named “Hypnocursor.” (That name didn’t really catch on.)
A workflow isn’t that useful with no actions in it. So, to insert your first action, click the Actions button on the ribbon to drop down the actions gallery. (Tip: If the Actions button isn’t enabled, it’s because your insertion point isn’t in a place where you can insert an action. Click in the middle of Step 1 and the Actions button should light up again. Clicking the edges of the step will select the whole thing, which isn’t what you want.) You’ll see your old favorite actions in the Actions list, as well as a host of new actions that we’ve added in this release. Go ahead and choose an action from the list to insert it. Now things should be pretty familiar—you get a sentence with little blue links that you can click to fill in the blanks. When you click links, things work mostly as they did in the last version, though the rest of the workflow team has been hard at work adding a bunch of new features that are a little out of the scope of this tour.
To insert your first condition, click the Conditions button on the ribbon to see the conditions gallery. Choose a condition and insert it. (You may notice that the top two conditions have been renamed—for example, “Compare any data source” is now called “If any value equals value.”) Whoa—inserting a condition adds a big new block to the editor, and you’ll notice that the condition is after the action you already inserted. This isn’t a mistake. The new workflow editor lets you have multiple conditional blocks, each with their own set of branches, in each step. They can be one after another, or you can even put conditional blocks inside of other branches. Actions inside of a branch will only happen if the conditions of the branch are met, just like before. If you put actions before or after a conditional block (a series of connected branches with conditions), those will happen before or after the actions that execute conditionally. To do that in SharePoint Designer 2007 would have required several steps, but you can do it all in the same step now if you want.
But, we want the action to happen only if it meets the condition we just created, and it’s easy to fix this. Just click on your action (anywhere except for a hyperlink) to select it. Then, use the Move Up and Move Down buttons on the ribbon to move it into the conditional branch. It will get indented so it’s easy to tell which branch it belongs to. You can even use Move Up and Move Down to move actions from one step to another.
It doesn’t stop at just moving actions, though. Let’s go ahead and add a new step to the workflow. Click in the space below Step 1 to move your cursor down there. Then, click Step on the ribbon to add a new one. Now, you can select that whole conditional block you created. When you move your cursor over the block, notice that you get a rectangle highlight over the branch and block. You can click on the thick bar to the left of the block to select the whole thing.
Once the block is selected, you can use the same Move Up and Move down buttons to move the whole block into the next step!
There’s one more time-saving feature that I’d like to show you today, and that’s the ability to save a nonfunctional draft of your workflow. In the old workflow dialog, you’d click Finish to save your changes, which would upload a bunch of files to the server, compile them, verify them, and do a bunch of stuff that can sometimes take a long time. You can do that in the new editor too, using the Publish button on the ribbon. But when you’re first building your workflow, you don’t really need to compile it or build forms for it or any of that stuff. You don’t even want it to show up in the list of workflows for a list until it’s ready. So, we’ve added a regular Save command this time around. When you click Save on the Quick Access Toolbar in the upper-left corner (or press Ctrl+S or any other way you normally save things), your workflow files will still be saved on the server, but all of the other parts of the process will be skipped, so it doesn’t take nearly as long. When you’re finished with the first version of your workflow and are ready to deploy it, then you can use Publish to finalize it and make it live.
Well, this post is already getting long, so this seems like a good place to end it. Stay tuned for another post about the cool keyboarding features in our new workflow editor, coming shortly.