info@newsteplearning.com
                            www.newsteplearning.com
                            (425) 522-3727




Understanding and Extending
SharePoint Designer Workflows
About Chris Beckett
               Solution Architect
              Learning Consultant
                  and Trainer
                                                  @sharepointbits


  MCM
  MCT
  MCSE
  MCPD
                24+10
     blog.sharepointbits.com        chris@newsteplearning.com
Agenda



   Technical
  Architecture
                                         Extending Workflow with
                 Workflow Features and
                                          Custom Activities and
                      Capabilities
                                              Web Services
SharePoint 2010 Workflow
Architecture


                           Custom SharePoint
                           Workflow Runtime
                                 Host




                                Built upon
                           .NET 3.51 Workflow
                               Foundation
Workflow Architecture   Workflow Execution
                        now uses Windows
                         Azure Workflow
                              (WAW)
Workflow Interop Bridge
                          Azure Workflow can
                          invoke a SharePoint
                            2010 Workflow
Activating Workflow Features
                                 There are no 2013
                                 Mode Workflows
                                   included with
                                  SharePoint 2013




                               2010 workflows are not
                                activated by default
Agenda



                 Workflow Features and
                      Capabilities
                                         Extending Workflow with
   Technical
                                          Custom Activities and
  Architecture
                                              Web Services
Platform Type



                 Choice of 2010
                or 2013 Workflow
                   Architecture
Workflow Types
           List                    Reusable                        Site

• Published directly to a   • Published to a content     • Not bound to a specific
  list or library             type                         list or library
• No reusability            • Reusable across lists or   • No content item
• Full access to list         libraries supported by       context
  content types and           content Type               • Can only be started
  fields                    • No visibility of list-       manually
• Manual or Auto-Start        specific fields like
                              Created or Modified
                            • Manual or Auto-Start
Reusable Workflow Content Type


                        Reusable workflows
                           only bound
                            to generic
                           content type
Stages
         Stage names can
         now be used for
         Workflow Status



         Stages support
          transitioning
         to other Stages
App Steps


                   App Step requires
                       activation
                    of Site Feature




              App Steps can be
              nested anywhere
            inside a Stage or Step
Task-Related Actions
    SharePoint 2010    SharePoint 2013
SharePoint 2010 Task Events
    Process Events     Task Events
SharePoint 2013 Task Dialog
                        No Assignment
                            Stages

                           Optional Sync or
                           Asynch Behavior

                                   Types of
                               Task Completion

                              Customize
                               Emails


                     Reminder Notifications


                  Customize Task
                    Outcomes
Association and Initiation Forms
    SharePoint 2010     SharePoint 2013
Task Forms
    SharePoint 2010   SharePoint 2013
Workflow Notifications

                         Still not great!
Dictionaries                        Dictionaries can
                                     contain other
                                      Dictionaries




               Collection of Name
                and Value Pairs
Loops and Dictionaries    Dictionaries are
                           collections of
                         Name/Value Pairs



                          Loop ‘n’ Times
                                Or
                           Loop Until If
Call HTTP Web Service Action

                              RESTful
                           Web Services are
                             supported




                          HTTP Verbs support
                           REST Operations
Calling a Web Service


                           Uses
                        Dictionary
                        Parameters
Agenda



                                         Extending Workflow with
                                          Custom Activities and
                                              Web Services
   Technical     Workflow Features and
  Architecture        Capabilities
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)
Actions and Activities
             Activity                          Actions

• Activity is a reusable unit of   • Wraps an activity with sentence
  workflow execution                 interface
• Typically parameter driven       • Maps activity parameters to
• Declarative or Coded               SharePoint designer types
• Declarative recommended for      • Many workflow actions can map
  SharePoint 2013                    to a single workflow activity
• Coded only supported On-         • Located under:
  Premises – Requires Custom         ..##Template1033Workflow
  Deployment
Activity Types
                                               Custom Activities



                SharePoint Activities                                              Project Activities
   (Microsoft.SharePoint.WorkflowServices.Activities)              (Microsoft.Office.Project.Server.WorkflowActivities)



                                         Workflow Manager Activities
                                            (Microsoft.Activities)



                                     Workflow Foundation 4.5 Activities
                                            (System.Activities)
Workflow Actions Element
                           Add parameter to
                           indicate Sandbox


                             Rule Designer
                              defines User
                               Experience




                           Parameters map to
                           Fields and Method
                                Interface
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
Code Activity (2010)
                                 Subclass of
                               Workflow Activity
                                    Base




                       Public Properties for
                           Parameters




                       Override Execute
                           Method
Code Activity (2013)
                                            Subclass of
                                          Workflow Activity
                                               Base


                                           In and Out
                                          Arguments for
                                           Parameters




                       Override Execute
                           Method
Sandbox Activity (2010)
                             Public Class
                          and Static Methods




                                    Context and
                               additional Parameters




                          Hashtable is used for
                             return values
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
Declarative Activity (2013)
  Rich Set of                 DynamicValue
    Native                      supports
   Activities                 complex data
                                exchange



                                Call Web
                               Services to
                                 Extend
Recommended Extensibility Model

    Activities       Web Services

   Full Trust 2010
  Declarative 2013
More Information
TechNet Workflow Resource Center
http://technet.microsoft.com/en-US/sharepoint/jj556245

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

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

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

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

Workflow Actions Schema Reference
http://msdn.microsoft.com/en-us/library/jj583378(v=office.15).aspx
Connect with New Step Learning
     Course Curriculums and Training Programs
     http://www.newsteplearning.com

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

     Webinar and Conference Presentations
     http://www.slideshare.net/newsteplearning

     Free Step-By-Step Demos and Tutorials
     https://www.youtube.com/user/newsteplearning
Questions
Thank you for attending!

   chris@newsteplearning.com

   (425) 522-3727

   @sharepointbits

   blog.sharepointbits.com


Please complete your
evaluations. Your feedback is
appreciated 

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

  • 1.
    info@newsteplearning.com www.newsteplearning.com (425) 522-3727 Understanding and Extending SharePoint Designer Workflows
  • 2.
    About Chris Beckett Solution Architect Learning Consultant and Trainer @sharepointbits MCM MCT MCSE MCPD 24+10 blog.sharepointbits.com chris@newsteplearning.com
  • 3.
    Agenda Technical Architecture Extending Workflow with Workflow Features and Custom Activities and Capabilities Web Services
  • 4.
    SharePoint 2010 Workflow Architecture Custom SharePoint Workflow Runtime Host Built upon .NET 3.51 Workflow Foundation
  • 5.
    Workflow Architecture Workflow Execution now uses Windows Azure Workflow (WAW)
  • 6.
    Workflow Interop Bridge Azure Workflow can invoke a SharePoint 2010 Workflow
  • 7.
    Activating Workflow Features There are no 2013 Mode Workflows included with SharePoint 2013 2010 workflows are not activated by default
  • 8.
    Agenda Workflow Features and Capabilities Extending Workflow with Technical Custom Activities and Architecture Web Services
  • 9.
    Platform Type Choice of 2010 or 2013 Workflow Architecture
  • 10.
    Workflow Types List Reusable Site • Published directly to a • Published to a content • Not bound to a specific list or library type list or library • No reusability • Reusable across lists or • No content item • Full access to list libraries supported by context content types and content Type • Can only be started fields • No visibility of list- manually • Manual or Auto-Start specific fields like Created or Modified • Manual or Auto-Start
  • 11.
    Reusable Workflow ContentType Reusable workflows only bound to generic content type
  • 12.
    Stages Stage names can now be used for Workflow Status Stages support transitioning to other Stages
  • 13.
    App Steps App Step requires activation of Site Feature App Steps can be nested anywhere inside a Stage or Step
  • 14.
    Task-Related Actions SharePoint 2010 SharePoint 2013
  • 15.
    SharePoint 2010 TaskEvents Process Events Task Events
  • 16.
    SharePoint 2013 TaskDialog No Assignment Stages Optional Sync or Asynch Behavior Types of Task Completion Customize Emails Reminder Notifications Customize Task Outcomes
  • 17.
    Association and InitiationForms SharePoint 2010 SharePoint 2013
  • 18.
    Task Forms SharePoint 2010 SharePoint 2013
  • 19.
    Workflow Notifications Still not great!
  • 20.
    Dictionaries Dictionaries can contain other Dictionaries Collection of Name and Value Pairs
  • 21.
    Loops and Dictionaries Dictionaries are collections of Name/Value Pairs Loop ‘n’ Times Or Loop Until If
  • 22.
    Call HTTP WebService Action RESTful Web Services are supported HTTP Verbs support REST Operations
  • 23.
    Calling a WebService Uses Dictionary Parameters
  • 24.
    Agenda Extending Workflow with Custom Activities and Web Services Technical Workflow Features and Architecture Capabilities
  • 25.
    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)
  • 26.
    Actions and Activities Activity Actions • Activity is a reusable unit of • Wraps an activity with sentence workflow execution interface • Typically parameter driven • Maps activity parameters to • Declarative or Coded SharePoint designer types • Declarative recommended for • Many workflow actions can map SharePoint 2013 to a single workflow activity • Coded only supported On- • Located under: Premises – Requires Custom ..##Template1033Workflow Deployment
  • 27.
    Activity Types Custom Activities SharePoint Activities Project Activities (Microsoft.SharePoint.WorkflowServices.Activities) (Microsoft.Office.Project.Server.WorkflowActivities) Workflow Manager Activities (Microsoft.Activities) Workflow Foundation 4.5 Activities (System.Activities)
  • 28.
    Workflow Actions Element Add parameter to indicate Sandbox Rule Designer defines User Experience Parameters map to Fields and Method Interface
  • 29.
    Workflow Extensions PlatformSupport 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
  • 30.
    Code Activity (2010) Subclass of Workflow Activity Base Public Properties for Parameters Override Execute Method
  • 31.
    Code Activity (2013) Subclass of Workflow Activity Base In and Out Arguments for Parameters Override Execute Method
  • 32.
    Sandbox Activity (2010) Public Class and Static Methods Context and additional Parameters Hashtable is used for return values
  • 33.
    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
  • 34.
    Declarative Activity (2013) Rich Set of DynamicValue Native supports Activities complex data exchange Call Web Services to Extend
  • 35.
    Recommended Extensibility Model Activities Web Services Full Trust 2010 Declarative 2013
  • 36.
    More Information TechNet WorkflowResource Center http://technet.microsoft.com/en-US/sharepoint/jj556245 What’s New in SharePoint 2013 Workflow http://msdn.microsoft.com/en-us/library/jj163177.aspx How to work with Web Services in SharePoint Designer 2013 http://msdn.microsoft.com/en-us/library/fp179912.aspx SharePoint 2013 Workflows and the HTTP Accept Header http://www.fiechter.eu/blog/Lists/Posts/Post.aspx?ID=35&mobile=0 How to: Build and Deploy Custom Workflow Actions http://msdn.microsoft.com/en-us/library/jj163911.aspx Workflow Actions Schema Reference http://msdn.microsoft.com/en-us/library/jj583378(v=office.15).aspx
  • 37.
    Connect with NewStep Learning Course Curriculums and Training Programs http://www.newsteplearning.com News, Events and Training Announcements http://www.newsteplearning.com/blog Webinar and Conference Presentations http://www.slideshare.net/newsteplearning Free Step-By-Step Demos and Tutorials https://www.youtube.com/user/newsteplearning
  • 38.
    Questions Thank you forattending! chris@newsteplearning.com (425) 522-3727 @sharepointbits blog.sharepointbits.com Please complete your evaluations. Your feedback is appreciated 