08448380779 Call Girls In Civil Lines Women Seeking Men
Drew madelung sp designer workflows - sp-biz
1. Online Conference
June 17th and 18th 2015
WWW.SPBIZCONF.COM
SharePoint Designer Workflows
Nuts, Bolts and Examples
2. WWW.SPBIZCONF.COM
Drew Madelung
Concurrency, Inc.
Email : dmadelung@concurrency.com
Twitter : @dmadelung
LinkedIn : /in/dmadelung
SharePoint and Office 365 consultant
specializing in business-oriented content
management solutions.
Avid Wisconsin sports fan and golfer.
3. WWW.SPBIZCONF.COM
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!
4. WWW.SPBIZCONF.COM
Evolution of SharePoint Designer
• SP Designer 2007
– Will work with 2003 & 2007
• SP Designer 2010
– Only 2010
• SP Designer 2013
– Only 2013 and SP Online (Office 365)
• SP Designer 2016?
– Not being created -> announced at Microsoft Ignite
It’s a free
download!
5. WWW.SPBIZCONF.COM
Upgrading from 2010 Workflows
• There is no in-place workflow upgrade
• 2010 workflows will run in 2013 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)
Options
6. WWW.SPBIZCONF.COM
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
7. WWW.SPBIZCONF.COM
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
8. WWW.SPBIZCONF.COM
Workflow in SharePoint 2013
• Brings the workflow
engine off SharePoint
• Allows execution of
SharePoint 2010
workflows
• Powered by Windows
Workflow Foundation 4
10. WWW.SPBIZCONF.COM
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.
11. WWW.SPBIZCONF.COM
Office 365 – SharePoint Online
• Runs 2010 and 2013 workflows
• You connect just line on-premises farms
12. WWW.SPBIZCONF.COM
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 Online!
13. WWW.SPBIZCONF.COM
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
17. WWW.SPBIZCONF.COM
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 and SharePoint Online
18. WWW.SPBIZCONF.COM
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
19. WWW.SPBIZCONF.COM
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
20. WWW.SPBIZCONF.COM
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
21. WWW.SPBIZCONF.COM
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
22. WWW.SPBIZCONF.COM
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)
23. WWW.SPBIZCONF.COM
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. WWW.SPBIZCONF.COM
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
26. WWW.SPBIZCONF.COM
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
27. WWW.SPBIZCONF.COM
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!
28. WWW.SPBIZCONF.COM
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.
SharePoint 2013 workflows are powered by Windows Workflow Foundation 4, which was substantially redesigned from earlier versions. Windows Workflow Foundation (WF), in turn, is built on the messaging functionality that is provided by Windows Communication Foundation (WCF).
Conceptually, workflows model structured business processes. Therefore, Windows Workflow Foundation 4 workflows are a structured collection of workflow "activities," each of which represents a functional component of a business process.
The workflow platform in SharePoint 2013 uses the Windows Workflow Foundation 4 activity model to represent a SharePoint-based business process. Additionally, SharePoint 2013 introduces a higher-level stage-gate model on which to create workflows.
It is important to note the relationship between workflow activities and SharePoint actions. Workflow activities represent the underlying managed objects whose methods drive workflow behaviors. Workflow actions, on the other hand, are wrappers that encapsulate the underlying activities and present them in a user-friendly form in SharePoint Designer. Workflow authors interact with the workflow actions, whereas the workflow execution engine acts on the corresponding activities.
The activities, which are implementations of activity classes, are implemented declaratively by using XAML.
Workflow activities are invoked using loosely coupled web services that use messaging APIs to communicate with SharePoint. These APIs are built on the messaging functionality that is provided byWindows Communication Foundation (WCF).
The messaging framework is very flexible and supports virtually any messaging pattern that you need. Note that on a SharePoint 2013 farm, Windows Workflow Foundation and WCF are hosted in Workflow Manager Client 1.0.
Workflow Manager Client 1.0, SharePoint 2013, and SharePoint Designer 2013 each provide significant parts of the new infrastructure:
Workflow Manager Client 1.0 provides the management of workflow definitions. It also hosts the execution processes for workflow instances.
SharePoint 2013 provides the framework for SharePoint workflows, which model SharePoint-based business processes that involve SharePoint documents, lists, users, and tasks. Additionally, SharePoint workflows, associations, activities, and other workflow metadata are stored and managed in SharePoint 2013.
SharePoint Designer 2013 is the primary business-user tool for creating workflow definitions and publishing them, as it was in previous versions. It can also be used to package a workflow definition with or without associated SharePoint components.
Because the most significant change to SharePoint 2013 workflows is the moving of workflow processing onto external workflow hosts like Microsoft Azure, it was essential for SharePoint messages and events to connect to the workflow infrastructure in Microsoft Azure. In addition, it was necessary for Microsoft Azure to connect the infrastructure to customer data. Workflow associations (which are built on the WF concept of subscriptions) are the SharePoint infrastructure pieces that support these requirements.
SharePoint workflow interop enables SharePoint 2010 workflows (which are built on Windows Workflow Foundation 3) to be called from SharePoint 2013 workflows, which are based on Windows Workflow Foundation 4. This allows you to execute 2010 workflows from within 2013 workflows.
This is important because you may have SharePoint 2010 that you may use to reuse in conjunction with your SharePoint 2013 workflows. Additionally, you may wish to use activities or features from SharePoint 2010, which are not yet implemented in SharePoint 2013
The procedure must be completed by a user that has Site Owner permissions.
The workflow must already be published to the SharePoint Server 2013 site.
The procedure must be completed by a user that has Site Owner permissions.
The workflow must already be published to the SharePoint Server 2013 site.
List of REST commands in helpful links
ead a resource
GET
Create or update a resource
POST
Use POST to create entities such as lists and sites. The SharePoint 2013 REST service supports sending POST commands that include object definitions to endpoints that represent collections.
For POST operations, any properties that are not required are set to their default values. If you attempt to set a read-only property as part of a POSToperation, the service returns an exception.
Update or insert a resource
PUT
Use PUT and MERGE operations to update existing SharePoint objects.
Any service endpoint that represents an object property set operation supports both PUT requests and MERGE requests.
For MERGE requests, setting properties is optional; any properties that you do not explicitly set retain their current property.
For PUT requests, if you do not specify all required properties in object updates, the REST service returns an exception. In addition, any optional properties you do not explicitly set are set to their default properties.
Delete a resource
DELETE
Use the HTTP DELETE command against the specific endpoint URL to delete the SharePoint object represented by that endpoint.
In the case of recyclable objects, such as lists, files, and list items, this results in a Recycle operation.
List of REST commands in helpful links
ead a resource
GET
Create or update a resource
POST
Use POST to create entities such as lists and sites. The SharePoint 2013 REST service supports sending POST commands that include object definitions to endpoints that represent collections.
For POST operations, any properties that are not required are set to their default values. If you attempt to set a read-only property as part of a POSToperation, the service returns an exception.
Update or insert a resource
PUT
Use PUT and MERGE operations to update existing SharePoint objects.
Any service endpoint that represents an object property set operation supports both PUT requests and MERGE requests.
For MERGE requests, setting properties is optional; any properties that you do not explicitly set retain their current property.
For PUT requests, if you do not specify all required properties in object updates, the REST service returns an exception. In addition, any optional properties you do not explicitly set are set to their default properties.
Delete a resource
DELETE
Use the HTTP DELETE command against the specific endpoint URL to delete the SharePoint object represented by that endpoint.
In the case of recyclable objects, such as lists, files, and list items, this results in a Recycle operation.
List of REST commands in helpful links
ead a resource
GET
Create or update a resource
POST
Use POST to create entities such as lists and sites. The SharePoint 2013 REST service supports sending POST commands that include object definitions to endpoints that represent collections.
For POST operations, any properties that are not required are set to their default values. If you attempt to set a read-only property as part of a POSToperation, the service returns an exception.
Update or insert a resource
PUT
Use PUT and MERGE operations to update existing SharePoint objects.
Any service endpoint that represents an object property set operation supports both PUT requests and MERGE requests.
For MERGE requests, setting properties is optional; any properties that you do not explicitly set retain their current property.
For PUT requests, if you do not specify all required properties in object updates, the REST service returns an exception. In addition, any optional properties you do not explicitly set are set to their default properties.
Delete a resource
DELETE
Use the HTTP DELETE command against the specific endpoint URL to delete the SharePoint object represented by that endpoint.
In the case of recyclable objects, such as lists, files, and list items, this results in a Recycle operation.