• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
SharePoint Saturday Workflow in Action
 

SharePoint Saturday Workflow in Action

on

  • 4,645 views

The story for workflow in SharePoint 2010 has changed significantly. This sessions details the new capabilities that allow for business users designing workflows in Visio, through to SharePoint ...

The story for workflow in SharePoint 2010 has changed significantly. This sessions details the new capabilities that allow for business users designing workflows in Visio, through to SharePoint designer improvements and finishing in visual studio.

Statistics

Views

Total Views
4,645
Views on SlideShare
4,644
Embed Views
1

Actions

Likes
3
Downloads
306
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • This slide introduces all the new things you can do with workflow on SharePoint 2010. This deck first covers what is new for end-users, next are the new features of SharePoint Designer and finally the new capabilities of Visual Studio 2010 will be discussed. New targets – Site workflowsVisio visualization – show the workflow status using Visio services – Visio services supports client site APIs to further customize the experienceImproved nested logic – In the SPD we have now extremely flexible workflow customization engine – note. SPD is sequential workflow engineNew Task Process designer – Improved tools in SPDCustomizable OOB workflows – you can customize the approval workflows etc. by adding new steps etc.Visual Studio 2010 SharePoint tools – Better support for the developers in the VS2010Workflow Events – Events, which are raised as part of the workflow processPluggable External Data Exchange Services – External execution dependent tasks – Workflow is hydrated, until the response from external system is received
  • There have been many improvements in the field of workflow. Of course Site workflows are now supported, but the real excitement lies in the field of tooling, and the support for external data.
  • Creating ASP.NET workflow forms is a complex undertaking. There are many intricate steps you need to take to ensure that your workflow supports the rich features of the SharePoint workflow environment. Many of the settings that a user can configure on any workflow (like whether it will auto-start on change), need to be persisted through code in the workflow form. The new ASP.NET workflow form support in Visual Studio 2010 make creating Association and Initiation forms much easier. Hopefully the extensibility model of Visual Studio 2010 will enable the community to pick up on the Task and Modification forms.
  • Important to note if there are questions about it, is that the events cannot be used to access workflows as they are re-hydrating after being persisted. So you cannot modify any running worklflow instance.
  • SPWorklowEventReceiver is the base class to create workflow events.
  • A core concept of workflow is calling an external system and waiting (with the workflow persisted in a database) for that system to complete its work. When working with external data in a WF workflow it is important to support the concept of correlation. Correlation provides a generic way for allowing the workflow runtime to route incoming calls from external systems to the right workflow that is waiting for that event. SharePoint 2007 only allowed correlation with SharePoint list data. For a workflow to call into an external system and wait for that system to complete its task you need to route through a hidden SharePoint list.
  • SharePoint 2010 now allows for pluggable external data exchange services. An EDE service lies at the core of the WF environment. It is the component that is called by a workflow to reach out into an external system and get a response back. Creating these services is not an easy task though and requires a solid understanding of the SharePoint workflow environment.
  • From the Workflow perspective the flow of events when working with an external system are as follows.The workflow uses an CallExternalMethod activity which calls a method on the EDE Service (routed through the runtime based on .NET interface)The workflow does other thingsThe workflow uses a HandleExternalEvent activity to wait for a response from the external system. It uses the same correlation information as the first step to ensure the right even will be receivedFrom the perspective of the EDE ServiceThe EDE service receives a call from a workflow (method call)The EDE services calls into an external system. It either receives a response immediately or it will receive a response through a different communication channel such as a WCF service hosted in SharePointIt notifies the runtime that the event has arrived, which notifies the workflow (dehydrating it from the database)

SharePoint Saturday Workflow in Action SharePoint Saturday Workflow in Action Presentation Transcript

  • Workflow in SharePoint 2010
    Elaine van Bergen
    Architect
    OBS
  • The Connected EnterpriseWhere workflow fits in
    Collaboration happens in SharePoint
    • People at work
    • Data they make and use
    Workflows to manage it
    Two flavours
    • System – move data inand out of SharePoint
    • Human – support peoplewith long-running processes
  • Human Workflow Examples
    • Managing how people work
    • Document approval & feedback
    • Collaborative reviews & discussions
    • Gathering signatures
    • Business logic in action
    • Rules for SharePoint content
    • Applied automatically or on demand
    • “Glue” used to build common business apps
  • "Whats New" for SharePoint 2010
    For the end-user
    • New targets to run a workflow
    • Visio visualization
    For the power-user
    • Improved nested logic
    • New Task Process designer
    • Customizable OOB workflows
    For the developer
    • Visual Studio 2010 SharePoint tools
    • Workflow Events
    • Pluggable External Data Exchange Services
  • Windows Workflow Foundation
    Workflow engine shipped as part of the .NET 3.0 Framework
    Model workflows as state machines or sequential steps
    Long-running and stateful
  • Windows Workflow Foundation
    Workflow Services
    SharePoint
    CRM
    LOB
    Workflow
    Workflow
    Workflow
    WorkflowRuntime
    Scheduler
    Persistence
    Batching
    Tracking
  • Workflow Solution Spectrum
    Increasing Functionality
    Browser
    SharePoint Designer
    Visual Studio
  • Prototype, Design and DevelopSharePoint 2010 offers new development process
    • Envision workflows in Visio
    • Import into SharePoint Designer
    Parameterize
    Export to Visual Studio 2010
    • Add code
  • Declarative vs. Code-Based Workflows
    Developed with .NET code
    Compiled to template assemblies
    Packaged as features
    Deployed via WSP packages
    Added to feature galleries
    Activated per-site collection
    Versioned like code
    Can do all of the work in internal code
    and/or call activities
    Code-Based Workflows Declarative Workflows
    Developed as XOML (eXtensible Orchestration Markup Language)
    JIT compiled and run by a template assembly provided by SharePoint
    Published to containers (lists, libraries, etc.)
    Versionable like documents (with help)
    Connect activities together, but the activities do the work
  • A Gartner 2008 survey showed that:
    • 67% of companies that are "doing BPM" changed some of their business processes at least twice a year.
    • 18% needed to make changes on a monthly basis
    • 10% on a weekly basis and
    • 4% on a daily basis
  • Visio to Designer
    Live Demonstration
  • Tool Enhancements
    SharePoint Designer 2010
    • Big design interface improvements
    • Full screen, more available context data, import/export, nested logic
    • It’s what we’ve been using for all of the demos so far
    Visio 2010
    • Allow business analysts to design workflows
    • Provide graphical workflow status (Visio Services)
  • Declarative workflows
    • Performance improvements*
    • InfoPath forms for association, activation, tasks
    • Reusable workflows
    • Content types
    • Association columns
    • Promotable to “globally” reusable
    • Out-of-box workflows work this way now
    • Site workflows*
    • Workflows on document sets*
    • Impersonation steps*
    • Export to Visual Studio
    *not just for declarative workflows; also for code-based workflows
  • Reusable Workflows
    • Not tightly coupled to specific lists
    • Associated with lists or content types
    • Association columns
    • Promotable to “globally” reusable
    • Out-of-box workflows work this way now
  • SharePoint 2010 Workflow Targets
    Site
    List Item
  • Site Workflows
    Bound to site, not to a list or content type
    Started manually
    Accessible from Site Actions menu
    • Go to View All Site Content to see them
    Perfect for workflows that:
    • Work on groups of content
    • Work mostly on non-SharePoint content
  • Custom activities
    Plug in your own custom activities
    • Fully trusted deployment model
    • Sandboxed code in the user solution gallery
    Build on top of existing activities
    • OfficeTask exposed in Visual Studio
    Flexibility of custom code, reusable in code-based and declarative workflows alike
  • New and improved out-of-the-box actions
    User profile lookups
    Document sets
    Declare record
    Set permissions
    Read/write to external lists
    Utility actions
    Task Processes
    • e.g., Office Task
    • Composite activities
    • Design dialogs
  • How It Works: The “OfficeTask”
    Workflow activity
    Workflow activity
    Approval start behavior
    Approval in progress
    Approval end behavior
    For each task…
    Exit conditions
    Task start behavior
    Task in progress
    Task end behavior
  • Example: Expense Reporting
    Workflow activity
    Workflow activity
    Check metadata on uploaded report
    Approval in progress
    Set status to either Approved or Rejected, and notify submitter
    If anyone rejects, cancel the approval
    Task start behavior
    Send daily reminders when due date passes
    Task end behavior
  • Designer
    Live Demonstration
  • What’s new in Visual Studio 2010
    Site Workflows
    ASP.NET Form Templates
    New events
    External Data Exchange
  • Developing Site Level Workflows
    Site Workflows
    • List / Item properties are null
    • No auto-start
  • Creating ASP.NET Workflow Forms
    Generates the required code
    Updates the elements.xml file
    Available:
    • Association
    • Initiation
  • Workflow Events
    Events fired during workflow lifetime
    • Started, Completed…
    Scenarios
    • Call sub-workflows and wait for completion
    • Provide more elaborate error handling
    Familiar model for developers
  • SPWorklowEventReceiver
    public class MyWorkflowEventReceiver
    : SPWorkflowEventReceiver
    {
    public override void WorkflowStarting(
    SPWorkflowEventProperties properties)
    {
    // your code here
    base.WorkflowStarting(properties);
    }
    }
    Base class for handling workflow events
    Register on site / list / content type
  • External Data in SharePoint 2007
    External Data
    SharePoint Data
    Correlated Events
  • Pluggable EDE Services
    Interact with LOB systems by using custom External Data Exchange services
    Requires low-level understanding of WF layer
    You can write your own events
    • No partial trust
  • Flow of Events
    Workflow
    Call External Method
    WorkflowRuntime
    Raise Event
    External System
    EDE Service
    Or
    Subscriptions
    External System
    WCF Service
  • Visual Studio
    Live Demonstration
  • Question and Answer Time
    @laneyvb
    http://laneyvb.blogspot.com
  • Feedback details
    Connect to the “GUEST” wireless network
    Browse to the URL http://10.2.70.199
    At the Cliftons log on screen use these credentials
    User: CSC
    Password: 9A4F
    Select “forms authentication” and then log on with the details you were emailed during the week
    If you need a logon or need help, see Brian or Lewis at the front desk
    How to do tell us what you think
  • Thanks for Listening!
    And Thank You To Our Sponsors!