building workflows for microsoft sharepoint products and technologies mohammed zayed information...
TRANSCRIPT
Building workflows for Microsoft SharePoint Products and TechnologiesMohammed ZayedInformation Worker Specialist
Agenda
Windows Workflow Foundation (WF) overviewMicrosoft Sharepoint Server in a glanceSharePoint Integration with WF Building Workflow in MS SharePoint DesignerWorkflow authoring scenariosLive Demo - Using the workflowDeveloping workflow with Visual StudioLive Demo - Building the workflowWorkflow Tools Technical ComparisonsMicrosoft Business Process Management VisionInformation Worker Products and ServicesResources and Best PracticesSummery
Windows Workflow Foundation (WF)Single workflow technology for Windows
Extensible framework & toolsetBase platform for Microsoft, ISV and customer solutions
A framework for building workflow into applicationsA framework to build on - not an application or serverExposed to developers via .NET 3.0
Windows Operating Systems (Client and Server)
Office 2007 Future MSFT Application Custom ISV Application
.NET 3.0/3.5 Framework
Windows Workflow Foundation (WF)
Encapsulated logic for coordinating business processes provides abstractions to model real world processesvaluable for modeling long running and stateful behaviorWorkflows in WF are decomposed into activities
What are workflows?
Sequential workflows
modeled as flowchart
State machine workflow
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 processMicrosoft Windows platform component that provides a programming framework and tools for development and execution of workflow-based applications
WF: Designer for Visual Studio.netWorkflow Extensions for .NET Framework 3.0
WF: Runtime EngineMS.NET Framework 3.0/3.5
Simplify how people work
together
Reduce IT costs and
improve security
Help protect and manage
content
Find information and improve
business insight
A New World Of Work
Trends Role of Software
Cost pressure
Always on, always
connected
Transparent organization
One world of business
PortalPortal
SearchSearchEnterpriseEnterpriseContentContent
ManagemeManagementnt
BusinessBusinessProcessProcess
andandFormsForms
BusinessBusinessIntelligenceIntelligence CollaboratioCollaboratio
nn
SharePoint Investment AreasSharePoint Investment Areas
PlatforPlatformm
ServiceServicess
Workspaces, Mgmt,Workspaces, Mgmt,Security, Storage,Security, Storage,
Topology, Site ModelTopology, Site Model
BusinessBusinessIntelligenceIntelligence
Server-based Excel spreadsheets and data visualization, Report Center, BI Web Parts, KPIs/Dashboards
CollaborationCollaboration
Docs/tasks/calendars, blogs, wikis, e-mail integration,
project management “lite”, Outlook integration,
offline docs/lists
Business Business Process Process
andandFormsForms
OOB workflows, WF Integration, Rich and Web forms based front-ends, LOB actions, pluggable SSO
PortalPortal
Enterprise Portal template, Site Directory, My
Sites, social networking,
privacy control
SearchSearchEnterprise scalability,contextual relevance,
rich people and business data search
EnterpriseEnterpriseContentContent
ManagementManagementIntegrated document management, records management, and Web content management with policies and workflow
Workflow Services
SequencingState managementTracking capabilitiesTransaction supportWSS 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 consumersProducer encapsulates logic into reusable black boxProducer exposes behavior through properties and events Consumer drops activity on workflow designer in Visual Studio
Workflow Authoring Scenarios
Visual Studio andWorkflow SDK
Out-of-the-BoxSolutions
(with customization)
SharePoint Designer Workflow
Routing and ApprovalReview – Approval
Signature collectionEast Asian workflow
Stru
ctu
red
A
d H
oc
Office Server FeaturesList Moderation
Publishing ProcessDocument Expiration
Tracking ApplicationsIssue tracking
LOBIntegration
Custom Form ActionsEmail Notification
Exception Handling
Document ProcessesSpec Review
Weekly Status Report
Custom Tracking Apps
Service RequestsAsset Tracking
Industryspecific processes
Purchase ordersProduct lifecycle mgmt
Office Activity Examples
Create TaskComplete TaskOn Task ChangeDelete TaskUpdate ItemCreate ItemCopy/Delete ItemOn Item ChangeLog to workflow history list
Activities are the building blocks of workflows.
Creating your own Activities
Create a new Workflow Activity Library projectInherit from System.Workflow.ComponentModel.Activity
Must override the Execute methodWrite your custom codeDefine custom Properties
WSS Workflow Fundamentals
WSS supports workflows on items and documentsWF associated with list, document library or content typeWF can be started and completed by user actionsWF can be configured to start without user action
WSS adds a dimension of human accountabilityAll WSS workflows are associated with a task list
WSS adds a dimension of tracking and reportingAll WSS workflows are associated with a workflow history list
..WSS Workflow Fundamentals
Workflow StagesWorkflow AssociationWorkflow InitiationWorkflow StatusWorkflow Task Completion
Workflows are run on items and documentsWorkflows associated with list, document library or content typeFarm-wide table tracks associations to WF templates
WSS Workflow Architecture
Workflow Template Collection
Workflow Assembly
Workflow Assembly
Workflow Assembly
Content Type
List
Document Library
Farm-level WorkflowAssociation Table
Workflow A
Workflow B
Workflow C
Sample Business Process
Request Approval
Send Task to Approver
Decision
Approval Completed
Request change
Revise proposal
Proposal Rejected
Approver Delegates
Developing Workflow Tools Comparison
Using Visual Studio.net DesignerIt’s not for a specific Sharepoint SiteDeveloping custom code to your activitiesDesign Forms to communicate with usersDone by Professional DeveloperCan author both sequential and state workflows
Using Sharepoint DesignerIt’s for a specific Sharepoint SiteCode-free, declarative rules-based workflows .you are in effect assembling pre-existing activities into workflowsLikely 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 technologiesGreat web design tool
High quality design surface and integrated code viewDeep 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 DesignerExpression Web DesignerVisual Studio Web Developer
Workflow Designer Overview
RAD workflow development toolDeep SharePoint integrationLow barrier to entryEnables new scenarios:
Custom SharePoint List logic
Reporting & tracking apps (event-based)
Rule-Based “No Code” Workflows
Built on Windows Workflow Foundation hosting in SharePointWorkflows are composed of pre-existing building blocks and conditional logic
Based on Events, Conditions, and ActionsDescribed by XOML files in web siteTriggered by initiation form or list eventsSupports rich data binding to list items
Extensible via custom actions, conditions
Sample Workflow Actions
Assign Custom Task Send EmailCreate/Update/Delete List itemCollect FeedbackWait for TimerWait for Data Change
Development Steps
1. Model workflow in Visual Studio2. Create and bind InfoPath forms3. Deploy to SharePoint server4. 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 StudioPrerequisites:
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 WFhttp://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
Association formUser adds workflow to a listFor setting options on WF
Initiation formFor manual workflow startCollects workflow parameters
Task completion formA user to edit a task from WFUser edits or enters data
Modification formLinked off WF status pageCan modify in-flight WF
Create And Bind InfoPath FormsTypes of InfoPath forms in Workflows
Hosting Environment
Create And Bind InfoPath FormsData from SharePoint is passed in
SharePoint object
_________
_________
_________
Hosting Environment
Create And Bind InfoPath FormsSubmit the form, saves data to SharePoint
SharePoint object
_________
_________
_________
Hosting Environment
Create And Bind InfoPath FormsSharePoint starts the workflow
SharePoint object
_________
_________
_________
SharePoint -> Task/WF Host
SharePoint Task
•instructions =“Please do this.”
Task data as xml ItemMetadata.xml
Create and Bind InfoPath Forms Pushing data from WF task into IP
InfoPath Task Form
<z:row xmlns:z=“#RowsetSchema”
ows_instructions=“”/>
Deploy To SharePoint Server
Generate Metadata filesFeature.XMLWorkflow.XML
Create the CAB (WSP)Box admin installs “WSP” file
Install/activate the “feature”IISResetAssociate workflow to the list/library
Debug The Running Workflow
Visual Studio running on server machineOpen the workflow in Visual StudioAttach to all of the W3WP ProcessesStart the workflow
Recap – Steps involvedCreate Workflow project in Visual Studio 2005Model the workflowCreate and bind InfoPath formsDesign workflow code and activitiesSign and compile the assemblyAuthor the feature definition file
Add GUIDAdd titleAdd descriptionAdd manifest location
Author workflow template definition fileAdd GUIDAdd nameAdd descriptionAdd form URN’s Add assembly details extract the public key
Run the post build event to deploy the workflowAssociate the workflow to a listAttach to the W3WP.exe process and debug
VSTO to make it easier
Visual Studio tools for Office (VSTO) soon to be releasedInclude new VS templates for SharePoint workflow
Development steps with VSTOCreate workflow in Visual Studio Tools for OfficeDesign the actual workflow, add code etc. (This is the “real” developer task)Press F5
Collaboration and CommunicationsCollaboration and Communications
Information workers need tools to enable them to work Information workers need tools to enable them to work collectively irrespective of any geographical barriers.collectively irrespective of any geographical barriers.
Empowering Global Teams with Collaborative Workspaces
Unified Communications
Connecting People, Process, and Information
Knowledge NetworkKnowledge Networkfor SharePoint Server 2007for SharePoint Server 2007
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
Teams can easily collaborate by using workspaces that match when, how, and
where they are working
Business ProcessesBusiness Processes
Organisations need tools to define a Organisations need tools to define a collection of related collection of related structural activities that produce something of valuestructural activities that produce something of valueInformation workers need tools to enable them to easily Information workers need tools to enable them to easily undertake these activities providing appropriate inputs and undertake these activities providing appropriate inputs and handling the outputs.handling the outputs.
Workflow – e.g. Approval, Request Feedback, Translation
Window WorkflowFoundation
Workflows in flight are persisted in SharePointHuman workflow interaction via Office Client or SharePoint.
Out of the box standard patterns re shipped with MOSS 2007Custom workflows developers using SharePoint Designer 2007
Complex workflow developers using Visual Studio
Windows Workflow is great for workflow
within an application whereas BizTalk is great for workflow across applications and this is precisely
why BizTalk shines in Enterprise Application Integration scenarios
Business Process Orchestration and IntegrationProcess Orchestration
AdaptersMessage translation
Well proven – high scalable Extensive admin and analytics tools
Biztalk Adapter for SharePoint Libraries
Electronic FormsScalable, security-
enhanced, standards-based data-gathering solution
Business IntelligenceBusiness Intelligence
Information workers need tools to make well informed Information workers need tools to make well informed business decisions and enable competitive advantage.business decisions and enable competitive advantage.
Business Insight
Drive Business Performance
Microsoft
Office PerformancePointOffice PerformancePointServer 2007Server 2007
Performance management process through personalized Web-based
scorecardsAdvanced analytic and data visualization
capabilitiesPlanning, budgeting and forecasting
Dashboards, KPI web partsBrowser based access to spreadsheet
functionalityConnect to OLAP cubes / SQL 2005 Analysis
Services
Project and PortfolioProject and Portfolio
Organisations Organisations need tools to effectively manage and need tools to effectively manage and coordinate work, resources and costs … ranging from one-coordinate work, resources and costs … ranging from one-time projects to complex programs and portfolios across the time projects to complex programs and portfolios across the business.business.
Effectively manage and coordinate work from simple projects to complex programsManage projects and programsControl resources and finances
Time and status reporting
Manage projects, programs and applications
Align portfolios with business strategiesAdvanced portfolio analytics and
optimization
Identify, select, manage, and deliver portfolios that align with their business strategy