Freigeben über


SharePoint Designer’s new workflow editor: introduction

Travis 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.

Figure 1. Create a new workflow associated with a list using the List Workflow button on the ribbon.

Figure 2. The new workflow editor with a blank workflow open and ready to edit.

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!

 Figure 7. The completed sample workflow.

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.

Comments

  • Anonymous
    February 24, 2010
    Sounds like some great improvements. I haven't checked it yet, but are long 'action sentences' finally wrapped? We have to limit the functionality and complexity of our workflow actions as the text just runs off the screen. See the screenshot at http://www.muhimbi.com/blog/2010/02/pdf-converter-for-sharepoint-32-with.html

  • Anonymous
    February 25, 2010
    The comment has been removed

  • Anonymous
    February 25, 2010
    Thanks Travis, Is there any reason why wrapping can't be implemented? It would really help us.

  • Anonymous
    February 26, 2010
    Well, sure, there's a reason, little comfort though that may be.  :)  We definitely wanted to get it in, but our UI platform didn't support it, as strange as that sounds.  We could have worked around that limitation, but to make sure it worked well enough in a variety of languages and complex scripts would have taken away time that we instead used on other features that more people will need, like the enhanced keyboard functionality and usability improvements.  With the new UI, I stopped really missing word wrap quite a while ago, and I think we made the right tradeoff.

  • Anonymous
    April 15, 2010
    Hi Travis, Can you please help me with two questions?

  1. Are cross-site workflows supported in the new version?
  2. Do you know if the designer bug described below was fixed? Bug: Changes to the supporting files do not save when you have multiple content types and custom forms. Even happens when you use the "Collect data from a user" and the custom aspx is created by designer. That custom form should be selected by default, but if you have a few content types, the default forms are selected and you are unable to change them.
  • Anonymous
    April 27, 2010
    Have tested new WF to assign users from one list to tasks in another based on matching role in both. As a role will be linked to several tasks, I would need to loop through the task list. Is there any looping functionality in the new WF editor, and if not could you point me to any description on how to achieve this using multiple worflows, or whatever?? Thanks

  • Anonymous
    July 05, 2010
    I'm using Sharepoint Foundation 2010. The only workflow I can use through the browser is 3-state. When I open SP Designer, I get many other workflow options. However, when I create a WF that updates a list on item creation/update, the WF doesn't work. Am I limited to the 3-state WF when using Sharepoint Foundation? & therefore, have to build my WFs through Visual Studio?

  • Anonymous
    February 18, 2011
    Thank you great information on your site that sharepoint

  • Anonymous
    February 18, 2011
    Thanks to a very good market sharepoint Occurred

  • Anonymous
    October 02, 2011
    What i miss For each item in list  If item.title equals then ... next

  • Anonymous
    March 12, 2012
    When will cut and paste functionality be implemented in SharePoint Designer?  I spend A LOT of time retyping very similar emails and workflow steps. I spent 2 hours typing in a workflow, only to discover that I made an error in nesting the steps at the beginning.  Step 1 now contains Step 2 and Step 3; I want Step 2 and Step 3 to be outside Step 1.  I have not found a way to move Step 2 and Step 3.

  • Anonymous
    April 01, 2012
    вот все описывают теорию создания процессов, но не привидят практ.примеров. Как например задать: если текущая дата позднее даты создания елемента, скажем, на 3 дня - выполнить то или иние событие?

  • Anonymous
    April 02, 2012
    The comment has been removed