This document summarizes a presentation on developing reusable workflow features in SharePoint. The presenter advocates taking a portfolio approach to process design and leveraging central services like user profiles and business connectivity services. Examples are provided of centralized budget approval limits and out of office delegation configurations. Approaches for building reusable full trust and sandbox workflow actions are demonstrated. Initiating workflows from other workflows to create reusable sub-processes is also described.
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Develop Reusable Workflow Features
1. Developing Reusable Workflow Features (Fri-S2A-106)Dev Track – 200 Mike Oryszak (@next_connect) Intellinet Aug 12, 2011 Welcome to SharePoint Saturday—The Conference
2. Welcome to SharePoint Saturday—The Conference Thank you for being a part of the first SharePoint Saturday conference Please turn off all electronic devices or set them to vibrate. If you must take a phone call, please do so in the hall so as not to disturb others. Open wireless access is available at SSID: SPSTC2011 Feel free to “tweet and blog” during the session Thanks to our Diamond and Platinum Sponsors:
3. About Me Practice Manager with Intellinet Microsoft SharePoint Server MVP Dev and Architect with MS stack since 1996 Working with SharePoint since 2002 Raleigh-Durham, NC Area since 1998
4. Outline & Agenda Approach and Goals Overview on Creating Custom Actions Example 1 – Budget Approval Limits Example 2 – Out of Office Delegation Additional Examples Wrap-up and Questions
6. Approach and Goals Common Workflow Limitations Workflows developed one at a time Config and Admin content is localized – Silos Maintaining data difficult, and process admin focused
7. Approach and Goals Reuse Goals Centralize common configuration data Leverage central farm services Make it easier for users to maintain their data Reduce time to create new workflows Improve efficiency of managing workflows
8. Approach and Goals Approaches Take a “Portfolio Approach” to process design Change data lookup sources from local to central Budget Approval Limit example Out of Office Delegation example Group common calls into Actions or Services Out of Office Delegation example Check Request example
9. Approach and Goals Approaches Leverage central services like User Profiles, BCS Budget Approval example Out of Office Delegation example Link workflows together; start workflow from another Check Request example
11. Full Trust Actions Approaches Leverage central services like User Profiles, BCS Budget Approval example Out of Office Delegation example Link workflows together; start workflow from another Check Request example
12. Full Trust Action Implementation Important Namespaces System.Workflow.ComponentModel Microsoft.SharePoint.Workflow Microsoft.SharePoint.WorkflowActions Key Dev Tasks Define Properties Override ActivityExecutionStatus Execute Override ActivityExecutionStatusHandleFault Create WorkflowActions definition in Elements.xml
13. Sandbox Actions Developed in Visual Studio Limited to Site Collection boundaries Does not require server admin to deploy; O365 Provides a way to create simple reusable features
14. Sandbox Action Implementation Important Namespaces Microsoft.SharePoint.Workflow Microsoft.SharePoint.UserCode Key Dev Tasks Action must return a Hashtable Action must accept a SPUserCodeWorkflowContext as the first argument Create WorkflowActions definition in Elements.xml
16. Budget Approval Overview A common example of data needed to support an approval workflow Centralize the data so that it is available for multiple processes Leverage services like User Profile and BCS
22. Out of Office Delegation Developing Reusable Workflow Features
23. Out of Office Delegation Overview SharePoint has built-in Out of Office Delegation Great example of User Maintained config data Great example of leveraging User Profiles
24. Bad Approach Building it into each process, with localized data stored in a list on the workflow site Process Admin Maintains it Data stored in multiple places Workflow steps maintained in multiple places
25. Alternative Approach Out of Office Delegation Feature User Profile Custom Attributes Out of Office Start Date Out of Office End Date Out of Office Delegation Custom Workflow Action Simplifies check from SPD workflows
28. Additional Examples Standard Feature Requests Escalations Task Reminders Role Based Assignments (CFO, Ops Mgr, etc) Frequent Re-usable Processes Check Request Compliance Activity Logging
29. Initiating Another Workflow Create Reusable Sub-Processes Use Standard Events New Item Edit Item Can use Full Trust Actions to add/edit items between site collections
30. Check Request Overview Check Request is an example of a process that may be initiated from multiple processes Could be built into each process, or separated into a separate “sub-process” for reuse
37. Recommended Approaches Take a “Portfolio Approach” to process design Change data lookup sources from local to central Group common functions or calls into Actions or Services Leverage central services like User Profiles, BCS Link workflows together; start workflow from another
39. Additional Resources MSDN – Create a Sandbox Workflow Action http://msdn.microsoft.com/en-us/library/ff798499.aspx MSDN – Reference Implementation Workflow Activities http://msdn.microsoft.com/en-us/library/ff798330.aspx User Profiles – Creating Custom Properties http://www.mikeoryszak.com/sharepoint/user-profiles-%e2%80%93-creating-custom-properties User Profiles – Driving Business Process http://www.mikeoryszak.com/sharepoint/user-profiles-%e2%80%93-driving-business-process Workflow Posts http://www.mikeoryszak.com/tag/workflow
40. Contact Info Blog - http://www.mikeoryszak.com Twitter - @Next_Connect Email – nextconnect@live.com LinkedIn - http://www.linkedin.com/in/michaeloryszak
41. Thanks to Our Other Sponsors! Thanks to our Sponsors
42. Session Evaluation Please complete and turn in your Session Evaluation Form so we can improve future events. Survey can be filled out at: http://app.fluidsurveys.com/surveys/spstc2011- and add the Session number to the URL Presenter: ______________________ Session Name: ______________________ Session No.: ______________________