Building workflows for Microsoft SharePoint Products and Technologies Mohammed Zayed Information Worker Specialist Moh_zd@hotmail.com Mohzd.blogspot.com Agenda Windows Workflow Foundation (WF) overview Microsoft Sharepoint Server in a glance SharePoint Integration with WF Building Workflow in MS SharePoint Designer Workflow authoring scenarios Live Demo - Using the workflow Developing workflow with Visual Studio Live Demo - Building the workflow Workflow Tools Technical Comparisons Microsoft Business Process Management Vision Information Worker Products and Services Resources and Best Practices Summery Windows Workflow Foundation (WF) Single workflow technology for Windows Extensible framework & toolset Base platform for Microsoft, ISV and customer solutions A framework for building workflow into applications A framework to build on - not an application or server Exposed to developers via .NET 3.0 Office 2007 Future MSFT Application Custom ISV Application Windows Workflow Foundation (WF) .NET 3.0/3.5 Framework Windows Operating Systems (Client and Server) What are workflows? Encapsulated logic for coordinating business processes provides abstractions to model real world processes valuable for modeling long running and stateful behavior Workflows in WF are decomposed into activities Sequential workflows State machine workflow modeled as flowchart modeled as state diagram .. What is MS Workflow ? Workflow is a natural way to organize and run a set of work units, or activities, to form an executable file representation of a work process Microsoft Windows platform component that provides a programming framework and tools for development and execution of workflow- based applications WF: Designer for Visual Studio.net Workflow Extensions for .NET Framework 3.0 WF: Runtime Engine MS.NET Framework 3.0/3.5 A New World Of Work Trends Role of Software One world of Simplify how business people work together Always on, Find information always connected and improve business insight Transparent Help protect and organization manage content Cost Reduce IT costs and pressure improve security SharePoint Investment Areas Server-based Excel spreadsheets and data Docs/tasks/calendars, blogs, visualization, Report Center, wikis, e-mail integration, project BI Web Parts, management “lite”, Outlook KPIs/Dashboards integration, Business Business Collaboration offline docs/lists Intelligence Intelligence Collaboration Platform OOB workflows, WF Integration, Rich and Business Business Services Enterprise Portal template, Site Web forms based Process Process Workspaces, Mgmt, Portal Portal Directory, My Sites, front-ends, LOB actions, pluggable and and Security, Storage, social networking, privacy control SSO Forms Forms Topology, Site Model Enterprise Enterprise Integrated document Content Content Search Search management, records management, and Web Management Management Enterprise scalability, contextual relevance, content management with rich people and business policies and workflow data search Workflow Services Sequencing State management Tracking capabilities Transaction support WSS Provides custom implementation: transaction, persistence, notifications, roles, tracking, and messaging. What are activities? Activities are reusable components (like form controls) Model based on activity producers and consumers Producer encapsulates logic into reusable black box Producer exposes behavior through properties and events Consumer drops activity on workflow designer in Visual Studio Workflow Authoring Scenarios Structured Visual Studio and LOB Workflow SDK Integration Industry specific processes Purchase orders Product lifecycle mgmt SharePoint Designer Custom Tracking Apps Service Requests Workflow Asset Tracking Custom Form Actions Document Processes Email Notification Spec Review Exception Handling Weekly Status Report Out-of-the-Box Tracking Applications Solutions Issue tracking (with customization) Ad Hoc Routing and Approval Office Server Features Review – Approval List Moderation Signature collection Publishing Process East Asian workflow Document Expiration Office Activity Examples Activities are the building blocks of workflows. Create Task Complete Task On Task Change Delete Task Update Item Create Item Copy/Delete Item On Item Change Log to workflow history list Creating your own Activities Create a new Workflow Activity Library project Inherit from System.Workflow.ComponentModel.Activity Must override the Execute method Write your custom code Define custom Properties WSS Workflow Fundamentals WSS supports workflows on items and documents WF associated with list, document library or content type WF can be started and completed by user actions WF can be configured to start without user action WSS adds a dimension of human accountability All WSS workflows are associated with a task list WSS adds a dimension of tracking and reporting All WSS workflows are associated with a workflow history list ..WSS Workflow Fundamentals Workflow Stages Workflow Association Workflow Initiation Workflow Status Workflow Task Completion WSS Workflow Architecture Workflows are run on items and documents Workflows associated with list, document library or content type Farm-wide table tracks associations to WF templates Workflow Template Workflow Assembly Collection Form 1 Form 2 Form 3 Workflow A Content Type Workflow B Workflow Assembly List Farm-level Workflow Association Table Document Library Workflow Assembly Workflow C Form 1 Form 2 Sample Business Process Request Approval Revise proposal Send Task to Approver Approver Delegates Request change Decision Approval Proposal Rejected Completed Simplified Business Process Request Approval Send Task to Approver Decision Approval Completed Using The Workflow Developing Workflow Tools Comparison Using Visual Studio.net Designer It’s not for a specific Sharepoint Site Developing custom code to your activities Design Forms to communicate with users Done by Professional Developer Can author both sequential and state workflows Using Sharepoint Designer It’s for a specific Sharepoint Site Code-free, declarative rules-based workflows . you are in effect assembling pre-existing activities into workflows Likely Done by Web designer or Knowledge worker. Can Author sequential workflow only. http://msdn2.microsoft.com/en-us/library/ms461944.aspx What Is SharePoint Designer? New product targeted at enterprise solution creators and designers using SharePoint technologies Great web design tool High quality design surface and integrated code view Deep web standards support (XHTML, CSS, XSLT, XML) Excellent ASP.NET support (control hosting, prop editing, data binding, intellisense) Part of MS family of web tools: Microsoft Office SharePoint Designer Expression Web Designer Visual Studio Web Developer The Workflow Designer Creating application logic without code Workflow Designer Overview RAD workflow development tool Deep SharePoint integration Low barrier to entry Enables new scenarios: Custom SharePoint List logic Reporting & tracking apps (event-based) Rule-Based “No Code” Workflows Built on Windows Workflow Foundation hosting in SharePoint Workflows are composed of pre-existing building blocks and conditional logic Based on Events, Conditions, and Actions Described by XOML files in web site Triggered by initiation form or list events Supports rich data binding to list items Extensible via custom actions, conditions Sample Workflow Actions Assign Custom Task Send Email Create/Update/Delete List item Collect Feedback Wait for Timer Wait for Data Change Creating a custom workflow in Sharepoint Designer Development Steps 1. Model workflow in Visual Studio 2. Create and bind InfoPath forms 3. Deploy to SharePoint server 4. Debug the running workflow Workflow Deployment Compile your workflow template as a strong-named assembly. Create the feature definition file that provides Windows SharePoint Services with the information necessary to deploy your workflow at the specified scope. Create the workflow definition file that provides Windows SharePoint Services with the information necessary to instantiate and run the workflow. Set the deploy property so that building the solution deploys the workflow files to the correct location, copies the workflow assembly to the global assembly cache (GAC), and activates the workflow feature in Windows SharePoint Services. Model Workflow In Visual Studio Prerequisites: Visual Studio 2005 extensions for WF – (RC5) SharePoint 2007 SDK – Visual Studio templates for SharePoint workflow Create project of type “SharePoint Sequential Workflow Library” Create the workflow Visual Studio 2005 extensions for WF http://www.microsoft.com/downloads/details.aspx?familyid=5D61409E- 1FA3-48CF-8023-E8F38E709BA6 SharePoint Server 2007 SDK: http://www.microsoft.com/downloads/details.aspx?familyid=6d94e307- 67d9-41ac-b2d6-0074d6286fa9 Create And Bind InfoPath Forms Types of InfoPath forms in Workflows Association form User adds workflow to a list For setting options on WF Initiation form For manual workflow start Collects workflow parameters Task completion form A user to edit a task from WF User edits or enters data Modification form Linked off WF status page Can modify in-flight WF Create And Bind InfoPath Forms InfoPath forms are used in these places Create And Bind InfoPath Forms SharePoint hosts the InfoPath form Hosting Environment InfoPath Form Templates Create And Bind InfoPath Forms Data from SharePoint is passed in Hosting Environment SharePoint InfoPath Form object Templates _________ _________ _________ Create And Bind InfoPath Forms Submit the form, saves data to SharePoint Hosting Environment SharePoint InfoPath Form object Templates _________ _________ _________ Create And Bind InfoPath Forms SharePoint starts the workflow Hosting Environment SharePoint InfoPath Form object Templates _________ _________ _________ SharePoint -> Task/WF Host Create and Bind InfoPath Forms Pushing data from WF task into IP SharePoint Task Task data as xml •instructions = ItemMetadata.xml “Please do this.” <z:row xmlns:z=“#RowsetSchema” ows_instructions=“”/> InfoPath Task Form Deploy To SharePoint Server Generate Metadata files Feature.XML Workflow.XML Create the CAB (WSP) Box admin installs “WSP” file Install/activate the “feature” IISReset Associate workflow to the list/library Debug The Running Workflow Visual Studio running on server machine Open the workflow in Visual Studio Attach to all of the W3WP Processes Start the workflow Building The Workflow Recap – Steps involved Create Workflow project in Visual Studio 2005 Model the workflow Create and bind InfoPath forms Design workflow code and activities Sign and compile the assembly Author the feature definition file Add GUID Add title Add description Add manifest location Author workflow template definition file Add GUID Add name Add description Add form URN’s Add assembly details extract the public key Run the post build event to deploy the workflow Associate the workflow to a list Attach to the W3WP.exe process and debug VSTO to make it easier Visual Studio tools for Office (VSTO) soon to be released Include new VS templates for SharePoint workflow Development steps with VSTO Create workflow in Visual Studio Tools for Office Design the actual workflow, add code etc. (This is the “real” developer task) Press F5 Advanced Workflow Features Collaboration and Communications Information workers need tools to enable them to work collectively irrespective of any geographical barriers. Unified Communications Communications that once were separate become unified E-mail, instant messaging, and Web conferencing are available to people in the context of the work they are doing Empowering Global Teams with Collaborative Workspaces Teams can easily collaborate by using workspaces that match when, how, and where they are working Connecting People, Process, and Information Knowledge Network for SharePoint Server 2007 Business Processes Organisations need tools to define a collection of related structural activities that produce something of value Information workers need tools to enable them to easily undertake these activities providing appropriate inputs and handling the outputs. Electronic Forms Scalable, security-enhanced, standards-based data- gathering solution Windows Workflow is great for workflow within an application whereas BizTalk is great for workflow across Workflow – e.g. Approval, Request Feedback, Translation applications and this is Workflows in flight are persisted in SharePoint precisely why BizTalk Human workflow interaction via Office Client or SharePoint. shines in Enterprise Window Workflow Out of the box standard patterns re shipped with MOSS 2007 Application Integration Custom workflows developers using SharePoint Designer 2007 Foundation Complex workflow developers using Visual Studio scenarios Business Process Orchestration and Integration Process Orchestration Adapters Message translation Well proven – high scalable Biztalk Adapter for SharePoint Libraries Extensive admin and analytics tools Business Intelligence Information workers need tools to make well informed business decisions and enable competitive advantage. Business Insight Dashboards, KPI web parts Browser based access to spreadsheet functionality Connect to OLAP cubes / SQL 2005 Analysis Services Drive Business Performance Performance management process through Microsoft personalized Web-based scorecards Office PerformancePoint Advanced analytic and data visualization capabilities Server 2007 Planning, budgeting and forecasting Project and Portfolio Organisations need tools to effectively manage and coordinate work, resources and costs … ranging from one-time projects to complex programs and portfolios across the business. Effectively manage and coordinate work from simple projects to complex programs Manage projects and programs Control resources and finances Time and status reporting Identify, select, manage, and deliver portfolios that align with their business strategy Manage projects, programs and applications Align portfolios with business strategies Advanced portfolio analytics and optimization Thank you!
Pages to are hidden for
"JORDEV -Workflow"Please download to view full document