SUGUK Nottingham - Extending SPD workflow using custom activities

4,198 views

Published on

Slides from my presentation at SUGUK Nottingham on 23/3/2011.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
4,198
On SlideShare
0
From Embeds
0
Number of Embeds
2,469
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SUGUK Nottingham - Extending SPD workflow using custom activities

  1. 1. Extending SharePoint Designer Workflow using Custom Activities<br />“You don’t always need full blown Visual Studio Workflow…”<br />
  2. 2. About Me<br />SharePoint Consultant at Intelligent Decisioning<br />Gadget fanatic and keen Motorcyclist<br />3-4 Years experience with SharePoint since 2007/WSS 3.0<br />MCITP/MCTS SharePoint 2010/2007<br />
  3. 3. Contact<br />Blog – www.sharepointalex.co.uk<br />Twitter - @sharepointalex<br />Email – alex@id-live.com<br />
  4. 4. Workflow in SharePoint – The Choices<br />OOTB – <br />Approval<br />Three State<br />Collect Feedback<br />SharePoint Designer<br />Declarative (XML Based)<br />Visual Studio (Windows Workflow Foundation)<br />WWF (Code Based)<br />
  5. 5. Workflow in SharePoint – The Problems<br />OOTB – <br />Too restrictive<br />Doesn’t always align to business process<br />Visual Studio<br />Requires lots of development time/effort<br />Can be complicated<br />Not easy to modify when business process changes<br />SharePoint Designer<br />Fits the bill most of the time<br />Limited set of Actions/Activities<br />Business process often requires a more complex workflow<br />
  6. 6. Setting the Scene<br />Simple Absence system built in SharePoint<br />Three SharePoint lists<br />Absences<br />Quota<br />Teams<br />SPD workflow<br />Employee raises absence request – Team lead to approve.<br />‘Holiday Taken’ updated in Quota list when absence request approved.<br />
  7. 7. Demo<br />Absence System built in SharePoint<br />
  8. 8. The Requirement<br />The Employee is a Resource on a project within Project Server.<br />We need to be able to add an exception to the Resource indicating they are on Holiday.<br />How can we do this?....<br />
  9. 9. Workflow in SharePoint – The Solution<br />Use SharePoint Designer Workflow and extend using Custom Activities!<br />
  10. 10. What is a Custom Activity?<br />WWF Activity that bolts on to SharePoint Designer<br />Contains<br />Activity Code<br />XML .Actions File<br />.Actions file describes the activity and its parameters<br />Deployed to 14TEMPLATE1033Workflow<br />Deploy as a Web Application Feature<br />
  11. 11. Why use a Custom Activity?<br />Requires less development time than full blown VS workflow<br />The whole workflow doesn’t need to change if the business process changes<br />Configurable by a power user from SPD design surface<br />Bridges the gap between SPD workflow and Visual Studio<br />
  12. 12. What can you do in a Custom Activity?<br />Anything that you can do in code!!<br />
  13. 13. Examples of Custom Activities<br />Update Active Directory<br />Interact with External Systems<br />Interact with SharePoint (using Object Model)<br />
  14. 14. Demo<br />Creating and Deploying a Custom Activity<br />
  15. 15. Summary<br />Decide on the Parameters you require & direction<br />Define Dependency Properties<br />Write Activity Code<br />Create .Actions File<br />RuleDesigner Sentence<br />FieldBinds<br />Parameters<br />Deploy using WSP & Feature Receiver<br />Test!<br />
  16. 16. Troubleshooting/Common Problems<br />“Activity doesn’t appear in design surface when I drag and drop”<br />Check there is a SafeControl entry in the web.config for the activity namespace/class<br />Verify that the activity is marked as an AuthorizedType in the web.config<br />“Activity doesn’t show in SPD”<br />Check syntax of .Actions file<br />Ensure Web App Feature is activated<br />“Setting output parameters in the designer doesn’t work as expected – shows String Builder”<br />Ensure you have set the ‘DesignerType’ attribute to ‘ParameterNames’<br />
  17. 17. Resources<br />SharePoint 2010 SDK<br />SharePoint Developer Documentation Team Blog Post - http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2007/11/15/extending-workflow-actions-for-sharepoint-designer.aspx<br />WorkflowInfo and WorkflowActions Schema – http://msdn.microsoft.com/en-us/library/bb897626.aspx<br />Free Workflow Actions on Codeplexhttp://ilovesharepoint.codeplex.com/releases/view/60840<br />
  18. 18. Questions?<br />

×