SharePoint Designer’s new workflow editor: introduction

SharePoint Designer’s new workflow editor: introduction

  • Comments 13

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.

Figure 3. A workflow with an action and condition in the wrong order.

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.

Figure 4. The corrected workflow.

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.

Figure 5. Select an entire conditional block by clicking on the bar to the left.

Figure 6. The selected conditional block.

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.

  • 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

  • @Jeroen: Unfortunately, no, sentences don't wrap to multiple lines, but we did do some work to reduce the need for it somewhat by truncating long strings, so instead of

    Log this exceedingly long message Exception text follows: --> System.NullReferenceException at blah.blah.whatever, at et cetera <-- The file has been converted, but may have errors.  [%Variable:details%] to the workflow history list

    ...you might see...

    Log this exceedingly long... to the workflow history list

    In addition to that, since the workflow editor now fills most of the SharePoint Designer window (and you can even collapse the navigation pane on the left), most of the time you won't mind not having word wrap.  The out-of-the-box approval workflows and actions are pretty verbose, and you can generally still see those without a horizontal scroll bar.

  • Thanks Travis,

    Is there any reason why wrapping can't be implemented? It would really help us.

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

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

  • 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

  • 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?

  • Thank you great information on your site that sharepoint

  • Thanks to a very good market sharepoint Occurred

  • What i miss

    For each item in list

     If item.title equals then ...

    next

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

  • вот все описывают теорию создания процессов, но не привидят практ.примеров.

    Как например задать:

    если текущая дата позднее даты создания елемента, скажем, на 3 дня - выполнить то или иние событие?

  • Hi, All,

    Here everyone describe the theory of creation of processes, but do not give practical examples.

    As for example to set:

    If current date after date of creation елемента, say, for 3 days - to execute this or that event?

Page 1 of 1 (13 items)
Leave a Comment
  • Please add 1 and 4 and type the answer here:
  • Post