Introduction to workflows SharePoint by sreekanthreddy

VIEWS: 77 PAGES: 27

More Info
									Introduction to workflows
Applies to: Microsoft Office SharePoint Designer 2007




Across your enterprise, teams use Microsoft SharePoint sites to collaborate on documents and share information. You want to

build a SharePoint application that improves team productivity and efficiency, but you don’t want to write code. Where do you start?


With Microsoft Office SharePoint Designer 2007, you can design workflows that add no-code application logic to your SharePoint

sites and applications. Using the Workflow Designer, you create rules that associate conditions and actions with items in

SharePoint lists and libraries. Changes to items in lists or libraries trigger actions in the workflow.


For example, suppose that a team's primary responsibilities are writing, revising, and approving contracts. These contracts are

stored in document libraries on the team site. With Office SharePoint Designer 2007, you can create a workflow that sends a

notification e-mail message to the reviewer when a new contract has been uploaded to the site. At the same time, the workflow

creates a task in the Tasks list for the reviewer. When that person reviews the contract and marks the task as complete, different

actions are triggered depending on whether the contract is assigned a status of Approved or Rejected.


Team efficiency and productivity improve because the workflow drives the process so that the team can focus on doing the work,

rather than on managing the workflow. And no programming is required to build such a solution. By creating rules in the Workflow

Designer, you can quickly add interactivity to a SharePoint solution or application.


This article introduces the basics of workflows. When you understand the basic building blocks of a workflow — events, actions,

conditions, and steps — you can quickly add application logic to your SharePoint applications.


IMPORTANT      To create a workflow, your SharePoint site must be located on a server running Microsoft Windows SharePoint

Services 3.0.


In this article

          What is a workflow?

          What are events, actions, conditions, and steps?

          What are workflow forms?

          Where are workflows stored?

          Where can I check the status of a workflow?

          Suggested next steps
What is a workflow?

Your team uses a SharePoint site to collaborate and store valuable business information in SharePoint lists and libraries. With

Office SharePoint Designer 2007, you can now attach application logic to documents or items in these lists and libraries.


With the Workflow Designer, you can attach a sequence of conditions and actions to a list or library — this sequence is a workflow.

A workflow is a natural way to organize and run a series of actions that correspond to a work process. This process can control

almost any aspect of a list item in Microsoft Windows SharePoint Services 3.0, including the life cycle of that item. The workflow

can include both actions performed by people (or workflow participants) and actions performed by the workflow. Workflow

participants can interact with the workflow through the Tasks list, where a workflow can create a task for someone and remain

paused until the task is marked complete.


Workflows can be as simple or as complex as your business processes require. You can create a workflow that the user initiates,

or a workflow that is initiated automatically based on an event, such as when a list item is created or changed.


In general, when you use Office SharePoint Designer 2007 to design a workflow, you follow these basic steps:


         Use the Workflow Designer to choose and assemble the conditions and actions that define the steps of the workflow.

         Have Office SharePoint Designer 2007 automatically generate any ASP.NET forms for workflow initiation or any

   custom SharePoint task, if necessary.

         Customize the workflow forms, if necessary.


You can think of a workflow as a flowchart of actions with a beginning, an end, and a sequential flow from start to finish. Workflows

can incorporate parallel branches, but ultimately they progress from the initial action to the final action.


For example, suppose you were to chart the workflow described earlier that routes a document in Microsoft Windows SharePoint

Services 3.0 for approval. When the workflow starts, it automatically notifies the specified reviewer by e-mail that they have a

document to review. The reviewer then reviews the document, and changes the status of the document to indicate that they have

completed their task, and whether they have approved or rejected the document. Based on the reviewer response, the workflow

proceeds down one of two parallel branches. If the reviewer approves the document, the workflow moves the approved document

to a specific document library, and then sends an e-mail message to the entire team notifying them of the approved document. If

the reviewer rejects the document, the workflow notifies the document author of this. In either case, the workflow then reaches its

end and the process is completed.
  Top of Page



What are events, actions, conditions and steps?

These are the building blocks of a workflow. A workflow consists of one or more steps, and each step consists of actions and any

associated conditions. Each workflow is initiated by an event.


What are events?

An event is what starts or initiates a workflow. There are exactly three events that can start a workflow:


         An item is created.

         An item is changed.

         A workflow participant clicks a start button on the SharePoint site.
It is important to understand that a workflow created with Office SharePoint Designer 2007 is always attached to exactly one list or

library in a SharePoint site. When you design a workflow, you choose which list to attach it to. An event in this list starts the

workflow.


You can create a workflow that a participant starts manually, or a workflow that is started automatically when a list item is created

or changed. For example, in the document approval workflow, you want to design the workflow so that it starts automatically

whenever someone adds a document to the Shared Documents library. On the File menu, point to New, and then click Workflow.

In the Workflow Designer, you see the following page.




When a workflow participant starts a workflow manually, that person first browses to the list or library that the workflow is attached

to. Any person with at least the Contribute permission level can initiate a workflow that is designed to start manually. The

participant clicks an item, clicks Workflows on the menu, and then chooses a workflow from a page that displays all workflows

associated with that item. The participant fills out a workflow initiation form, if necessary, and then initiates the workflow by clicking

the start button on the form. Initiating a workflow creates a new instance of that workflow for that specific item.
NOTE   The Workflows command is available only when the item is in a list or library that has at least one workflow attached to it.


For a workflow that is started manually, the initiation form can be as simple as the following.




You can also add custom fields to an initiation form when you design the workflow. Workflow participants can then provide

information to the workflow by filling out this form, and those settings are passed to the workflow. A new workflow instance starts,

and that workflow can then look up and use the information provided through the form at any point in the workflow.


What are actions?

An action is the most basic unit of work in a workflow. Office SharePoint Designer 2007 provides a set of ready-made, reusable

actions for you to incorporate into your workflow. For example, your workflow can:


         Create, copy, change, or delete list items (including documents).

         Check items in or out.

         Send an e-mail message.

         Create a task for someone on the Tasks list of your team site.

         Collect data from a participant that can be referenced later in the workflow.

         Pause or stop the workflow.
         Log workflow information to a History list to use for repudiation or workflow debugging.

         Set workflow variables or perform calculations.


A workflow can contain any number of actions. The actions just listed are performed by the workflow, but other actions might be

performed by workflow participants. For example, the document approval workflow is comprised of five actions. Four of these

actions are performed automatically by the workflow, but one of these actions — actually reviewing the document — is done by a

workflow participant. Actions done by a workflow participant are represented by tasks assigned to that person in the Tasks list. The

five actions in the example workflow are:


         Send an e-mail message to notify the reviewer

         Review the document (a task assigned to a workflow participant)

         Move the document to the Approved document library

         Send an e-mail message to notify the team

         Send an e-mail message to notify the document author


In the most basic sense, when you design a workflow, you identify the necessary sequence of actions, and then you assemble that

sequence of actions by using the Workflow Designer. For example, in the document approval workflow, the first action that you

want is to send an e-mail message to notify the reviewer.




So in the Workflow Designer, you choose that action for the first step in the workflow.
What are conditions?

When you design a workflow, you can use the Workflow Designer to create rules that apply conditional logic to SharePoint lists and

items. A rule establishes a condition where the workflow performs the associated action only if that condition is true. For example,

you can create a rule where the workflow sends a reviewer an e-mail message only if an item is created by a specific person. You

can also add clauses to a condition. For example, you can create a rule where a reviewer is sent an e-mail message only if an item

is both (1) created by a specific person and (2) the document title contains specific keywords. Finally, you can associate multiple

actions with one condition. For example, you can create a rule where if an item is created by a specific person, then (1) the

reviewer is sent an e-mail and (2) workflow information is logged to the History list.




To sum up, a rule is a condition associated with one or more actions: If all clauses in the condition are true, do all the associated

actions.


In the previous example, the user specified only one condition. However, you can create multiple conditions for a step in the

workflow. Multiple conditions create branches in the workflow: If condition A is true, do one action; if condition B is true, do a

different action. To add a branch to a step, click Add 'Else If' Conditional Branch. For example, in the document approval
workflow, if the reviewer approves a document, the workflow performs one action (or series of actions); if the reviewer rejects a

document, the same workflow performs a different action. This is a conditional branch.




In the Workflow Designer, this step has two branches and looks like the following. The green diamond indicates that the step has a

conditional branch.




You can also create a branch that has no specific condition. This way, the workflow performs one action if a condition is true and a

different action if the condition is false. For example, the following step in a workflow sends a message to the team only if the

condition is true; else, the workflow sends a message just to the document author. By adding a branch with no specific conditions,

the workflow performs the action in that branch in any case where the condition in the first branch is false.
NOTE    Branching in a workflow cannot extend from one step to another. A set of 'Else If' branches is always contained in a single

step.


Office SharePoint Designer 2007 provides several ready-made, reusable conditions for you to incorporate into your workflow. For

example, you can specify that the workflow performs the associated actions only if an item:


         Is created or modified in a specific time span.

         Is created or modified by a specific person.

         Has a title field that contains specified keywords.

         Is a file of a specific type or has a file size in a specific range. (This condition is available only when the workflow is

   attached to a document library.)


In addition, you can create custom conditions and advanced conditions where you can specify a wide range of parameters. With

custom conditions, you can compare a field in the current list with a value. For example, you can create a custom condition where if

the Approval Status field equals Approved, do the associated action. With advanced conditions, you can compare one value to

another value. This allows you to create a comparison between a field in any list and a value from another list. For example, you

can create an advanced condition for the Shared Documents library where if the value of the Status field in the Tasks list equals

Pending, do the associated action.


NOTE    An action does not require a condition. For example, the first step of the example document approval workflow sends an e-

mail to notify the reviewer. This action does not have a condition associated with it.


Parallel vs. serial actions

When you have more than one action associated with a condition, the actions can be set up to run at the same time (parallel) or

one after another (serial).
Serial actions For example, in the document approval workflow, you can set up two actions so that when a document is

approved, a message is sent and then (afterward) the document is copied to the Approved document library. In the Workflow

Designer, then indicates that the second action occurs after the first.




Parallel actions For example, in the document approval workflow, you can set up two actions so that when a document is

approved, a message is sent and (at the same time) the document is copied to the Approved document library. In the Workflow

Designer, and indicates that the second action occurs at the same time as the first.


NOTE    Parallel actions are not absolutely simultaneous; the exact order cannot be specified and may vary each time the workflow

runs.




NOTES



         In any given rule (conditions and actions), all actions must be either serial or parallel.

         A set of serial or parallel actions must be contained within a single step.


What are steps?
A workflow is comprised of one or more steps. Each step can contain any number of actions and associated conditions. You can

think of steps simply as pages in the Workflow Designer. For example, the document approval workflow has two steps, as shown in

the Workflow Designer.




Steps allow you to group conditions and actions so that one set of rules (conditions and actions) can be evaluated and performed

before a second set.


One step or many? Some workflows can be designed either as a sequence of actions within one step, or as a sequence of steps.


For example, the following three actions could be Step 1 of a basic one-step workflow.




The same three actions could be separated into several steps.
How you structure your workflow into steps depends on what you want each step to accomplish. The rules in one step are

processed to conclusion before going on to the next step, so you want to group in the same step any rules necessary to effect the

specific action or actions that you want.


More specifically, each step can hold one set of 'Else If' conditional branches, where the actions in each branch are performed only

when the associated condition is satisfied. In this case, additional steps are needed only when:


         Multiple sets of 'Else If' conditional branches need to be evaluated.

         You need to separate a branched statement from a non-branched statement.


You can also use steps simply as a way to organize your workflow. For example, a workflow might have many actions in a step

that doesn't use conditions. In this case, you might want to separate the actions into steps just to better organize them.


  Top of Page



What are workflow forms?

To make your workflow more dynamic and flexible, you can add a form to the workflow. With a form, you can collect information

from workflow participants at predefined times in the workflow, and make it possible for participants to interact with the tasks for

that workflow.


With Office SharePoint Designer 2007, you can create two types of workflow forms:


         An initiation form gathers information from the workflow participant when they start the workflow. Initiation forms are

   displayed to users when they manually start a workflow on a given SharePoint item. With an initiation form, users can specify

   additional parameters or information about the workflow as it applies to the given SharePoint item. For example, you might

   use an initiation form to ask who should review a document and by when the review should be completed. Not all workflows

   need initiation forms. If you do need one, Office SharePoint Designer 2007 automatically generates an ASP.NET initiation

   form according to your initiation specifications.

         A custom task form allows workflow participants to interact with tasks in the Tasks list on a SharePoint site. With the

   Custom Task Wizard, you can easily create custom form fields and add them to a custom task form. When you finish

   designing the workflow, Office SharePoint Designer 2007 automatically generates the ASP.NET forms for your custom tasks.

   Then, when the workflow runs and tasks are created, the user browses to the Tasks list on the SharePoint site, marks the

   task as completed, and enters any optional or required information specific to the workflow. The workflow can then respond

   to those changes as specified in the workflow, or look up and evaluate that information in later steps of the workflow.
After Office SharePoint Designer 2007 automatically generates the ASP.NET forms, you can customize them. Workflow forms are

ASP.NET pages with a Data Form Web Part and a master page applied to it. These .aspx files are stored on the SharePoint site

with the workflow source files. You can open and customize these forms as you would any other .aspx file.


  Top of Page



Where are workflows stored?

Workflows are stored in a site-level document library called Workflows. This document library is created automatically by Office

SharePoint Designer 2007. In the Folder List, the Workflows document library displays the workflow icon instead of the usual list or

document library icon. By default, the Workflows document library is hidden from the browser and has no List Views, such as

AllItems.aspx or EditForm.aspx. This document library contains a folder for each workflow created with Office SharePoint Designer

2007. The folder contains all the source files necessary for the workflow, including:


         The workflow markup (.xoml) file (needed only when the workflow uses conditions).

         The workflow rules file.

         The workflow configuration file.

         Any .aspx forms needed, such as initiation forms (for workflows that are started manually) or custom task forms.


To modify an existing workflow, you can either click Open Workflow on the File menu or double-click the .xoml file in the Folder

List. This opens the workflow to its first step in the Workflow Designer. If you click Back to view the initiation settings of the

workflow, you see that you cannot change which list or library the workflow is attached to. After a workflow is attached to a list or

library by using Office SharePoint Designer 2007, this association cannot be changed.
The Workflow Designer provides an action called Log to History List. You might use this action when you want to keep a record of

the workflow history for investigating errors or for tracking and repudiation purposes. When you create a workflow that uses the

action Log to History List, Office SharePoint Designer 2007 automatically creates a list called Workflow History. This list has

columns for such information as user ID, date, event, and error description. Like the Workflows document library, by default the

History list is hidden from the browser but can be seen in the Folder List.




The Workflow Designer provides three actions that interact with the Tasks list: Assign a To-Do Item, Collect Data from a User, and

Assign a Group Survey. When you create a workflow that uses any of these three actions, Office SharePoint Designer 2007

automatically creates the .aspx form, the content type for the task, and the Tasks list, if necessary. By default, the Tasks list can be

viewed in the browser, unlike the Workflows document library and Workflow History list.




  Top of Page
Where can I check the status of a workflow?

You can easily view the progress of workflows on a selected item through the browser. The All Items view of a list or document

library displays the current status of workflows running on an item. In addition, each item has a Workflows page where you can

view the following information:


         All workflows currently running on that item.

         All workflows that have run on the item in the past.

         All the available workflows for that item.




To view the Workflows page for an item, click the item in the list, and then click Workflows on the menu.


NOTE   The Workflows command is available only when the item is in a list or library that has at least one workflow attached to it.


When a user starts a workflow on an item, Windows SharePoint Services 3.0 adds a new column to that item. By default, the

column name matches the name of the workflow. This read-only column displays the current status of the item within that workflow.

This status column is added automatically for each workflow the first time it is run.




In each column, the workflow status is a link. When you click In Progress, for example, you see the Workflow Status page for that

instance of the workflow.




A workflow created in Office SharePoint Designer 2007 cannot be deployed to multiple lists. It is only valid for the list for which it

was created. However, multiple workflows can be attached to one list and may be available for a given item. Multiple workflows can

run simultaneously on the same list item, but only one instance of a specific workflow can run on a specific item at any given time.

For example, you might have two workflows, Workflow A and Workflow B, available for a specific list. Although both workflows can
run simultaneously on a specific item in the list, you cannot have two instances of Workflow A or Workflow B running on the same

item at the same time.


  Top of Page



Suggested next steps

Workflows are a powerful way to add application logic to your SharePoint sites and applications. Now that you understand the

workflow basics, you might want to get started by creating a workflow:


         For some important design considerations and a basic, generic procedure, see the article Create a workflow.

         For links to articles that present complete workflow examples, see the See Also section.




Creating Workflow



Before you begin

Before you design the workflow, you need to make any necessary changes or customizations to your site, list, or library — for

example:


         A workflow is always attached to exactly one SharePoint list or library. Your site must have at least one list or library

   before you create a workflow. If there are no lists in your site, you are prompted to create one when you create a workflow.

         If you want your workflow to use any custom columns or settings, you must make those changes before you create the

   workflow so that those columns and settings are available to you in the Workflow Designer.

         If you want your workflow to use any list or library features that are not turned on by default, such as Content Approval,

   you must turn on these features before you design the workflow.


NOTE   The workflow feature is built on the Microsoft Windows Workflow Foundation, a component of Microsoft Windows. The

same version of the Workflow Foundation must be installed on both your computer and the server. The first time that you create a

workflow, you may be prompted to install the Workflow Foundation.


  Top of Page
 Design the workflow

 The basic steps of creating a workflow are always the same: First you define the workflow, and then you create the rules by

 choosing conditions and actions.


1.        On the File menu, click Open Site.

2.        In the Open Site dialog box, browse to and select the SharePoint site where you want to create the workflow, and then

     click Open.

3.        On the File menu, point to New, and then click Workflow.


     The Workflow Designer opens.




4.        In the Give a name to this workflow box, type a name for this workflow.


     Site visitors will see this name when they view the Workflow Status and Workflows pages in the browser. By default, new

     workflows are automatically named Workflow 1, Workflow 2, and so on.


5.        Click an option in the What SharePoint list should this workflow be attached to? list.
         You must attach your workflow to a SharePoint list or document library. Which list you attach the workflow to determines

         where the workflow participants start the workflow. For example, if you want a workflow to start when an item is created or

         changed in Shared Documents, choose that library. The attached list is where you go to check workflow status and history,

         or to manually start a workflow.


         NOTE    Workflows that start automatically when an item is created or changed can run in infinite loops, which you want to

         avoid. For example, a workflow that starts when an item is changed should never change an item in the list that it is attached

         to. A workflow that starts when an item is created should never create an item in the list that it is attached to. This is also an

         issue with multiple workflows. For example, Workflow A is attached to List A, and Workflow B is attached to List B. Both

         workflows start automatically when a new item is created. Workflow A creates an item in List B, and Workflow B creates an

         item in List A. Such a scenario creates an infinite loop. A best practice is to know what workflows are already running on any

         lists or libraries where your workflow creates or changes items.


6.              Under Select workflow start options for items in this list, do one or more of the following:

                        Select the Allow this workflow to be started manually from an item check box.


            This option adds a Workflows command to a list item so that users can click the command to start the workflow for

            that item.


                        Select the Automatically start this workflow when a new item is created check box.

                        Select the Automatically start this workflow whenever an item is changed check box.


         NOTE    You can select two or three options, but you must select at least one option if you want to run the workflow. If you do

         not select an option, you can design the workflow and then click Finish, but the workflow cannot be initiated. Later, you can

         open the workflow (File menu, Open Workflow command), select an initiation option, and then click Finish. This is useful

         for saving a workflow that you are in the process of designing.


7.              Click Next.
8.          In the Step Name box, type a name for the first step of your workflow.




     Now you create the rules for your workflow by choosing the actions that you want it to perform and any conditions that must

     be satisfied for those actions to occur.


     NOTE    Not every step must contain a condition; for example, you can have steps that are simply a list of actions to be

     performed. However, every step can have at most one conditional branch that contains an action without an associated

     condition. This is because a conditional branch that does not have a condition acts as the "Else" branch in an "Else If"

     conditional branch. If condition A is true, do action B; otherwise — else — do action C. As such, it would not make sense to

     have more than one "Else" branch because the last branch would never be reached.


9.          For each condition that you want to specify, click Conditions, and then click that condition in the list. Repeat until you

     have specified all of the conditions that you want to include.


     NOTE    You can choose more than one condition. If you do, the conditions are joined by and, meaning that all the conditions

     must be satisfied before the workflow does the associated actions. Multiple conditions create a progressive filter in which the

     order matters because the first condition is evaluated first. To move a condition up or down in a list of conditions, click the

     condition, click the down arrow that appears, and then click either Move Condition Up or Move Condition Down in the list.


     Office SharePoint Designer 2007 provides a number of predefined conditions. In addition, you can create advanced and

     custom conditions. With custom conditions, you can compare a field in the current list with a value. With advanced

     conditions, you can compare one value to another value. This allows you to create a comparison between a field in any list

     and a value from a wide range of sources.
10.         After you insert a condition, click each hyperlink, and then choose a value for the required parameters.


      For example, a condition might include links for choosing a field in the list, a comparison, and a value.




11.         For each action that you want to include, click Actions, and then click that action in the list. Repeat until you have

      specified all of the conditions that you want to include.


      If this action does not appear in the list, click More Actions, click the action that you want, and then click Add.
      NOTE     You can create more than one action for a condition. If you do, the actions can run either one after another (joined by

      "then") or at the same time (joined by "and"). To switch between running in sequence and running in parallel, click the arrow

      in the upper-right corner of the rule, and then click either Run All Actions in Sequence or Run All Actions in Parallel.


12.          After you insert an action, click each hyperlink, and then choose a value for the required parameters.


      For example, an action might include a link for creating an e-mail message.




13.          If you want to add a conditional branch, click Add 'Else If' Conditional Branch, and then repeat steps 9–12 to create

      another rule.


      A rule is a set of related conditions and actions, as shown in the previous illustration. When the condition is true, the

      workflow does the associated actions. But what if the condition is not true? By adding conditional branches, you can specify
      additional conditions. For example, you can create three different conditions for when a document status is changed to

      Approved, Rejected, or Pending. You can also create an Else condition, where the workflow performs the action only when

      none of the previous conditions have been satisfied. To create an Else condition, the last rule in the step must be an action

      with no conditions. The workflow evaluates all the conditions; if none of them are satisfied, the workflow performs any actions

      in the final branch, which has no condition.


14.          When this step of the workflow is complete, click Next.

15.          For each step in the workflow, repeat steps 8–14 to create additional sets of conditions and actions.


      As you add steps, keep in mind that each step can hold only one set of 'Else If' conditional branches, where the actions in

      each branch are performed only when the associated condition is satisfied. In this case, you must add additional steps when:


                     Multiple sets of 'Else If' conditional branches need to be evaluated.

                     You need to separate a branched statement from a non-branched statement.

16.          To check the workflow for errors before you exit the Workflow Designer, click Check workflow.


      If there is a workflow error, the hyperlink changes color and asterisks appear before and after the invalid parameter. In

      addition, under Workflow Steps, an error symbol appears next to each step that contains an error. For each error, check to

      make sure that the parameters entered are valid.


17.          Click Finish. The workflow is saved and attached to the list that you specified.


      NOTE    You cannot change which list a workflow is attached to after you save the workflow. Instead, you must create a new

      workflow and attach it to the list that you want.
 Design the workflow

 If your site has a discussion board, such as the Team Discussion list on a team site, you are ready to use the Workflow Designer.


1.             On the File menu, click Open Site.

2.             In the Open Site dialog box, browse to and select the SharePoint site where you want to create the workflow, and then

         click Open.

3.             On the File menu, point to New, and then click Workflow.


         The Workflow Designer opens.


4.             In the Give a name to this workflow box, type Create a Task.


         Site visitors will see this name when they view the Workflow Status and Workflows pages in the browser.


5.             In the What SharePoint list should this workflow be attached to? list, click Team Discussion.


         When team members view the Shared Documents library, they will see a new column for this workflow called Create a Task.

         This column indicates the status of the workflow for each item — for example, whether the workflow has started or if the

         workflow is complete.


6.             Under Select workflow start options for items in Shared Documents, do all of the following:

                       Select the Allow this workflow to be manually started from an item check box.

                       Clear the Automatically start this workflow whenever an item is created check box.

                       Clear the Automatically start this workflow whenever an item is changed check box.


         By choosing this option, you make a Workflows command available for each item in the list. To start the Create a Task

         workflow for any discussion item, you can click that item, click Workflows on the menu, double-click the workflow that you

         want to start, and then click the Start button.
7.            Click Next.

8.            Click Actions, and then click Create List Item in the list.


      If this action does not appear in the list, click More Actions, click the action that you want, and then click Add.


9.            In the action Create item in this list, click this list.

10.           In the Create New List Item dialog box, in the List box, click Tasks because that is where you want to create a new

      item.


      NOTE      This action creates a task item but — unlike the action Collect Data from a User — does not cause the workflow to

      pause until the task is completed.


      Under Field and Value, you can add, remove, or modify fields that will appear in the new list item that you create. You want

      the Title of your new task item to contain actual information from the Team Discussion item, so now you click that field and

      modify it by having it look up and display information from the discussion item.


11.           Under Field, click Title (*), and then click Modify.

12.           In the Value Assignment dialog box, click Display data binding        .
13.         In the Define Workflow Lookup dialog box, in the Source list, click Current Item. In the Field list, click Subject.


      For the title field of the new task, the workflow now looks up and uses the information in the Subject field of the current

      discussion item.




14.         Click OK twice.


      Now you want the workflow to automatically assign the new task to the person who created the related discussion item.


15.         In the Create New List Item dialog box, click Add because you want to add a field to the new task that the workflow

      creates.

16.         In the Value Assignment dialog box, in the Set this field list, click Assigned to.




17.         Under To this value, click Display data binding        .
18.        In the Define Workflow Lookup dialog box, in the Source list, click Current Item. In the Field list, click Created By.




19.        Click OK twice.




      The workflow will create a task whose title matches the subject of the team discussion item that the task was created from,

      and the task will be assigned to the person who originally created that team discussion to follow up on.


20.        In the Create New List Item dialog box, click OK.
      You now have a rule that creates the task when someone manually starts the workflow from an item in the Team Discussion

      list.


21.           To check the workflow for errors before you exit the Workflow Designer, click Check workflow.


      If there is a workflow error, the hyperlink changes color and asterisks appear before and after the invalid parameter. In

      addition, under Workflow Steps, an error symbol appears next to each step that contains an error.


22.           Click Finish to save the workflow.


 A button will appear on the SharePoint site Team Discussion list page. Your team members can click the button to manually start

 the workflow.


 To test the workflow, browse to the Team Discussion list and create a new item — note that by default the Subject field is a

 required field. After you save the new item, click the discussion item in the list, and then click Workflows on the menu. On the

 Workflows page, click the Create a Task workflow, and then click Start. Now browse to the Tasks list. Because you created the

 discussion item, you should have a task assigned to you that contains the information that you entered in the Subject field.


 If you wanted, you could add another step to the workflow, where another action is performed when the new task is marked

 complete. It is possible that you can start with a one-step workflow, and then add steps so that the workflow evolves and eventually

 maps to a complex business process.

								
To top