Bits and Pieces about SharePoint Workflows

As SharePoint consultants we often face a common question from clients -“What is SharePoint  Workflow?”  “What it can do out of the box?” “What are the Limitations?”

I have tried to document bits and pieces about SharePoint Workflow, SPD Workflow limitations and Possible workaround. All these information are based upon MOSS 2007 and I am sure many of these will be fixed in next version of SharePoint (2010).

What is SharePoint workflow:-

The most powerful feature of SharePoint, at least the one most likely to cause a high return on investment (ROI), is the tight integration and high utilization of workflow.

A workflow is a formalized business process mapped to various executable activities on a computer. Think of a workflow as a highly adaptable and configurable program that performs a series of tasks. The program is adaptable in that it can be changed depending on business needs.

Out-of-the-box SharePoint Workflows:-

  • Approval Routes a document for approval. Approvers can approve or reject the document, reassign the approval task, or request changes to the document.
  • Collect Feedback Routes a document for review. Reviewers can provide feedback, which is compiled and sent to the document owner when the workflow has completed.
  • Collect Signatures Gathers signatures needed to complete an Office document. This workflow can be started only from within an Office client.
  • Disposition Approval Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents.
  • Group Approval Similar to the Approval workflow, but uses a designated document library and offers a personalized view of the approval processes in which a user is participating. This workflow provides a hierarchical organization chart from which to select the approvers and allows the approvers to use a stamp control instead of a signature.
  • Translation Management Manages document translation by creating copies of the document to be translated and assigning translation tasks to translators.
  • Issue Tracking Manages the issue tracking process by creating tasks for Active issues assigned to users who own to a given issue. When the task related to an issue is complete hence resolving the issue, the creator of the issue is assigned a review task so that the issue can be closed.

 

SharePoint Designer Workflows:-

SharePoint Designer (SPD) offers a basic workflow authoring experience. With SharePoint Designer 2007, end users can create workflows without needing to learn complicated tools or adopt programming as a career.

Despite the perceived simplicity of SharePoint Designer workflows, however, you can accomplish fairly complex tasks using the built-in activities in SharePoint Designer. In addition, you can get or create additional activities to further customize your workflow and in essence create your own Lego pieces.

 

SharePoint Designer Workflow Limitations and Possible workaround:-

  • You cannot access the previous value of a field.  This means that you cannot check to see if a field changed.  There is an action that waits for a field to change, but you must provide the value that it changes to.  Alternatively you can compare it to another field, but not the previous value of that field.  If the field didn’t change at all but met the condition implied by the action, this wait action likely wouldn’t wait at all and move on the next step in the workflow.

Workaround: Use a SharePoint list event to track “ItemUpdating” and pass in the “After” value for a field (the current value will be the old value in a synchronous updating event).  If you decide to also start this workflow from any asynchronous event (e.g., “ItemAdded” and/or “ItemUpdated”), you will need to pass in the event trigger (e.g., “Add”, “Updating”, “Updated”) so the workflow can differentiate between them (the current item in the workflow will be the old item for synchronous events, but it will be the new value for asynchronous events).

  • You cannot loop.  If you want to perform. an action on say all items in a list or all child items for a parent, you simply cannot do it unless you know how to lookup each item in the list at design time and have an action for each of those items.

Workaround: Use Events or a Visual Studio  workflow.

  • You cannot lookup an item using two keys.  If one key does not uniquely identify an item, you are stuck.  You can try to just use one field, but the workflow will act on the first item it finds.  You cannot use two fields to identify it.

Workaround: Use Events or a Visual Studio workflow.

  • You cannot copy the contents of one email action to use it within the same or another email action.  This is true if there are any lookups within the email contents.

Workaround: Copy by hand (re-write the contents) or after saving the .xoml file, open it with an XML editor (right click the .xoml file and choose Open With -> SharePoint Designer (Open as XML)), then copy/paste the appropriate data.

  • You cannot put lookup information in the subject of an email.

Workaround: The easiest workaround is to put the lookup information in the email body.  More complex solutions involve creating a custom SharePoint Designer workflow action, use a Visual Studio  workflow, or sending the email from an event.

  • You cannot group logical conditions within a step by using parenthesis.

Workaround: Modify your expression such that the order takes precedence.  For example, instead of “x=1 and (y=2 or z=3)” use “y=2 or z=3 and x=1”.  See also SharePoint Designer Workflows – Logical Expressions.

  • You cannot easily log a value with context information to the workflow history list.

Workaround: Use the Build Dynamic String action to store your log into a workflow variable then use the Log to History List action to log the workflow variable to the history list.

  • You can run actions in parallel, but you cannot run steps in parallel.

Workaround: Use a Visual Studio  workflow.

Advertisements
This entry was posted in SharePoint 2007 and tagged . Bookmark the permalink.

One Response to Bits and Pieces about SharePoint Workflows

  1. lazy says:

    thank for information is sharepoint best work i am like

    http://SharePointBank.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s