Developing Reusable Workflow Features      SharePoint Saturday Virginia Beach                Mike Oryszak            http:...
About Me •   Practice Manager with Intellinet •   Microsoft SharePoint Server MVP •   Dev and Architect with MS stack sinc...
Session Overview •   Approach and Goals •   Overview on Creating Custom Actions •   Example 1 – Budget Approval Limits •  ...
Support our Sponsors
Developing Reusable Workflow FeaturesAPPROACH AND GOALS
Approach and GoalsCommon Workflow Limitations • Common Workflow Limitations     – Workflows developed one at a time     – ...
Approach and GoalsWorkflow Reuse Goals • Reuse Goals     –   Centralize common configuration data     –   Leverage central...
Approach and GoalsRecommended Approaches • Approaches     – Take a “Portfolio Approach” to process design     – Change dat...
Developing Reusable Workflow FeaturesCREATING CUSTOM ACTIONS
Creating Custom ActionsFull Trust Actions  • Approaches      – Leverage central services like User Profiles, BCS          ...
Creating Custom ActionsFarm Solution Implementation • Important Namespaces     – System.Workflow.ComponentModel     – Micr...
Creating Custom ActionsSandboxed Actions •   Developed in Visual Studio •   Limited to Site Collection boundaries •   Does...
Creating Custom ActionsSandboxed Solution Imlementation • Important Namespaces     – Microsoft.SharePoint.Workflow     – M...
Developing Reusable Workflow FeaturesBUDGET APPROVAL LIMITS
Budget Approval LimitsOverview • A common example of data needed to support an   approval workflow • Centralize the data s...
Budget Approval LimitsBad Approach               Load Budget For Approver Issues:                                         ...
Budget Approval LimitsAlternative Approach                         Advantages:                         •   Central Source ...
Budget Approval Limits                 Demo
Developing Reusable Workflow FeaturesOUT OF OFFICE DELEGATION
Out of Office DelegationOverview • SharePoint has no built-in Out of Office   Delegation • Great example of User Maintaine...
Out of Office DelegationBad Approach • Building it into each process, with localized data   stored in a list on the workfl...
Out of Office DelegationAlternative Approach • Out of Office Delegation Feature      – User Profile Custom Attributes     ...
Out of Office Delegation                  Demo
Developing Reusable Workflow FeaturesADDITIONAL EXAMPLES
Additional Examples • Standard Feature Requests   –   Escalations   –   Task Reminders   –   Out of Office Delegation   – ...
Additional ExamplesInitiating Another Workflow  • Create Reusable Sub-Processes  • Use Standard Events      – New Item    ...
Check Request WorkflowOverview • Check Request is an example of a process that   may be initiated from multiple processes ...
Check Request WorkflowBad Approach                         Issues:                         •   Same process steps         ...
Check Request WorkflowSub-Process Approach                         Advantages:                         •   Std process on ...
Developing Reusable Workflow FeaturesWRAP-UP
Wrap-upRecommended Approach • Recommended Approaches     –   Take a “Portfolio Approach” to process design     –   Change ...
Questions?
Additional Resources • MSDN – Create a Sandbox Workflow Action    –   http://msdn.microsoft.com/en-us/library/ff798499.asp...
Upcoming SlideShare
Loading in …5
×

Developing Reusable Workflow Features (SPSVB)

1,612 views
1,546 views

Published on

Developing Reusable Workflow Features

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

No Downloads
Views
Total views
1,612
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
21
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Developing Reusable Workflow Features (SPSVB)

  1. 1. Developing Reusable Workflow Features SharePoint Saturday Virginia Beach Mike Oryszak http://www.mikeoryszak.com January 7, 2012
  2. 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 • Contact Info – Blog - http://www.mikeoryszak.com – Twitter - @Next_Connect – Email – nextconnect@live.com – LinkedIn - http://www.linkedin.com/in/michaeloryszak
  3. 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
  4. 4. Support our Sponsors
  5. 5. Developing Reusable Workflow FeaturesAPPROACH AND GOALS
  6. 6. Approach and GoalsCommon 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
  7. 7. Approach and GoalsWorkflow 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
  8. 8. Approach and GoalsRecommended 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. 9. Developing Reusable Workflow FeaturesCREATING CUSTOM ACTIONS
  10. 10. Creating Custom ActionsFull 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
  11. 11. Creating Custom ActionsFarm 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
  12. 12. Creating Custom ActionsSandboxed 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
  13. 13. Creating Custom ActionsSandboxed 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. 14. Developing Reusable Workflow FeaturesBUDGET APPROVAL LIMITS
  15. 15. Budget Approval LimitsOverview • 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
  16. 16. Budget Approval LimitsBad Approach Load Budget For Approver Issues: • 3 Sites, separate config lists • Separate Maintenance • Out of Sync
  17. 17. Budget Approval LimitsAlternative Approach Advantages: • Central Source • Can Sync (BCS) • Distributed Management
  18. 18. Budget Approval Limits Demo
  19. 19. Developing Reusable Workflow FeaturesOUT OF OFFICE DELEGATION
  20. 20. Out of Office DelegationOverview • SharePoint has no built-in Out of Office Delegation • Great example of User Maintained config data • Great example of leveraging User Profiles
  21. 21. Out of Office DelegationBad 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
  22. 22. Out of Office DelegationAlternative 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
  23. 23. Out of Office Delegation Demo
  24. 24. Developing Reusable Workflow FeaturesADDITIONAL EXAMPLES
  25. 25. 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
  26. 26. Additional ExamplesInitiating 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
  27. 27. Check Request WorkflowOverview • 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
  28. 28. Check Request WorkflowBad 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
  29. 29. Check Request WorkflowSub-Process Approach Advantages: • Std process on AP site • Easy access for AP users • Easy to maintain and monitor
  30. 30. Developing Reusable Workflow FeaturesWRAP-UP
  31. 31. Wrap-upRecommended 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
  32. 32. Questions?
  33. 33. 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

×