Step by Step Tutorial : Creating workflows for Sharepoint

image_thumb

SharePoint 2010 workflow tutorial

  1. Step 1.
  2. Step 2.
  3. Step 3.
  4. Step 4.
  5. Step 5.
  6. Step 6.
  7. Step 7.
  8. Step 8.
  9. Step 9
  10. Step 10.
  11. Step 11.
  12. Step 12
  13. Step 13.
  14. Step 14.
  15. Step 15.

SharePoint 2007 workflow tutorial

  1. Step 1.
  2. Step 2.
  3. Step 3.
  4. Step 4.
  5. Step 5.
  6. Step 6.
  7. Step 7.
  8. Step 8.
  9. Step 9.
  10. Step 10.
  11. Step 11.
  12. Step 12.
  13. Step 13.
  14. Step 14.
  15. Step 15.
  16. Step 16.
  17. Step 17.

What we want to be able to do in this step  is retrieving the list item values (in our case the expense report information) associated with the running workflow : if the expense report is greater than 1000 then the manager approval will be required, otherwise the expense report will be accepted.

This post is based on the code (and site template) provided in Step 1.
This is straightforward in SharePoint : the OnWorkflowActivated activity has been databound with a workflow member called workflowProperties as illustrated in the next figure :

image

Figure 1

If we take a look at the associated .Net code, we will find the workflowProperties declaration :

image

Figure 2.

This workflowProperties member is an object created from the class SPWorkflowActivationProperties, which make the link between the workflow and the SharePoint context.

To analyze some of the properties of this SPWorkflowActivationProperties class, go back to the workflow designer in Visual Studio by clicking on the workflow file in the solution explorer and double click on the onWorkflowActivated1 activity.

An event handler will be generated in code behind; if you type workflowProperties follow by a dot (to trigger the Intellisense), youll discover some important properties like the current list item, the current list, the person who started the workflow, and much more :

image

Figure 3.

Lets define a public member for each list column value we want to retrieve:

image

Go back to the workflow designer and drag and drop a new IfElse activity (from the Windows Workflow toolbox):

image

Figure 4.

Rename the ifElseActivity1 and each branch as follows:

image

Figure 5.

Select the ifSmallAmount activity, select the Condition Property in its property windows and choose Declarative Rule Condition.

image

Figure 6.

Set the Condition Name to SmallAmount:

image

Figure 7.

Click on the ellipsis button next to Condition Expression and add the following expression

image

Figure 8.

Click ok.

Drag and drop 2 code activities from the workflow foundation toolbox and rename them as Authorize and requestManagerApproval:

image

Figure 10.

Click on each code activity to generate an event handler and implement in authorize_ExecuteCode as follows:

image

Figure 11.

Deploy your workflow, add a new expense report with an amount value smaller than 1000, run the workflow and check the workflow status :

image

Figure 12.

Source code can be downloaded here.


Step by Step Tutorial : Creating workflows for Sharepoint ...
The workflow will invoke Sharepoint by calling a method on a dedicated interface that will redirect the call to the Sharepoint api.

Step by Step Tutorial. Creating Workflows for Windows ...
Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and MOSS2007 (part 1/20).

Step by Step Guide in Developing your own Workflow in ...
This article will discuss how easy it is to develop your own workflow in Sharepoint creating your workflow Workflow Condition Items. On on your Step

Step by step: Creating a basic SharePoint 2013 workflow
Creating a basic SharePoint 2013 workflow http://thesharepointhelper.blogspot.c

Step by Step Tutorial - Part 1 - Scribd - Read Unlimited Books
Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and The first activity in a Sharepoint workflow must be the Microsoft.SharePoint

8 Steps to Create Workflows using SharePoint Designer ...
8 Steps to Create Workflow using SharePoint Designer; Step to create workflows using SharePoint FAQ tutorial which talks about what is SharePoint,

Step-By-Step build Advanced InfoPath Form and SharePoint ...
Step-By-Step build Advanced InfoPath Form and SharePoint Designer Workflow - Create New SharePoint Form Library and set the target SharePoint Site

How to create a 3 step workflow in SharePoint Designer
Tutorial on creating basic workflows in SharePoint Designer.

Step by Step Tutorial : Creating workflows for Sharepoint ...
SharePoint 2010 Workflow Tutorial - Creating workflows for in the previous version of Sharepoint Step by Step Tutorial : Creating workflows for

Step-By-Step Tutorial on Creating Workflows for WSS v3 and ...
Step-By-Step Tutorial on Creating Workflows for WSS v3 and MOSS 2007 MSDN Blogs > Modify and Debug a Sharepoint Designer workflow in Visual Studio;

ConversionConversion EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng
:lv