This document summarizes Mike Oryszak's presentation on developing reusable workflow features in SharePoint. The presentation covered approaches for creating reusable workflows by centralizing configuration data, leveraging central services, and linking workflows together. It provided examples of creating custom actions for workflows and demonstrated reusable workflows for budget approval limits and out of office delegation that pull configuration from centralized sources like user profiles and business connectivity services. Additional examples of reusable sub-processes for tasks like check requests were also discussed.
Apidays New York 2024 - The value of a flexible API Management solution for O...
Â
Developing Reusable Workflow Features (SPS Richmond)
1. Developing Reusable Workflow Features
SharePoint Saturday Richmond
Mike Oryszak
http://www.mikeoryszak.com
November 5, 2011
2. 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
3. Session Overview
⢠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
5. Approach and Goals
Common Workflow Limitations
⢠Common Workflow Limitations
â Workflows developed one at a time
â Config and Admin content is localized â Silos
â Maintaining data difficult, and process admin focused
6. Approach and Goals
Workflow Reuse 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
7. Approach and Goals
Recommended Approaches
⢠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 functions or calls into Actions or Services
⢠Out of Office Delegation example
⢠Check Request example
â 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
9. Creating Custom Actions
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
10. Creating Custom Actions
Farm Solution Implementation
⢠Important Namespaces
â System.Workflow.ComponentModel
â Microsoft.SharePoint.Workflow
â Microsoft.SharePoint.WorkflowActions
⢠Key Dev Tasks
â Change Class Def to âpublic partial class <Name> :
Activityâ
â Define Properties
â Override ActivityExecutionStatus Execute
â Override ActivityExecutionStatus HandleFault
â Create WorkflowActions definition in Elements.xml
â Register Type in web.config
11. Creating Custom Actions
Sandboxed 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
12. Creating Custom Actions
Sandboxed Solution Imlementation
⢠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
14. Budget Approval Limits
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
15. Budget Approval Limits
Bad Approach
Load Budget For Approver Issues:
⢠3 Sites, separate config lists
⢠Separate Maintenance
⢠Out of Sync
19. Out of Office Delegation
Overview
⢠SharePoint has no built-in Out of Office
Delegation
⢠Great example of User Maintained config data
⢠Great example of leveraging User Profiles
20. Out of Office Delegation
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
21. Out of Office Delegation
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
24. Additional Examples
⢠Standard Feature Requests
â Escalations
â Task Reminders
â Out of Office Delegation
â Role Based Assignments (CFO, Ops Mgr, etc)
⢠Frequent Re-usable Processes
â Check Request
â Compliance Activity Logging
25. Additional Examples
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
26. Check Request Workflow
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
27. Check Request Workflow
Bad Approach
Issues:
⢠Same process steps
⢠AP users have tasks in x
sites
⢠Multiple places to update if
process changes
⢠Process owners may not
understand other uses
28. Check Request Workflow
Sub-Process Approach
Advantages:
⢠Std process on AP site
⢠Easy access for AP users
⢠Easy to maintain and
monitor
30. Wrap-up
Recommended Approach
⢠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
31. 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
35. SharePint
Everyone is invited to SharePint
Immediately following SharePoint Saturday Richmond
(or around 6:20 PM)
Meet at aloft Richmond West
3939 Duckling Drive
Glen Allen, VA 23060
(down the street from Dave & Busterâs)
Then we will hop to the next location
and the next within walking distance!
SharePint: a gathering of SharePoint enthusiasts for fun,
food, and drink.