190 likes | 309 Views
SharePoint Workflows with Visual Studio. Stuart Cox RBA Consulting Stuart.Cox@RBAConsulting.com techpunch.wordpress.com. RBA Consulting. RBA Consulting is the leading technology integrator and recognized as the premier consulting company to work for in every market we serve
E N D
SharePoint Workflowswith Visual Studio Stuart Cox RBA Consulting Stuart.Cox@RBAConsulting.com techpunch.wordpress.com
RBA Consulting RBA Consulting is the leading technology integrator and recognized as the premier consulting company to work for in every market we serve • Strong leadership team with proven track record • Unparalleled technology expertise • Unmatched reputation for customer service • Unique culture and employment experience • Broad portfolio of business and technical solutions • Strategic relationship with Microsoft locally, nationally and corporate in Redmond RBA’s core competencies include: • Infrastructure • Business Intelligence • Information Worker • Mobility Solutions • SOA and Business Process • Custom Development Visit our booth!
Audience Survey • With SharePoint 2007, have you… • Used out-of-box workflows? • Created SharePoint Designer workflows? • Developed SharePoint workflows with Visual Studio? • Developed custom SharePoint features?
What is Workflow? • Business process involving a sequence of steps • Usually includes user and system interaction • Can be long running or short-livedoperations • Started manually by user or triggered by system events
Workflow Fundamentals • Based on .Net 3.0 Workflow Foundations (WF) • SharePoint is the WorkFlow host • Built using “Activities” • Distinct units of work • WF 3.0 Activities • SharePoint Activities • Sequential and State Machine workflows supported
SharePoint Designer Workflows • Pros • Allows power users to create ad-hoc workflows • Allows creation of workflows against a single list • Fast for prototyping • No code required! • Cons • SPD workflows are bound to a single list, no reuse • Not developer focused • Very limited in what you can do
Visual Studio Workflows • Code Reuse • Create reusable workflow templates • Packaged as features / solutions for deployment • Reuse across lists, sites, site collections, web farms • Full Power of .Net platform • Extend SharePoint Designer workflows… • Create custom activities for use in SPD workflows
Workflow Development Toolbox • Development environment with SharePoint • Virtual PC, Hyper-V or VMWare Workstation • Visual Studio 2008 Highly Recommended • MOSS 2007 SDK or WSS 3.0 SDK • Office 2007 (Outlook, InfoPath 2007)
MOSS Workflow with Visual Studio 2005 • Create a snk to strong name the assembly • Generate GUID’s for features, solution • Create feature.xml file to define feature properties • Create workflow.xml file to define the workflow • Code the workflow • Copy feature xml to the 12\TEMPLATE\FEATURES • Deploy binaries to bin or GAC • Run stsadm –o installfeature –name… • IISRESET • Activate feature • Associate list with feature • Attach to wp3 process for debugging
Visual Studio 2008 • Visual Studio 2008 highly recommended • Much better OOB support for SharePoint development • Workflow project templates - Wizard • Debugging integration on Run command • More time to focus on coding the workflow! • If you’re using 2005, you’ll need to install… • Visual Studio Extensions for .Net 3.0 (Workflow) • MOSS 2007 SDK or WSS 3.0 SDK
Workflow Packaging & Deployment • Workflows are deployed as features • Workflow files and forms deployed to FEATURES directory • Assemblies strongly named and deployed to GAC • Package as Solution Package (WSP) for deployment • WSP is a cab file containing features to be installed • Installed by STSADM command, managed in Central Admin • Solution Packaging Tools • WSPBuilder (CodePlex, best in my opinion) • Visual Studio Extensions for WSS (VSExWSS), STSDev, and SPDeploy are other alternatives
Using Your Workflow • Deployed as feature to the web farm • Activate the feature on the site • Associate your workflow with a list
Workflow Associations • Workflow Templates created in Visual Studio • Templates are tied to list by a “Workflow association” • Many levels of scope available • List or document library (most common) • Content type (list, site or web scope) • Can be assigned to policies (expiration policy) • Workflow association links… • List Item, Task List, History List
Workflow Forms • Forms allow user input into the workflow • 4 Types of Workflow Forms • Association & Initiation • Task & Modification • 2 Technology Options • ASP.Net (WSS or MOSS) • InfoPath (MOSS Only) • Easier to develop than .ASPX forms • Extends form UI into Office 2007 client applications
Code Demo • Sequential Workflow • Live demo • Code and deploy a sample workflow • Demonstrate Visual Studio 2008 integration • See Workflow designer in action • Demonstrate debugging functionality
References • MOSS 2007 and WSS 3.0 SDK’s • Walkthroughs and Labs on MSDN and TechNet • Robert Shelton’s screencasts at www.rshelton.com
Q & AThank you for attending session!! Stuart Cox RBA Consulting Stuart.Cox@RBAConsulting.com techpunch.wordpress.com Please fill out evaluations during this time. Prize giveaways will be drawn from completed evaluations.