Workflows in SharePoint Brian Russo RJB Technical Consulting July 2009
What Are Workflows? The automation of a business process during which information is passed from one participant to another according to a set of procedural rules.
Workflow Concepts Sequential Workflow – Series of steps executed in a prescribed order – Each step and its sequence clearly defined – IF-ELSE decision making – Best for problems where predefined steps are known at design time
Workflow Concepts State Machine Workflow – No predefined sequence of steps – Define a set of states and possible transitions between each state – Control by external events – Best for problems involving human interactions
SharePoint 2007 Workflow Options SharePoint Designer (SPD) Windows Workflow Foundation (WF) K2 Nintex Metastorm
Microsoft SharePoint Workflow Tool Comparison Visual Studio Designer for Windows Workflow Foundation Office SharePoint Designer 2007 Code-behind file enables developer to write custom Microsoft Visual C# or Microsoft Visual Basic code to express business logic No code behind; workflow rules file declaratively encapsulates business logic instead Workflow is authored as a template, which can be associated with multiple sites and lists Workflow is authored against and data- bound to specific list at design time Workflow markup file, or markup and code-behind files, compiled into workflow assembly Workflow markup, workflow rules, and supporting file are stored, uncompiled, in a specific document library on the site Workflow template must be associated with each list on which it is to be available. Association happens when the workflow is authored against the specific list; no later association is necessary or possible Workflow template can be associated with a site content type. Cannot author workflows against content types.
Microsoft SharePoint Workflow Tool Comparison Visual Studio Designer for Windows Workflow Foundation Office SharePoint Designer 2007 Can use any forms technology. For example, Microsoft ASP.NET 2.0 forms for Windows SharePoint Services 3.0 workflows. Automatically generates Microsoft ASP.NET 2.0 forms, which you can then customize. Can include workflow modificationsWorkflow modifications are not available Package workflow assembly and workflow definition as a SharePoint Feature, and deploy to the site Automatically handles deployment to specific list Visual Studio debugging availableNo step-by-step debugging available Can author both sequential and state workflows Can author only sequential workflows
SPD Workflow Designer
When Not to Use SPD If your SPD workflow contains more than about 10 steps… If you have to create lists, libraries or fields/columns just to overcome a shortcoming in SPD… If you EVER need to deploy the workflow anywhere but where it is developed... If you might need to change the process the workflow supports once it is deployed…
When Not to Use SPD If you need to edit the generated forms at any point… If you need to create multiple workflows and chain them together in some Rube Goldberg contraption… If you need to do real parallel processing or escalation of any type... If you need any type of SDLC, or even simple source control...
SPD Workflow Deployment? Production Farm Development Farm QA Farm Production Data Development Begins Pause Production While Waiting for Updates to Occur Backup and Restore Content Database Content Database Migration Pattern
SPD Workflow Deployment? Production Farm Development Farm QA Farm Production Data Development Begins Pause Production While Waiting for Updates to Occur Backup and Restore Content Database
Nintex
References Kenneth Lo, PMP When NOT to use SPD for Workflow Nintex Workflow Scalability and Performance in WSS Workflow Development Tool Comparison SharePoint Server Custom Application Development Document Workflow Management Project Useful Sharepoint Designer Custom Workflow Activities