220 likes | 415 Views
How WF fits into SharePoint. SharePoint Workflows. Jeremy Sublett, SharePoint MVP, MCSD, MCT Composable Systems jsublett@composablesystems.net. Agenda. Workflow Foundation (WF) SharePoint Workflows Authoring with SharePoint Designer Authoring with Visual Studio.
E N D
How WF fits into SharePoint SharePoint Workflows Jeremy Sublett, SharePoint MVP, MCSD, MCT Composable Systems jsublett@composablesystems.net
Agenda • Workflow Foundation (WF) • SharePoint Workflows • Authoring with SharePoint Designer • Authoring with Visual Studio
What is Workflow Foundation? • A framework for building business process workflow into applications • Single workflow technology for Windows • Extensible framework & toolset (designer) • Workflows are resumable • Not an application or server by itself • Exposed to developers via .NET 3.0 • Separate from SharePoint • Not BizTalk
Types of Workflows • Workflows model real-world business processes • System-oriented and human-oriented Sequential State Machine
Activities • Workflows are composed of activities • Activities are reusable functionality • Many activities out of the box • Custom activities • Activities exist for: • Standard WF Workflows • SharePoint Workflows (General) • SharePoint Task Lists Send Email
Where do Workflows Live? • WF workflows require a host • Windows (desktop) applications • Console Applications • Windows Services • SharePoint • Typically not in ASP.NET applications
Host Process Host Process My custom workflow Windows Workflow Foundation • WF Base Activity Library Runtime Engine: provides intrinsic behaviors to activities WorkflowExecution State Management TrackingInfrastructure Dynamic Update Runtime Services: pluggable implementations with defaults Tracking … Persistence Communication
Demo • Simple WF
Enter Humans • Users need to interact with a workflow – that’s the whole idea • Users may take days/weeks to respond to a process, however • Imagine the complexity of a system that brings a workflow and business users together – many of you have built these systems • SharePoint provides a UI for workflows
What is a Workflow in SharePoint? • Workflows in SharePoint revolve around items document libraries/lists • Users are assigned tasks and are notified via email • Manual or automatic workflows • SharePoint provides other User Interfaces: • Setup forms • Initiation forms (customized per workflow) • Cancellation forms
OOTB SharePoint Workflows • Three-State (WSS) • Approval (MOSS) • Parallel Approval (MOSS) • ____ (MOSS) • ____ (MOSS)
Demo • Simple SharePoint WF
Workflow-Aware Applications • Browser • Farm and site collection administration • Workflow initiation, configuration and completion • Office 12 Client Applications (e.g. Word, Excel, PowerPoint) • Workflow initiation, configuration and completion • Ad-hoc Customization (Forward/Delegate) • Outlook 12 • Task notification and task completion • SharePoint Designer • Wizard-based authoring and forms integration • Application deployment • Access • Workflow initiation, configuration and completion • Reporting
Building Your Own Workflows • SharePoint Designer • Replaces FrontPage • Wizard-based workflow creation tool • Attached to a document library when created • Can’t be moved (easily) from that document library • Visual Studio (2005 or 2008) • Maximum control • Increased complexity • Visual designer
SharePoint Designer • Demo Building Workflows with SPD
Form 1 Form 2 Form 3 Form 2 Form 1 SharePoint Workflow Architecture • Workflows are run on items and documents • Workflows associated with list, document lib or content type • Farm-wide table tracks associations to WF templates • WF templates defines by XML and include assemblies and forms Workflow Template Collection Workflow Assembly Workflow A Content Type Farm-level Workflow Association Table Workflow Assembly Workflow B List Document Library Workflow Assembly Workflow C
Workflow Hosting with WSS "V3" WSS "V3" Worker Process My custom WSS workflow Office 12 created component • Office Server Activity Library WSS created component Windows Workflow Foundation • Base Activity Library Runtime Engine: provides intrinsic behaviors to activities Scheduler Rules Tracking Runtime Services: custom WSS implementations WSS Content Database Transactions Persistence Notifications Roles Tracking Messaging
Workflow Stages • Workflow Association • Workflow installed by farm administrator at server level • Workflow bound and configured by site collection administrator • Workflow Initiation • Launched by user either manually or automatically • Workflow Status • Users can view status of workflows on any item or document • Workflow Task Completion • Manually triggers by user or automated through code
Workflow Forms • Forms are used for: • Configuring workflows • Starting workflows • Completing tasks • ASPX Forms • Can be used by WSS and Office servers • Server-side only • InfoPath Forms (Office servers) • Server rendered by Office forms Server • Office client integration • Write once, run server and client (same form)
Visual Studio • Demo VS2005 with SharePoint Extensions