Datasheet
Chapter 1: Workfl ow Programming Principles
38
Leave the “ Automatically associate workflow? ” toggle checked because we want to have Visual Studio
automatically create the workflow association for us. The next chapter discusses workflow associations
in detail. As you can see, this dialog contains three drop - down list boxes. Select a list from the top drop -
down list box to have Visual Studio associate the workflow with this SharePoint list. Select a list from the
middle drop - down list box to have Visual Studio use this list as the history list for our workflow when it
is creating the workflow association. Select a list from the bottom drop - down list box to have Visual
Studio use this list as the task list for our workflow when it ’ s creating the workflow association. Our
workflow does not create any tasks. SharePoint tasks are thoroughly discussed later in this book.
Click Next to navigate to the dialog shown in Figure 1 - 5 .
Figure 1-5
This dialog enables you to choose how the workflow should be initiated. You have three options:
Manually by users: In this case the user initiates a workflow manually on a list item in the list
with which the workflow is associated.
When an item is created: In this case an instance of the workflow is automatically initiated
every time an item is added to the list with which the workflow is associated.
When an item is changed: In this case an instance of the workflow is automatically initiated
every time an item is updated in the list with which the workflow is associated.
Check the “ Manually by users ” option and uncheck the other two options. Click Finish to create the
project. As Figure 1 - 6 shows, Visual Studio creates the following files:
feature.xml: This file defines the feature that references the element manifest file containing the
definition of the workflow template. I discuss workflow templates in the next chapter.
workflow.xml: This file is the element manifest file containing the definition of the workflow
template.
❑
❑
❑
❑
❑
c01.indd 38c01.indd 38 8/25/08 4:03:02 PM8/25/08 4:03:02 PM