only My site

Friday, May 25, 2012

Sharepoint 2010 - SPD Workflow - Introduction


Pros

More-flexible workflow definitions

• Reusable workflows are associated with a content type instead of a specific list.

• Site workflows are associated with a site and not a specific list or item in a list.

• SharePoint’s out-of-the-box workflows can now be customized by using SharePoint Designer.

• Association columns can be defined in a workflow and are automatically added to a list that uses the workflow.

• Solution files (WSP) can be generated by exporting a workflow through SharePoint Designer. These can then be imported into another farm.

• InfoPath forms are generated by SharePoint Designer for association,initiation, and task forms. These forms can be customized by using InfoPath Designer.

• Microsoft Visio 2010 can now be used to create the overall structure of a workflow. That structure can then be imported into SharePoint Designer for implementation.

• The Workflow Status page can contain a visual representation of the current state of a running workflow in a Visio diagram embedded in the page.

• Impersonation step - One of the most important workflow improvements in SharePoint 2010 was created specifically to deal with this type of situation. A new type of workflow step, called an impersonation step, can be added to a workflow just like any other step. The difference is that the security context for the impersonation step is not that of the initiating user but of the workflow’s author. The workflow’s author is generally the user who last updated the workflow’s definition. That user can be given the necessary permissions to perform the needed actions that the initiator may lack.

Cons


• SharePoint Designer places certain restrictions on the types of workflows that can be created. For example, SharePoint Designer does not support custom .NET code, looping constructs, or state machine workflows.

• When a user starts a workflow instance, either intentionally or as a side effect to some other action, that instance will execute using that user’s credentials. Even if the workflow continues to run long after the user has left the site, the workflow engine will still use those credentials. Any permissions ( such as file or list item access rights) associated with the initiating user will be applied to the instance when it is running. This security context has often proven too restrictive for some proposed workflow designs. For example, say a user creates a vacation request and saves it in a document library. As a result, an approval workflow is started. Once the request is approved, you want to move it into a protected archive for approved requests. Because the user who initiated the workflow doesn’t have access to the protected archive, the workflow can’t move the request into it. Impersonation step is the solution for this issue.

SPD - Types of Workflow


1. List Workflow - List

2. Reusable Workflow - Content type. Reusable workflows can be configured as part of content type definition. This helps for standardization. Reusable workflows can also be configured as part of the content type’s definition. Whenever the content type is used in a SharePoint list, the workflow is automatically configured. This is a powerful means of standardizing processes across your SharePoint farm, because content types can also be shared between site collections in SharePoint Server 2010.

3. Site workflow - no current item associated with it.

Workflow Data Context
Parameters
Workflow parameters are data elements that are declared in the workflow definition and are passed into the workflow at startup. Parameters can be defined to receive their value at association or initiation.
1. Association parameter- It refers to the point in time when the workflow definition is associated with a Sharepoint List.


2. Initiation parameter – Values are assigned using Initiation form during the initiation of the workflow instance.

3. Association only - (not for item and used for site workflow instance)



This contains all the fields of the list item (for the list workflow) or contains the fields of the content type (for the reusable workflow).



Association column
It is part of the current item, and it is declared in the workflow definition just like a parameter.


Variables
Declared to store data throughout the lifetime of the workflow.

Workflow Forms
Association Form - This form collects the Association parameter.
Initiation From - This form collects the initiation parameter (only for Manual initiation).
Task Forms - The form designed to collect the data during the process of workflow task. The data collected is writter to the Current item, History list or to the Workflow variable.

Note : In Sharepoint 2010 designer workflow, the Infopath forms are created automatically for the forms and can be customized as needed.
Misc
Important : Becoming familiar with the parameters and options associated with each available action is the key to creating powerful workflows in SharePoint Designer.
Important : Note that new actions (a.k.a. custom activities) can be created using Visual Studio and used from within SharePoint Designer workflows.

 
Current Item

No comments: