1.
Begin by opening your development SharePoint site.
2.
Click on View All Site Content.
3.
Click on the Create button and on the next Page select Document Library.
4.
Give the Library a meaningful name like DevTestLib1 or use your own
selection.
5.
By default, the selected document template is the Microsoft Word
Library. This option is fine for our needs, as are the other options unless you
want to change them.
6.
Select the Create button.
7.
If you have not already, open the SharePoint Designer.
8.
Select File | Open Site and type in and open the name of your
development SharePoint site.
9.
Highlight the list you just created in the Folder List on the left hand
side and select File | New | WorkFlow from the menu.
10. You
are now presented with the WorkFlow Designer with a label of WorkFlow1.
11. There
are many obvious selections here. Start by giving the WorkFlow a meaningful
name.
12. Next,
make sure that the list you want to attach the workflow to is selected.
13. Finally,
for this page you will see three check box options. We want to leave the first
option, "Allow this workflow to be manually started from this item." As
such, a user will then be able to right mouse select an object in the library
and start the workflow. Otherwise, you deselect this option when they may not.
14. Note
the other two check boxes, "Automatically start this workflow when a new
item is created" and " Automatically start this workflow whenever an
item is changed." Obviously, they are quite useful and have their places,
but at this time we do not want to use them. With this set of selections a
document will be submitted and we can manually run the process to control it
while we learn.
15. When
the user kicks off the workflow we want to ask them for some data. The fact
that we are performing manual initiation allows us to make use of customized
initiation parameters. If this was automated, the default parameters would be
used.
16. Click
on the Initiation button and on the popup box Enter "Notes" and
change the selection to Multiple Lines Of Text. Click Next and you are offered
to add a Default Value.
17. Click
Next and we are now into the real core of the workflow. Take a minute and poke
around on this screen and you will find a wealth of options. On the right is
the WorkFlow Steps where you can ad extra steps. Add a few and delete them to see how it works.
18. All
the way to the right of the Condition button you will see a drop down arrow,
pull it down and select Add New Branch. You should now have two sets of
conditions.
19. Pull
down the first Conditions button and select "Compare Library Field,"
but replace Library with the name of the Library you are using. Click on the
link "field" and select "name." Replace "equals"
with "contains" and select "value" and enter
"Qwerty." Make sure "Qwerty" is cased correctly. Use the
Actions button to select Delete item and replace "this list" with the
default option, which should be the name of the Library currently being used.
20. In
the next block of two Condition/Actions buttons do the same for the Conditions
except to make the compare the word "Birdy." For the Actions, select
Send An Email. Click to open the email options and add yourself as the
recipient and the desired subject line. Next, click Add Lookup To Body. For
Source use Current Item and Field use Name. This should send you the name of
the file.
21. Finally,
click finish. Your workflow will be compiled.
22. Now
that your new workflow has been created, take some time and poke around the
created items.
23. Let
us start using our new workflow. Open your website if it was not already and
navigate to your list.
24. Add
a new word document to the Library and name it Qwerty1.doc.
25. Add
another document to the Library and name it birdy2.doc.
26. Pull
the item options menu for Qwerty1.doc and select WorkFlows. Select the new
workflow you just created. You will see the next step allows you to add notes.
Do not bother in this case because it is about to go away. When you are done
with the workflow you should be directed back to the Library and you will
notice the Qwerty1.doc file is gone. If it is still there then something was
named wrong. The option in the workflow creation where you selected the
contains comparison is case sensitive. Edit the workflow and name of the
document and make sure the match and re-run the workflow.
27. Now,
run the workflow on the other document, Birdy1.doc. If all steps work as they should,
the end result is that you are sent an email according to the parameters you
have set.