Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

38
info@newsteplearning .com www.newsteplearning. com (425) 522-3727 Understanding and Extending SharePoint Designer Workflows

description

Technical Class:

Transcript of Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Page 1: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

[email protected](425) 522-3727

Understanding and ExtendingSharePoint Designer Workflows

Page 2: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

About Chris Beckett

24+10MCMMCT

MCSEMCPD

Solution ArchitectLearning Consultant

and Trainer

[email protected]

@sharepointbits

blog.sharepointbits.com

Page 3: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Agenda

TechnicalArchitecture

Workflow Features and Capabilities

Extending Workflow withCustom Activities and

Web Services

Page 4: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

SharePoint 2010 Workflow Architecture

Custom SharePointWorkflow Runtime

Host

Built upon.NET 3.51 Workflow

Foundation

Page 5: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Workflow Architecture Workflow Execution now uses Windows

Azure Workflow (WAW)

Page 6: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Workflow Interop BridgeAzure Workflow

can invoke a SharePoint 2010

Workflow

Page 7: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Activating Workflow Features

2010 workflows are not activated by

default

There are no 2013 Mode Workflows

included with SharePoint 2013

Page 8: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Agenda

TechnicalArchitecture

Workflow Features and Capabilities

Extending Workflow withCustom Activities and

Web Services

Page 9: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Platform Type

Choice of 2010or 2013 Workflow

Architecture

Page 10: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Workflow Types

• Published directly to a list or library

• No reusability

• Full access to list content types and fields

• Manual or Auto-Start

• Published to a content type

• Reusable across lists or libraries supported by content Type

• No visibility of list-specific fields like Created or Modified

• Manual or Auto-Start

• Not bound to a specific list or library

• No content item context

• Can only be started manually

List Reusable Site

Page 11: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Reusable Workflow Content Type

Reusable workflows only

boundto generic

content type

Page 12: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

StagesStage names can now be used for Workflow Status

Stages support transitioning

to other Stages

Page 13: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

App Steps

App Step requires activation

of Site Feature

App Steps can benested anywhere

inside a Stage or Step

Page 14: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Task-Related Actions

SharePoint 2010 SharePoint 2013

Page 15: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

SharePoint 2010 Task Events

Process Events Task Events

Page 16: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

SharePoint 2013 Task Dialog

Optional Sync or Asynch Behavior

CustomizeEmails

Reminder Notifications

No AssignmentStages

Types ofTask Completion

Customize TaskOutcomes

Page 17: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Association and Initiation Forms

SharePoint 2010 SharePoint 2013

Page 18: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Task Forms

SharePoint 2010 SharePoint 2013

Page 19: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Workflow Notifications

Still not great!

Page 20: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Dictionaries

Collection of Name and Value

Pairs

Dictionaries can contain other Dictionaries

Page 21: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Loops and Dictionaries

Loop ‘n’ TimesOr

Loop Until If

Dictionaries are collections of

Name/Value Pairs

Page 22: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Call HTTP Web Service Action

RESTful Web Services are

supported

HTTP Verbs support REST Operations

Page 23: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Calling a Web Service

UsesDictionary

Parameters

Page 24: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Agenda

TechnicalArchitecture

Workflow Features and Capabilities

Extending Workflow withCustom Activities and

Web Services

Page 25: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Workflow Extension Options

Full-Trust Code Activities (2010/2013)

Sandbox Code Activities (2010)

Pluggable Workflow Services (2010)

Declarative Workflow Activities (2013)

Call HTTP Web Service Action (2013)

Page 26: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Actions and Activities

• Activity is a reusable unit of workflow execution• Typically parameter driven• Declarative or Coded• Declarative recommended

for SharePoint 2013• Coded only supported On-

Premises – Requires Custom Deployment

• Wraps an activity with sentence interface• Maps activity parameters to

SharePoint designer types• Many workflow actions can

map to a single workflow activity• Located under:..\##\Template\1033\Workflow

Activity Actions

Page 27: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Activity Types

Custom Activities

SharePoint Activities(Microsoft.SharePoint.WorkflowServices.Activities)

Project Activities(Microsoft.Office.Project.Server.WorkflowActiviti

es)

Workflow Manager Activities(Microsoft.Activities)

Workflow Foundation 4.5 Activities(System.Activities)

Page 28: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Workflow Actions Element

Add parameter to indicate Sandbox

Rule Designerdefines User Experience

Parameters map to Fields and Method

Interface

Page 29: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Workflow Extensions Platform Support

On-Premises 2010

On-Premises 2013 Office 365 SharePoint

Apps

Full Trust Code Activities

Sandbox Code Activities

Pluggable Workflow Services

Declarative Activities

Call HTTP Web Service Action

Page 30: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Code Activity (2010)Subclass of

Workflow ActivityBase

Public Properties for Parameters

Override Execute Method

Page 31: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Code Activity (2013)Subclass of

Workflow ActivityBase

In and Out Arguments for

Parameters

Override Execute Method

Page 32: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Sandbox Activity (2010)

Context andadditional

Parameters

Hashtable is used for return values

Public Classand Static Methods

Page 33: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Pluggable Workflow Services

• Introduced in SharePoint 2010• Allows workflow to send and

receive asynchronous messages from external services• Full Trust Solution• Fairly Complex to Code / Test• Requires web.config

modification• Supported for 2010 Mode

Workflows on SharePoint 2013• No longer supported in

SharePoint 2013 Workflow

Page 34: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Declarative Activity (2013)

Rich Set ofNative

Activities

DynamicValuesupports

complex dataexchange

Call WebServices to

Extend

Page 35: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Recommended Extensibility Model

Web Services

Activities

Full Trust 2010Declarative 2013

Page 36: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

More InformationTechNet Workflow Resource Centerhttp://technet.microsoft.com/en-US/sharepoint/jj556245

What’s New in SharePoint 2013 Workflowhttp://msdn.microsoft.com/en-us/library/jj163177.aspx

How to work with Web Services in SharePoint Designer 2013http://msdn.microsoft.com/en-us/library/fp179912.aspx

SharePoint 2013 Workflows and the HTTP Accept Headerhttp://www.fiechter.eu/blog/Lists/Posts/Post.aspx?ID=35&mobile=0

How to: Build and Deploy Custom Workflow Actionshttp://msdn.microsoft.com/en-us/library/jj163911.aspx

Workflow Actions Schema Referencehttp://msdn.microsoft.com/en-us/library/jj583378(v=office.15).aspx

Page 37: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Connect with New Step Learning

Course Curriculums and Training Programshttp://www.newsteplearning.com

Webinar and Conference Presentationshttp://www.slideshare.net/newsteplearning

News, Events and Training Announcementshttp://www.newsteplearning.com/blog

Free Step-By-Step Demos and Tutorialshttps://www.youtube.com/user/newsteplearning

Page 38: Programming the Power Behind SharePoint Designer Workflow by Chris Beckett - SPTechCon

Questions

Thank you for attending!

Please complete your evaluations. Your feedback is appreciated

chris@newsteplearning.

com

(425) 522-3727

@sharepointbits

blog.sharepointbits.co

m