SharePoint Designer
Workflows
Nuts, Bolts and Examples
SharePoint Saturday
St. Louis 2017
You can use the hashtag #SPSSTL & follow us @SPSStlouis
Gold Sponsors
Silver Sponsors
Thank You Sponsors for
participating in SPS St. Louis 2017!
Drew Madelung
Email : dmadelung@concurrency.com
Twitter : @dmadelung
Website : drewmadelung.com
Technical Architect – SharePoint & Office 365
What are we going to talk about?
A look back through the years
How do I start?
Not your basic workflow info
Let’s see some examples!
Evolution of SharePoint Designer
 SP Designer 2007
• Will work with 2003 & 2007
 SP Designer 2010
• Only 2010
 SP Designer 2013
• 2013, 2016 and SP Online (Office 365)
 SP Designer 2016?
• Not being created
It’s a free
download!
Upgrading from 2010 Workflows
 There is no in-place workflow upgrade
 2010 workflows will run in SP 2013/2016 on-premises and Office 365
1. Migrate 2010 workflows and continue to use them in 2010 mode
2. Rebuild workflows using new 2013 actions
3. Rebuild workflows using ISV (Nintex, K2)
4. Rebuild using Flow or Logic Apps
Options
Deprecated features – 2010 to 2013
 Design View
 Content type association with reusable workflows
 Association columns
 Impersonation steps
 User Profile lookup as a data source
 Workflow visualization
 Multiple workflow actions
New features – 2010 to 2013
 Ability to define stages and jump between them
 Stage level loops
 Dictionary variable
 App steps
 Ability to call SP 2010 workflows
 Task processes
 Multiple workflow actions
Workflow in SharePoint 2013+
 Brings the workflow
engine off SharePoint
 Allows execution of
SharePoint 2010
workflows
 Powered by Windows
Workflow Foundation 4
Workflow actions
 Different workflow actions are available depending on…
• Version of workflow
• Type of workflow
• Location of action in a workflow
Workflow actions – 2010 to 2013
New in 2013
 Assign a Task
 Start a Task Process
 Go to This Stage
 Call HTTP Web Service
 Start a List Workflow
 Start a Site Workflow
 Build Dictionary
 Get Property from Dictionary
 Count Items in Dictionary
 Trim String
 Find Substring in String
 Translate Document
 Set Workflow Status
 Create a Project from Current Item (MS Project)
 Set the current Project stage status to this value (MS Project)
 Wait for Project Event (MS Project)
 Set this field in the Project to this value (MS Project)
Deprecated in 2013
• Add List Item Permissions
• Assign a Form to a Group
• Assign a To-do Item
• Capture a version of the Document Set
• Collect Data from a User
• Copy List Item
• Declare Record
• Inherit List Item Parent Permissions
• Lookup Manager of a User
• Remove List Item Permissions
• Replace List Item Permissions
• Send Document Set to Repository
• Set Content Approval Status
• Set Content Approval Status for the Document Set
• Set Workflow Status
• Start Approval Process
• Start Custom Task Process
• Start Document Set Approval Process
• Start Feedback Process
• Undeclare Record
Call HTTP Web Service
• lets you specify any of several request methods,
including GET, PUT, POST, and DELETE. This lets you
tell the web services, specifically RESTful services, what
to do on the service that you’ve specified with the URI
property on the activity.
Start a List Workflow
• Starts a List workflow based on the SharePoint 2010
Workflow platform.
Start a Task Process
• Creates tasks on multiple users and enables the tasks
to be taken through a customized process.
Office 365 – SharePoint Online
 Runs 2010 and 2013 workflows
 You connect just like on-premises farms
 Default and deeper integration with Flow
SharePoint Designer 2013 Workflows
 Built at Site level (not site collection)
 List/Library, Reusable, or Site Workflows
 Can be created using Visio
 Can be saved as a template
 Ran on a timer job
These are all true for
SharePoint 2016 &
Online!
Creating a SharePoint 2013 Workflow
Open Designer and
connect to your site
• Click one of the New workflow
options in the ribbon
• Click Workflows in the Site Objects
navigation to view all current
workflows
Creating a SharePoint 2013 Workflow
• Enter a Name and Description
• Pick the 2013 platform type for your
new workflow
Creating a SharePoint 2013 Workflow
Add new conditions
Add new actions Add new loops
Create variables
Add new steps
Add new stages
What cool things can I do?
Custom Actions
Workflow Stages
App Steps
Utilize REST Services
Custom Actions
 5 different actions available
• Dictate where they appear
• List Item Menu
• Display Form Ribbon
• Edit Form Ribbon
• New Form Ribbon
• View Ribbon
 Configured on library or a list
 Available in SharePoint 2010,
2013, 2016 and SharePoint Online
Custom Actions - Continued
 Actions can do 1 of 3 things
1. Navigate to form
2. Initiate a workflow
3. Navigate to URL
 You can add images to the actions
 You can set the Rights Mask
• Security
 When to use them?
 Adding a link for a print function
 Link to supporting list that contains
related data
 Start an approval or review workflow
 Link to a custom edit form that shows
more fields for the item
 Link to an upload or insert item on a
related list
 Start a workflow to create an item
Workflow Stages
 Eases ability to build more advanced
logical workflows
 Uses IF/Else statements to transition
between stages
2010 -> Just steps
2013 -> Steps in Stages
App Steps
• No more impersonation step from 2010
 3 steps to configure
1. Allow workflow to use app permissions
• Done via activation of Site Feature “Workflows can use app permissions”
2. Grant full control permission to workflow
• Multiple step process to set trust for the Workflow app
• Detailed steps here
3. Develop the workflow to wrap actions inside an App Step
• App step will now be available in SP Designer ribbon
• Allows the ability to run a workflow that
requires elevated permissions
REST Service
• REST allows ability to remotely interact with SharePoint objects
• To access a specific site collection, use the following construction:
• http://server/site/_api/site
• To access a specific site, use the following construction:
• http://server/site/_api/web
REST Service - Continued
• Call HTTP Web Service & Dictionary actions
1. Build Dictionary(s)
2. Call REST service
• GET, POST, PUT, DELETE
3. Get Items in Dictionary (If necessary)
REST Service - Continued
• Can be used to…
• Manage content across site collections
• Create content (items, lists, sites, etc…)
• Retrieve content to be looped through
• Retrieve user profile information
• And lots more!
• Use Postman or Advanced REST client Chrome extension
Any other tips?
Advanced Properties
SharePoint Designer Cache
Copy & Paste
Debugging
Advanced Properties
 Certain settings are only visible in action Properties
 Right click on action -> click Properties…
 Important in Task Process actions
 Can set BCC for Send Email actions
Clearing SharePoint Designer Cache
1. Close SPD
2. Use File Explorer to navigate to:
• %USERPROFILE%AppDataLocalMicrosoftWebsiteCache
3. Delete everything in this folder
4. Use File Explorer to navigate to:
• %APPDATA%MicrosoftWeb Server ExtensionsCache
5. Delete everything in this folder
Copy & Paste
 You can copy & paste within the text-based designer in 2013
• Use Ctrl+C and Ctrl+V or use Right-click functionality
 Actions can copy but conditions and steps don’t always work
 Copying between workflows can cause crashes
 No support for Undo
 Cannot copy content between workflow versions
Make sure you check all variables/lookups after copying!
Debugging
 Log to history list
• Review workflow history list - /Lists/Workflow%20History/AllItems.aspx
• Send an email action for Dictionary variables due to large size
 Add a comment
 If/Else checks on major milestones & error handling
 Hidden column to track data points
 Fiddler (On-Premises)
Debugging isn’t just for when the workflow application is
created, but includes all issues that arise at a later time.
This all sounds cool, but what should I build?
Let’s look at
some examples
Good starting workflow ideas
More complex workflow ideas
• Vacation approval
• Equipment Reservation
• IT request task creation
• New project site creation
• New employee onboarding
• Finance invoice approval
Do you like demos?
I like demos
Let’s do a demo
Super Helpful links
 SharePoint Community
 SharePoint Designer 2013 Download
 What’s changed in SharePoint Designer 2013
 Workflow actions quick reference – SharePoint 2013
 Workflow actions quick reference – SharePoint 2010
 Get started with workflows in SharePoint 2013
 Create a workflow with elevated permissions (app step setup)
 Get to know the SharePoint REST service
 Advanced REST Client Chrome Extension
 Calling the SharePoint 2013 REST API from a SharePoint Designer Workflow
 SharePoint 2013 workflow recursion prevention
 Install and configure workflow for SharePoint 2013
 Workflow Manager Farms for SharePoint 2013 – harbar.net
 SharePoint Designer Custom Actions
Questions?
Email: dmadelung@concurrency.com
Twitter: @dmadelung
Website: drewmadelung.com
Slides: http://bit.ly/DrewSlides
SharePoint
Designer Workflows
Nuts, Bolts and Examples
SharePoint Saturday
St. Louis 2017

SharePoint Designer Workflows - Nuts, Bolts and Examples

  • 1.
    SharePoint Designer Workflows Nuts, Boltsand Examples SharePoint Saturday St. Louis 2017
  • 2.
    You can usethe hashtag #SPSSTL & follow us @SPSStlouis Gold Sponsors Silver Sponsors Thank You Sponsors for participating in SPS St. Louis 2017!
  • 3.
    Drew Madelung Email :dmadelung@concurrency.com Twitter : @dmadelung Website : drewmadelung.com Technical Architect – SharePoint & Office 365
  • 4.
    What are wegoing to talk about? A look back through the years How do I start? Not your basic workflow info Let’s see some examples!
  • 5.
    Evolution of SharePointDesigner  SP Designer 2007 • Will work with 2003 & 2007  SP Designer 2010 • Only 2010  SP Designer 2013 • 2013, 2016 and SP Online (Office 365)  SP Designer 2016? • Not being created It’s a free download!
  • 6.
    Upgrading from 2010Workflows  There is no in-place workflow upgrade  2010 workflows will run in SP 2013/2016 on-premises and Office 365 1. Migrate 2010 workflows and continue to use them in 2010 mode 2. Rebuild workflows using new 2013 actions 3. Rebuild workflows using ISV (Nintex, K2) 4. Rebuild using Flow or Logic Apps Options
  • 7.
    Deprecated features –2010 to 2013  Design View  Content type association with reusable workflows  Association columns  Impersonation steps  User Profile lookup as a data source  Workflow visualization  Multiple workflow actions
  • 8.
    New features –2010 to 2013  Ability to define stages and jump between them  Stage level loops  Dictionary variable  App steps  Ability to call SP 2010 workflows  Task processes  Multiple workflow actions
  • 9.
    Workflow in SharePoint2013+  Brings the workflow engine off SharePoint  Allows execution of SharePoint 2010 workflows  Powered by Windows Workflow Foundation 4
  • 10.
    Workflow actions  Differentworkflow actions are available depending on… • Version of workflow • Type of workflow • Location of action in a workflow
  • 11.
    Workflow actions –2010 to 2013 New in 2013  Assign a Task  Start a Task Process  Go to This Stage  Call HTTP Web Service  Start a List Workflow  Start a Site Workflow  Build Dictionary  Get Property from Dictionary  Count Items in Dictionary  Trim String  Find Substring in String  Translate Document  Set Workflow Status  Create a Project from Current Item (MS Project)  Set the current Project stage status to this value (MS Project)  Wait for Project Event (MS Project)  Set this field in the Project to this value (MS Project) Deprecated in 2013 • Add List Item Permissions • Assign a Form to a Group • Assign a To-do Item • Capture a version of the Document Set • Collect Data from a User • Copy List Item • Declare Record • Inherit List Item Parent Permissions • Lookup Manager of a User • Remove List Item Permissions • Replace List Item Permissions • Send Document Set to Repository • Set Content Approval Status • Set Content Approval Status for the Document Set • Set Workflow Status • Start Approval Process • Start Custom Task Process • Start Document Set Approval Process • Start Feedback Process • Undeclare Record Call HTTP Web Service • lets you specify any of several request methods, including GET, PUT, POST, and DELETE. This lets you tell the web services, specifically RESTful services, what to do on the service that you’ve specified with the URI property on the activity. Start a List Workflow • Starts a List workflow based on the SharePoint 2010 Workflow platform. Start a Task Process • Creates tasks on multiple users and enables the tasks to be taken through a customized process.
  • 12.
    Office 365 –SharePoint Online  Runs 2010 and 2013 workflows  You connect just like on-premises farms  Default and deeper integration with Flow
  • 13.
    SharePoint Designer 2013Workflows  Built at Site level (not site collection)  List/Library, Reusable, or Site Workflows  Can be created using Visio  Can be saved as a template  Ran on a timer job These are all true for SharePoint 2016 & Online!
  • 14.
    Creating a SharePoint2013 Workflow Open Designer and connect to your site • Click one of the New workflow options in the ribbon • Click Workflows in the Site Objects navigation to view all current workflows
  • 15.
    Creating a SharePoint2013 Workflow • Enter a Name and Description • Pick the 2013 platform type for your new workflow
  • 16.
    Creating a SharePoint2013 Workflow Add new conditions Add new actions Add new loops Create variables Add new steps Add new stages
  • 17.
    What cool thingscan I do? Custom Actions Workflow Stages App Steps Utilize REST Services
  • 18.
    Custom Actions  5different actions available • Dictate where they appear • List Item Menu • Display Form Ribbon • Edit Form Ribbon • New Form Ribbon • View Ribbon  Configured on library or a list  Available in SharePoint 2010, 2013, 2016 and SharePoint Online
  • 19.
    Custom Actions -Continued  Actions can do 1 of 3 things 1. Navigate to form 2. Initiate a workflow 3. Navigate to URL  You can add images to the actions  You can set the Rights Mask • Security  When to use them?  Adding a link for a print function  Link to supporting list that contains related data  Start an approval or review workflow  Link to a custom edit form that shows more fields for the item  Link to an upload or insert item on a related list  Start a workflow to create an item
  • 20.
    Workflow Stages  Easesability to build more advanced logical workflows  Uses IF/Else statements to transition between stages 2010 -> Just steps 2013 -> Steps in Stages
  • 21.
    App Steps • Nomore impersonation step from 2010  3 steps to configure 1. Allow workflow to use app permissions • Done via activation of Site Feature “Workflows can use app permissions” 2. Grant full control permission to workflow • Multiple step process to set trust for the Workflow app • Detailed steps here 3. Develop the workflow to wrap actions inside an App Step • App step will now be available in SP Designer ribbon • Allows the ability to run a workflow that requires elevated permissions
  • 22.
    REST Service • RESTallows ability to remotely interact with SharePoint objects • To access a specific site collection, use the following construction: • http://server/site/_api/site • To access a specific site, use the following construction: • http://server/site/_api/web
  • 23.
    REST Service -Continued • Call HTTP Web Service & Dictionary actions 1. Build Dictionary(s) 2. Call REST service • GET, POST, PUT, DELETE 3. Get Items in Dictionary (If necessary)
  • 24.
    REST Service -Continued • Can be used to… • Manage content across site collections • Create content (items, lists, sites, etc…) • Retrieve content to be looped through • Retrieve user profile information • And lots more! • Use Postman or Advanced REST client Chrome extension
  • 25.
    Any other tips? AdvancedProperties SharePoint Designer Cache Copy & Paste Debugging
  • 26.
    Advanced Properties  Certainsettings are only visible in action Properties  Right click on action -> click Properties…  Important in Task Process actions  Can set BCC for Send Email actions
  • 27.
    Clearing SharePoint DesignerCache 1. Close SPD 2. Use File Explorer to navigate to: • %USERPROFILE%AppDataLocalMicrosoftWebsiteCache 3. Delete everything in this folder 4. Use File Explorer to navigate to: • %APPDATA%MicrosoftWeb Server ExtensionsCache 5. Delete everything in this folder
  • 28.
    Copy & Paste You can copy & paste within the text-based designer in 2013 • Use Ctrl+C and Ctrl+V or use Right-click functionality  Actions can copy but conditions and steps don’t always work  Copying between workflows can cause crashes  No support for Undo  Cannot copy content between workflow versions Make sure you check all variables/lookups after copying!
  • 29.
    Debugging  Log tohistory list • Review workflow history list - /Lists/Workflow%20History/AllItems.aspx • Send an email action for Dictionary variables due to large size  Add a comment  If/Else checks on major milestones & error handling  Hidden column to track data points  Fiddler (On-Premises) Debugging isn’t just for when the workflow application is created, but includes all issues that arise at a later time.
  • 30.
    This all soundscool, but what should I build? Let’s look at some examples
  • 31.
    Good starting workflowideas More complex workflow ideas • Vacation approval • Equipment Reservation • IT request task creation • New project site creation • New employee onboarding • Finance invoice approval
  • 32.
    Do you likedemos? I like demos Let’s do a demo
  • 33.
    Super Helpful links SharePoint Community  SharePoint Designer 2013 Download  What’s changed in SharePoint Designer 2013  Workflow actions quick reference – SharePoint 2013  Workflow actions quick reference – SharePoint 2010  Get started with workflows in SharePoint 2013  Create a workflow with elevated permissions (app step setup)  Get to know the SharePoint REST service  Advanced REST Client Chrome Extension  Calling the SharePoint 2013 REST API from a SharePoint Designer Workflow  SharePoint 2013 workflow recursion prevention  Install and configure workflow for SharePoint 2013  Workflow Manager Farms for SharePoint 2013 – harbar.net  SharePoint Designer Custom Actions
  • 34.
    Questions? Email: dmadelung@concurrency.com Twitter: @dmadelung Website:drewmadelung.com Slides: http://bit.ly/DrewSlides
  • 35.
    SharePoint Designer Workflows Nuts, Boltsand Examples SharePoint Saturday St. Louis 2017