Chapter 20. Creating Workflows with SharePoint Designer

IN THIS CHAPTER

Exploring the Workflow Designer interface

Investigating the SharePoint Designer workflow files

Using conditions in Workflow Designer

Working with workflow actions

If you're a Web designer or an information worker interested in designing workflows on SharePoint sites and don't really want to write custom code for implementing them, SharePoint Designer may be the ideal tool for you. You can declaratively create sequential workflows for SharePoint sites by using Workflow Designer, which is provided with SharePoint Designer. Workflow Designer, which is available only for SharePoint sites, both WSS v3 and MOSS, is the tool that SharePoint Designer provides to create workflows, associate them with SharePoint lists and libraries, check for errors in workflows, and deploy them to SharePoint sites.

The workflow feature of SharePoint Designer is made possible by the fact that SharePoint workflows can be compiled at runtime just before the first time they run on a SharePoint Web site. Using the Workflow Designer interface, Web designers can visually create workflows. Internally, SharePoint Designer creates some special files that store information about the workflow configuration and settings made by using the Workflow Designer user interface. SharePoint Designer uploads these files into a special document library inside a SharePoint Web site. SharePoint Designer also makes use of the capabilities of SharePoint to associate the workflow with the list or library for which it's being created. Whenever the first instance of the workflow is spawned, the workflow is compiled and made available for the rest of the instances. So, rather than compiling a workflow as a dynamic link library (.dll) and deploying it on a SharePoint Web server, SharePoint Designer relies on the just-in-time compiling abilities of the Windows Workflow Foundation and SharePoint for running the workflows. This nature of the workflows created by using SharePoint Designer assumes that they only run on the SharePoint list with which they're associated. Because of this, SharePoint Designer workflows aren't reusable across lists and libraries.

For example, if you want to use a workflow that you created by using SharePoint Designer for one SharePoint list on another, you would really need to re-create that workflow for the other list separately. You won't have the means to reuse the same workflow with multiple lists.

The overall development process of a workflow in Workflow Designer necessitates doing the following:

  • You use SharePoint Designer to open a SharePoint Web site that has user-defined workflows enabled for it.

    NOTE

    For more on enabling user-defined workflows on a SharePoint site, see Chapter 21.

  • Using Workflow Designer, you begin workflow creation by choosing a SharePoint list or library to which the workflow can be associated.

  • At the very least, you define one step in the workflow by using the predefined conditions and actions that Workflow Designer exposes.

  • When you finish the workflow creation, the created workflow files are deployed to a special document library inside the SharePoint site.

While the terminology around workflow initiation and association was discussed in Chapter 19, you still need to be aware of the following terms from the perspective of designing workflows by using SharePoint Designer:

  • Step: To help define a logical sequence of operations that are performed by the workflow, Workflow Designer allows you to break your workflow into steps. This is essentially a mechanism to reduce confusion while creating larger, complex workflows and to help provide a structure to the workflow. Because many workflow processes are divided into logical steps, Workflow Designer allows you to maintain the logical structure of the workflow by using steps.

  • Condition: Conditions are rules that you can use for deciding the course of action in a step of a SharePoint Designer workflow. In workflow terminology, a condition is more or less a special kind of activity that can be used to make a decision based on comparison. SharePoint Designer allows you to use predefined conditions available with Windows Workflow Foundation or installed with SharePoint Services to develop a logical if/else flow for performing actions in a workflow step.

  • Action: Actions are operations that you can perform in a workflow step. Actions exposed in Workflow Designer are predefined workflow activities installed with SharePoint that are specially designed to provide certain capabilities to workflows for interacting with SharePoint lists and libraries.

Throughout this chapter, the various conditions and actions that Workflow Designer makes available for you to use in workflows are discussed. It's important to understand that these workflow activities and conditions are made available by the SharePoint site that you're working with in SharePoint Designer. So, you need to always be connected to a workflow-enabled SharePoint site to be able to use SharePoint Designer's workflow tools. Developers can also programmatically create customized conditions and actions and then install them on the SharePoint Web server to be made available in the Workflow Designer interface. Before discussing the various conditions and actions that you can use in Workflow Designer, I familiarize you with the Workflow Designer user interface.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.134.17