How to: Demo the Hello World Sequential Workflow for SharePoint

(Compile, Install then demo a SharePoint workflow built in Visual Studio)

Tim Huckaby, CEO, Interknowlogy,

Microsoft RD & MVP

Description

This is a step by step instructional doc for Compiling, Installing, then demoing the HelloWorldSequential SharePoint workflow built in Visual Studio.

History

I originally received this codebase from the SharePoint Workflow team for a session I did at teched in 2006…when this was all beta. It’s been replatformed through the builds and I hacked it up a bit through the years. I used to build the thing from scratch by dragging, dropping, and pasting code. But, in that manner to adequately explain everything going on (because it’s so abstract) it took a full hour. when I’d hurry it up I’d end up losing everyone…and then with so many moving parts there is the potential to screw something up on stage.

Platform

The following step by step instructions for building the solution requires, Visual Studio 2005/2008, Office SharePoint Server 2007 (most likely running in a VPC), and the HelloWorldSequential visual studio solution.

Instructions

Exercise 1: Explain the HelloWorldSequential VS 2008 Project
Open the HelloWorldSequential Visual Studio 2008 solution.
Show Worlkflow1.cs in design mode.
Show the toolbox and all the events and controls available
Double Click on OnWorkflowActivated to show the code behind and how the app is initialized.
Double Click on the SendMail component to show the code behind sending an email when the workflow is completed.
Show WorkFlow.xml and explain how the workflow is tied together
  • Point out the instantiation form and the hardcoded xsn guid.
  • Open ReviewInitiationForm.xsn in design mode to launch the infopath designer
  • Do File/Properties to show the guid of the form

Compile the solution by doing a “Build Solution”
Show Install.bat and all the moving parts.
Run Install.bat in a cmd window and talk to the process being automated in vs2008
  • Talk to the installing in the GAC and having to flush iis

Additional information

Exercise 2: Show how to use the custom workflow in SharePoint
  • Hit F5 to refresh the page. It will take a bit because of recycling the webserver
  • From the document library in the team site, Go to Settings
  • Go to Document Library Settings
  • Click Workflow Settings
  • Click “Add a WorkFlow”
  • Choose “Sample: Hello Workflow Sequential” as the template
  • Give it a unique name like “OrlandoSequential”
  • Point out the purpose of the rest of the fields on the form and click “Next”
  • In the form: Default the email value to the admin you are logged in as: TSRI-MOSS-EX\tsri-admin
  • Enter instructions like: “please take a look at this document and comment.”
  • Leave the “comments” field blank.