name : ted pattison title: author/instructor company: critical path training session code: ofc320
TRANSCRIPT
![Page 1: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/1.jpg)
![Page 2: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/2.jpg)
Developing Microsoft Office SharePoint Server 2007 Workflows with Microsoft Visual Studio 2008
Name : Ted PattisonTitle: Author/InstructorCompany: Critical Path TrainingSession Code: OFC320
![Page 3: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/3.jpg)
AgendaWindows Workflow Foundation (WF) PrimerCreating WF programs in Visual StudioCreating workflow templates for WSSWorkflow associations and workflow instancesCreating and waiting on WSS tasksIntegrating workflow input forms
![Page 4: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/4.jpg)
Reactive ProgramsAutomating a business process
Often requires program with episodic behaviorProgram waits around and then reacts to some event
How would you automate document approval?In a Windows Forms applicationIn an ASP.NET Application
![Page 5: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/5.jpg)
Windows Workflow Foundation (WF)What is the Windows Workflow Foundation?
Development platform for building reactive programsSet of development tools integrated with Visual StudioRuntime components that ship with.NET FX 3.0
Windows Workflow Foundation conceptsWF programWorkflow instanceActivities
![Page 6: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/6.jpg)
ActivitiesAn activity is
atomic set instructions used complete a unit of workreusable component used to compose WF programs
Activities are like a controls in forms developmentYou drag and drop them onto a design surfaceYou modify their properties through property sheetYou generate event handlers and write code inside
Activities are different than controlsActivities are resumable
![Page 7: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/7.jpg)
Composite ActivitiesComposite Activities can contain children
Composite activity controls execution of childrenComposite activity can encapsulate control-of-flowExamples: IfElse, While, Sequence, Parallel, Replicator
WF program is itself a composite activityWF program models a tree of activities
![Page 8: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/8.jpg)
WF Base Activity LibraryStandard WF activities provide basic building blocks
![Page 9: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/9.jpg)
WF Program Types
WF provides two main styles of WF programsSequential WF program modeled as flow chartState machine WF program models using states
![Page 10: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/10.jpg)
Visual Studio Workflow Designer
![Page 11: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/11.jpg)
Developing Workflow Programs with Visual Studio 2008
demo
![Page 12: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/12.jpg)
The WF Runtime
![Page 13: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/13.jpg)
WF Runtime ServicesCustom services can be written and plugged in
WSS provides its own persistence service
![Page 14: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/14.jpg)
SharePoint Workflow ConceptsDesign goals for WF integration with WSS
Use WF to attach logic to items and documentsAdd a human dimension on top of WFMaintain self-service capabilities common in WSSCreate strong developer story for custom WF programsProvide valuable WF programs out-of-box with MOSS
The human dimensionAny SharePoint workflow can assign tasks to usersUsers can see the status of any workflow instance
![Page 15: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/15.jpg)
SharePoint Workflow ActorsWorkflow template
WF Program and optionally workflow input forms A feature to install it inside WSS farm
Workflow associationBinding of workflow template to list or content typeA named instance containing parameterized data
Workflow instanceA running instance of a WF program attached to an item
![Page 16: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/16.jpg)
Creating a Workflow Association
![Page 17: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/17.jpg)
Starting a Workflow InstanceUsers can manually start workflows
![Page 18: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/18.jpg)
The Workflow Status Page
Any user can see the status of a workflow instance
![Page 19: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/19.jpg)
Creating and Managing Workflow Associations
demo
![Page 20: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/20.jpg)
WSS/MOSS Workflow Options
Use out-of-box workflow templates from MOSSYou have just seen how easy they are to use
Use SharePoint Designer to create workflowsSPD creates ad-hoc workflow association inside siteEasy to create but hard/impossible to reuse/deploy
Develop custom workflow templates with Visual Studio 2008 which target WSS3 and/or MOSS
This is what this session is all about
![Page 21: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/21.jpg)
Creating a Workflow Template ProjectCreating SharePoint Workflow Project in Visual Studio 2008
![Page 22: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/22.jpg)
Complete the WizardStep 1 – Specify SharePoint URL
Enter the name of the workflowSpecify the URL to SharePoint site
![Page 23: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/23.jpg)
Complete the WizardThe following lists need to be available:
Document LibraryTasks listHistory list
![Page 24: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/24.jpg)
Complete the Wizard Step 2 – select the necessary lists
List or document library to associate workflowHistory listTasks list
![Page 25: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/25.jpg)
Complete the Wizard Step 3 – decision on how to start the workflow
![Page 26: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/26.jpg)
Creating and Debugging a Workflow Template with Visual Studio 2008
demo
![Page 27: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/27.jpg)
Developing the WF Program
Getting around inside the Workflow DesignerLearn to move between Designer view and code ViewGet to Know the Activities in the SharePoint Activity Library
![Page 28: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/28.jpg)
Working in Code ViewHere is what you get as a starting point
![Page 29: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/29.jpg)
SharePoint Activity Library
WSS-specific activities used to create SharePoint WF Programs
![Page 30: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/30.jpg)
Data Bound Properties
WF supports data binding of propertiesAllows for declarative flow of data between activitiesUsed extensively for creating SharePoint WF programs
![Page 31: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/31.jpg)
Generating Event HandlersGenerate event handlers to add code
Event handlers can program against WF objects
Right-click on activity and choose Generate Handlers
![Page 32: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/32.jpg)
Workflow Template DeploymentWorkflow templates are deployed via features
Feature must be scoped to site collection (Scope=Site)Feature may contain multiple workflow templates
![Page 33: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/33.jpg)
Workflow Template DefinitionWorkflow Element defines Workflow Template
Must point to one specific WF programWF program must be compiled into an assembly DLLAssembly DLL must be installed in GAC
![Page 34: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/34.jpg)
Testing 'Hello World' Workflow Template
![Page 35: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/35.jpg)
Creating and Waiting on TasksSharePoint Workflows revolve around tasks
Represent significant value-add WSS brings to WFBased on standard WSS tasks visible/editable by usersUsers update tasks through browser or Office programsYour code automatically wakes up and executes
WSS Tasks are generated with subscriptionsWSS encapsulates the listener mechanismWSS registers event handlers behind the scenesYou just add event activities and write event handlers
![Page 36: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/36.jpg)
Task GUIDs and Correlation TokensWSS sets up subscriptions for tasks
Based on registering event handlersWSS needs way to identify certain task across activitiesEach task is assigned a GUID and a correlation token
![Page 37: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/37.jpg)
Action Activities vs. Event ActivitiesAction activities perform work
Their event handlers fire before work is done
Event activities run code in response to an eventTheir event handlers run after the event has occurred
Action Activitiesare blue
Event Activitiesare green
![Page 38: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/38.jpg)
Initializing a New TaskAdd event handler behind CreateTask activity
This event handler fires before task creationGives you a chance to initialize task properties
![Page 39: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/39.jpg)
Waiting on a Task
Event activity creates subscriptionOnTaskChanged puts activity to sleepEvent handler fires upon modification
While activity used to control flowWhile activity loops until task complete
![Page 40: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/40.jpg)
Creating Workflow Forms with ASP.NETWorkflow input forms can be created in ASP.NET
Benefits to creating workflow forms with ASP.NETCan run from WSS-only farms
Drawback to creating forms with ASP.NETMore coding involved
![Page 41: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/41.jpg)
ASP.NET Workflow Form Integration
Custom taskcontent type
custom ApplicationPages in _layouts
![Page 42: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/42.jpg)
Integrating Workflow Input FormsWorkflow Input Form Types
Association formInitiation formsModification formsTask edit form
Sample ProjectLitwareWorkflows
![Page 43: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/43.jpg)
The Association Form
![Page 44: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/44.jpg)
The Initiation Form
![Page 45: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/45.jpg)
Invoking the Modification Form
There is one link per modification
![Page 46: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/46.jpg)
The Task Edit Form
![Page 47: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/47.jpg)
Creating Workflow Forms with InfoPathWorkflow input forms can be created in InfoPath
Benefits to creating workflow forms with InfoPathSignificantly better forms designer experienceSignificantly less codingForms can be opened directly with Office client apps
Drawback to creating forms with InfoPathWorkflow template will only run in MOSS farmsWorkflow template will not run in WSS-only farms
![Page 48: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/48.jpg)
InfoPath Workflow Form Integration
urn:schemas-microsoft-com:office:infopath:ReviewInitiationForm2:-myXSD-2005-11-22T23-49-53
standard MOSStask content type
standard MOSS application pages
![Page 49: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/49.jpg)
Integrating Workflow Input FormsWorkflow Input Form Types
Association formInitiation formsModification formsTask edit form
Sample ProjectLitwareWorkflows
![Page 50: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/50.jpg)
SummaryWindows Workflow Foundation (WF) PrimerCreating WF programs in Visual StudioCreating workflow templates for WSSWorkflow associations and workflow instancesCreating and waiting on WSS tasksIntegrating workflow input forms
![Page 51: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/51.jpg)
Attend an Interactive Theater Session and enter to win a Microsoft ARC Mouse
Attend any SharePoint Breakout Session day 1 – 4 and check the last slide for a daily picture.
Come to the TLC yellow area, SharePoint booths OFC 4 and 5 to spin the wheel for a chance to win a prize. The wheel only spins when the SharePoint spotlight is flashing. One spin per person.
Collect all four daily SharePoint pictures and enter to win a Microsoft ARC Mouse. Game cards can be picked up at the booth.
Drawing for Mice on Friday at the wheel at 11:30AM.
Monday’s Picture is:
Red Carpet
Collect the SharePoint Session Picture of the Day
![Page 52: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/52.jpg)
Track ResourcesSpin the Wheel: Attend SharePoint breakout sessions Mon-Thurs and collect the picture of the day. Come by the booth for a chance to spin the SharePoint wheel. Collect all 4 pictures and enter to win a Microsoft Arc Mouse, drawing 11:30am on Friday, game cards at the booth.
Product Info http://www.microsoft.com/SharePoint
Dev ResourcesSharePoint MSDN Web Site: http://msdn.microsoft.com/sharepointSharePoint Developer Resources: http://mssharepointdeveloper.com/
SharePoint Conference 2009 www.mssharepointconference.com
ITPro ResourcesSharePoint Tech Center: http://technet.microsoft.com/en-us/office/sharepointserver/SharePoint Best Practices:http://technet.microsoft.com/en-us/office/sharepointserver/bb736746.aspx
![Page 53: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/53.jpg)
![Page 54: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/54.jpg)
www.microsoft.com/teched
Sessions On-Demand & Community
http://microsoft.com/technet
Resources for IT Professionals
http://microsoft.com/msdn
Resources for Developers
www.microsoft.com/learningMicrosoft Certification and Training Resources
www.microsoft.com/learning
Microsoft Certification & Training Resources
Resources
![Page 55: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/55.jpg)
Complete an evaluation on CommNet and enter to win!
![Page 56: Name : Ted Pattison Title: Author/Instructor Company: Critical Path Training Session Code: OFC320](https://reader036.vdocuments.mx/reader036/viewer/2022062309/56649e955503460f94b99cd1/html5/thumbnails/56.jpg)
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.