You are previewing Office 2010 Workflow: Developing Collaborative Solutions.
O'Reilly logo
Office 2010 Workflow: Developing Collaborative Solutions

Book Description

Workflow is the glue that binds information worker processes, users, and artifacts. Without workflow, information workers are just islands of data and potential. Office 2010 Workflow details how to implement workflow in SharePoint 2010 and the client Microsoft Office 2010 suite to help information workers share data, enforce processes and business rules, and work more efficiently together or solo.

This book covers everything you need to know—from what workflow is all about to creating new activities; from the SharePoint Designer to Visual Studio 2010; from out-of-the-box workflows to state machine workflows. There's even a section on integrating external data with Business Data Services.

Want solid knowledge of how to implement workflow in the new world of Office and SharePoint? Pick up Office 2010 Workflow today.

Table of Contents

  1. Copyright
  2. Preface
    1. Office Workflows
    2. Integrating External Data
    3. Diverse Authoring Tools
    4. Summary
  3. About the Author
  4. About the Technical Reviewers
  5. Acknowledgments
  6. Introduction
    1. About This Book
      1. What You Need to Use This Book
      2. Code Samples
      3. Feedback
  7. I. Introduction
    1. 1. Overview of Microsoft Office
      1. 1.1. End-User Perspective
        1. 1.1.1. Office Overview
        2. 1.1.2. Workflows in SharePoint
      2. 1.2. Workflow Overview
        1. 1.2.1. Code-less Workflows
        2. 1.2.2. Visual Studio Workflows
      3. 1.3. Business Connectivity Services
      4. 1.4. Technology Overview
        1. 1.4.1. Software Products
        2. 1.4.2. Client-Server Topology
      5. 1.5. Summary
    2. 2. Setting Up a Development Environment
      1. 2.1. Single-Computer Installation
        1. 2.1.1. Initial Setup
        2. 2.1.2. SQL Server
        3. 2.1.3. Active Directory
      2. 2.2. Installing SharePoint on a Server OS
        1. 2.2.1. Installing the Prerequisites
        2. 2.2.2. Installing SharePoint Server
        3. 2.2.3. Running the SharePoint Products Configuration Wizard
        4. 2.2.4. Using the Central Administration Web Application
      3. 2.3. Installing SharePoint on a Desktop
        1. 2.3.1. Installing the Prerequisites
        2. 2.3.2. Enabling Windows Features
      4. 2.4. Installing SharePoint Server
        1. 2.4.1. Installing Hotfix KB970315
        2. 2.4.2. Running the Configuration Wizard
        3. 2.4.3. Initial Site Configuration
      5. 2.5. Installing Other Applications
        1. 2.5.1. Installing Visual Studio 2010
        2. 2.5.2. Office Client Applications
        3. 2.5.3. SharePoint Designer 2010
        4. 2.5.4. Installing Office 2010
        5. 2.5.5. Installing Visio 2010
      6. 2.6. Configuring E-mail
        1. 2.6.1. Providing an E-mail System
        2. 2.6.2. Configuring SMTP
      7. 2.7. Summary
    3. 3. SharePoint Primer
      1. 3.1. Columns
        1. 3.1.1. Text Columns
        2. 3.1.2. Date & Time Columns
        3. 3.1.3. Person or Group Columns
        4. 3.1.4. Choice Columns
        5. 3.1.5. Lookup Columns
        6. 3.1.6. Calculated Columns
        7. 3.1.7. Site Columns Collection
      2. 3.2. Content Types
      3. 3.3. Lists and Libraries
        1. 3.3.1. Supporting Content Types
        2. 3.3.2. Views
      4. 3.4. Subsites
      5. 3.5. Templates
        1. 3.5.1. Site Templates
        2. 3.5.2. List Templates
      6. 3.6. Summary
  8. II. Using Workflows
    1. 4. Three-state Workflow
      1. 4.1. Creating a New Site
        1. 4.1.1. Creating a New List
        2. 4.1.2. Understanding the Workflow Process
        3. 4.1.3. Defining the List Columns
      2. 4.2. Associating the Workflow
        1. 4.2.1. Defining the First Transition
          1. 4.2.1.1. Creating a Task
          2. 4.2.1.2. Sending an E-mail
        2. 4.2.2. Defining the Second Transition
      3. 4.3. Using the Work Request Workflow
      4. 4.4. Workflow Tasks
      5. 4.5. Summary
    2. 5. Office Applications as Workflow Participants
      1. 5.1. Creating a SharePoint Site
        1. 5.1.1. Creating a Document Library
        2. 5.1.2. Associating a Workflow
      2. 5.2. Using the Document Workflow
        1. 5.2.1. Submitting a New Design Document
        2. 5.2.2. Enabling Office
        3. 5.2.3. Receiving Workflow E-mail Notifications
        4. 5.2.4. Receiving a Task Notification
        5. 5.2.5. Using Office Shortcuts
      3. 5.3. Integrating the Task List
        1. 5.3.1. Executing the Workflow Again
        2. 5.3.2. Displaying the Task in Outlook
      4. 5.4. More About Tasks
        1. 5.4.1. Working with Multiple Task List
        2. 5.4.2. Deleting Tasks
      5. 5.5. Summary
    3. 6. Creating Workflows with SharePoint Designer
      1. 6.1. Creating the Site
        1. 6.1.1. Creating a Custom List
        2. 6.1.2. Defining the List Columns
      2. 6.2. Using Visio to Define a Workflow
        1. 6.2.1. Designing a Workflow in Visio
        2. 6.2.2. Exporting a Visio Workflow
      3. 6.3. Importing a Visio Workflow
        1. 6.3.1. Entering the Workflow Definition
        2. 6.3.2. Specifying a Condition
        3. 6.3.3. Creating a Calendar entry
        4. 6.3.4. Adding Workflow Details
        5. 6.3.5. Configuring the Workflow
      4. 6.4. Executing the Workflow
      5. 6.5. Exporting to Visio
      6. 6.6. Summary
    4. 7. Creating Reusable and Site Workflows
      1. 7.1. Reusable Workflows
        1. 7.1.1. Creating a New Site
        2. 7.1.2. Creating a Reusable Workflow
        3. 7.1.3. Workflow Editor Overview
          1. 7.1.3.1. Actions
          2. 7.1.3.2. Conditions
          3. 7.1.3.3. Steps
          4. 7.1.3.4. Insertion Point
        4. 7.1.4. Initiation Form Parameters
        5. 7.1.5. Entering the Workflow Definition
          1. 7.1.5.1. Adding a Log to the History List
          2. 7.1.5.2. Adding an Approval Process
        6. 7.1.6. Checking the Review Outcome
        7. 7.1.7. Adding a Second Step
          1. 7.1.7.1. Adding a Condition
          2. 7.1.7.2. Sending an E-mail
        8. 7.1.8. Publishing the Workflow
        9. 7.1.9. Associating the Workflow
        10. 7.1.10. Testing the Workflow
      2. 7.2. Site Workflows
        1. 7.2.1. Initiation Form Parameters
        2. 7.2.2. Designing the Workflow
        3. 7.2.3. Testing the Workflow
      3. 7.3. Summary
  9. III. Workflows in Visual Studio 2010
    1. 8. Creating a Simple Site Workflow
      1. 8.1. Using Visual Studio 2010
        1. 8.1.1. Creating a SharePoint Project
        2. 8.1.2. Running as Administrator
        3. 8.1.3. Configuring the SharePoint Project
        4. 8.1.4. SharePoint Support in Visual Studio 2010
      2. 8.2. Designing a SharePoint Workflow
        1. 8.2.1. Logging to the History List
        2. 8.2.2. Creating a New Task
        3. 8.2.3. Defining the Activity's Properties
        4. 8.2.4. Entering Code in the Code-Beside Class
      3. 8.3. Deploying the Workflow
        1. 8.3.1. Running the Workflow
        2. 8.3.2. Visual Studio Cleanup
      4. 8.4. Resolving Retract Issues
        1. 8.4.1. SharePoint Deployment Configuration
        2. 8.4.2. Selecting the Active Configuration
      5. 8.5. Summary
    2. 9. Exploring the SharePoint Object Model
      1. 9.1. Creating a SharePoint Project in Visual Studio
        1. 9.1.1. Adding a Workflow
        2. 9.1.2. SharePoint Customization Wizard
      2. 9.2. Writing SharePoint Details to the History List
        1. 9.2.1. Creating the Workflow Design
        2. 9.2.2. Accessing the Object Model
          1. 9.2.2.1. SPContext
          2. 9.2.2.2. SPWeb
          3. 9.2.2.3. SPList
          4. 9.2.2.4. SPListItem
          5. 9.2.2.5. SPDocumentLibrary
          6. 9.2.2.6. SPContentType
          7. 9.2.2.7. SPField
          8. 9.2.2.8. SPGroup
          9. 9.2.2.9. SPUser
        3. 9.2.3. Testing the Workflow
      3. 9.3. Scanning the Tasks List
        1. 9.3.1. Adding an Activity to Check the Tasks List
        2. 9.3.2. Implementing Check Tasks Logic
        3. 9.3.3. Testing the Workflow
      4. 9.4. More About Content Types
      5. 9.5. Summary
    3. 10. Custom Workflow Forms
      1. 10.1. Creating a Sequential Workflow
      2. 10.2. Adding an Initiation Form
        1. 10.2.1. Customizing the Initiation Form
        2. 10.2.2. Getting the Initiation Data in the Workflow
      3. 10.3. Implementing the Workflow
        1. 10.3.1. Replicator Activity
        2. 10.3.2. Setting Up the Replicator Activity
        3. 10.3.3. CreateTask Activity
        4. 10.3.4. Testing the Workflow
      4. 10.4. Content Types
        1. 10.4.1. Creating a Content Type
        2. 10.4.2. Content Type Inheritance
        3. 10.4.3. Adding Field Definitions
        4. 10.4.4. Adding the Field References
        5. 10.4.5. Using the New Content Type
        6. 10.4.6. Testing the Workflow
      5. 10.5. Creating Custom Task Forms with InfoPath 2010
        1. 10.5.1. Connecting to SharePoint
        2. 10.5.2. Modifying the Form Layout
        3. 10.5.3. Defining Rules
        4. 10.5.4. Publishing the Form
        5. 10.5.5. Testing the Custom Form
      6. 10.6. Summary
    4. 11. Handling Events
      1. 11.1. Modifying the Calendar List
        1. 11.1.1. Adding the MenuUrl Column
        2. 11.1.2. Adding the Attendees Column
        3. 11.1.3. Creating a New Event
      2. 11.2. Designing the Workflow
        1. 11.2.1. Creating the Workflow Project
        2. 11.2.2. Managing the Tasks
        3. 11.2.3. Getting the Workflow Parameters
        4. 11.2.4. Using the Replicator Activity
        5. 11.2.5. Task Activities
          1. 11.2.5.1. Correlation Tokens
          2. 11.2.5.2. Setting the ContentTypeID
          3. 11.2.5.3. Implementing the createTask Event Handler
          4. 11.2.5.4. Setting the While Condition
          5. 11.2.5.5. Handling the OnTaskChanged Event
        6. 11.2.6. Adding a Final Step
      3. 11.3. Testing the Workflow
      4. 11.4. Summary
    5. 12. LINQ to SharePoint
      1. 12.1. Setting Up the Project
        1. 12.1.1. Copying the Chapter 11 Project
        2. 12.1.2. Configuring the Debugging Site
        3. 12.1.3. Testing the Workflow
      2. 12.2. SPMetal
        1. 12.2.1. Running SPMetal
        2. 12.2.2. Default Generation Rules
          1. 12.2.2.1. DataContext Class
          2. 12.2.2.2. Content Types
          3. 12.2.2.3. Choice Columns
          4. 12.2.2.4. Lookup Fields
        3. 12.2.3. Configuring SPMetal
          1. 12.2.3.1. Including Hidden Content Types
          2. 12.2.3.2. Specifying Lists
          3. 12.2.3.3. Specifying Content Types
          4. 12.2.3.4. Specifying Columns
      3. 12.3. Using LINQ to SharePoint
        1. 12.3.1. Adding a Collection Step
        2. 12.3.2. Writing a LINQ Query
        3. 12.3.3. Collecting the Orders
      4. 12.4. Testing the Workflow
      5. 12.5. Summary
    6. 13. Using State Machine Workflows
      1. 13.1. Creating the Sample Project
        1. 13.1.1. Creating the BugList
          1. 13.1.1.1. Defining the Bug Content Type
          2. 13.1.1.2. Defining the BugList
        2. 13.1.2. Creating Tasks List Content Types
          1. 13.1.2.1. Defining Additional Fields
          2. 13.1.2.2. Defining the Task Content Types
          3. 13.1.2.3. Remaining Content Types
        3. 13.1.3. Feature Summary
        4. 13.1.4. Deploying the BugList Project
        5. 13.1.5. Creating a List Instance
      2. 13.2. Creating the BugList Workflow
        1. 13.2.1. Creating the Workflow Project
        2. 13.2.2. State Machine Overview
          1. 13.2.2.1. Understanding States
          2. 13.2.2.2. EventDrivenActivity
          3. 13.2.2.3. Navigation
          4. 13.2.2.4. Initialization and Finalization
          5. 13.2.2.5. Substates
          6. 13.2.2.6. SetState
      3. 13.3. Designing the Workflow
        1. 13.3.1. Adding the States
          1. 13.3.1.1. Initial and Completed States
          2. 13.3.1.2. Setting Up the Workflow
        2. 13.3.2. Adding State Initialization
        3. 13.3.3. Adding Event Logic
        4. 13.3.4. Gathering Task Details
        5. 13.3.5. Specifying the Event Activities
          1. 13.3.5.1. IfElseActivity
          2. 13.3.5.2. CompleteTaskActivity
          3. 13.3.5.3. Using the SetStateActivity
      4. 13.4. Handling the Work Task
        1. 13.4.1. Implementing the Assign State Initialization Sequence
        2. 13.4.2. Implementing the Active State Initialization Sequence
      5. 13.5. Adding Additional State Processing
        1. 13.5.1. Configuring CreateTaskWithContentType
        2. 13.5.2. Setting the BugStatus
      6. 13.6. Implementing the Event Handlers
        1. 13.6.1. Assigned State
        2. 13.6.2. Active State
        3. 13.6.3. Working as Designed State
          1. 13.6.3.1. Processing the Closed Branch
          2. 13.6.3.2. Processing the Resubmit Branch
        4. 13.6.4. Waiting State
          1. 13.6.4.1. Fixed State
          2. 13.6.4.2. Using AlterTask
          3. 13.6.4.3. Completing the Workflow
      7. 13.7. Adding an Association Form
      8. 13.8. Testing the Workflow
      9. 13.9. Summary
  10. IV. Miscellaneous Topics
    1. 14. Using a ConditionedActivityGroup
      1. 14.1. Setting Up the Project
        1. 14.1.1. Creating a Part4 Site
        2. 14.1.2. Creating the Visual Studio Project
      2. 14.2. Designing the Workflow
        1. 14.2.1. Creating the Task
        2. 14.2.2. ConditionedActivityGroup Activity
        3. 14.2.3. Designing the First Child Activity
        4. 14.2.4. Designing the Second Child Activity
      3. 14.3. Using the DelayActivity
      4. 14.4. Testing the Workflow
      5. 14.5. Summary
    2. 15. Importing Reusable Workflows
      1. 15.1. Creating a Workflow in the SharePoint Designer
        1. 15.1.1. Designing the Workflow
        2. 15.1.2. Testing the Workflow
        3. 15.1.3. Exporting the Workflow
        4. 15.1.4. Site Assets
      2. 15.2. Importing the Workflow
        1. 15.2.1. Modifying the Workflow
        2. 15.2.2. Associating the Workflow
        3. 15.2.3. Testing the Workflow
      3. 15.3. Summary
    3. 16. Creating Custom Actions
      1. 16.1. Setting Up the SharePoint Project
        1. 16.1.1. Designing a Custom Activity
        2. 16.1.2. Adding the SharePoint References
      2. 16.2. Implementing the Custom Activity
        1. 16.2.1. Dependency Properties
        2. 16.2.2. Creating the Event
        3. 16.2.3. Generating a Strong Name
        4. 16.2.4. Finding the Public Key Token
      3. 16.3. Defining the Action
        1. 16.3.1. Adding a Mapped Folder
        2. 16.3.2. Adding an Actions File
        3. 16.3.3. Rule Designer
      4. 16.4. Deploying the ActivityLibrary
        1. 16.4.1. Adding the Assembly
        2. 16.4.2. Defining a Feature
        3. 16.4.3. Implementing an Event Receiver
      5. 16.5. Testing the Custom Action
        1. 16.5.1. Creating a Site Workflow
        2. 16.5.2. Using the Create Event Action
      6. 16.6. Testing the Workflow
      7. 16.7. Summary
    4. 17. Pluggable Workflow Services
      1. 17.1. Creating the Workflow Project
      2. 17.2. Creating a Local Service
        1. 17.2.1. Defining the Interface
        2. 17.2.2. Implementing the Service
        3. 17.2.3. Generating a Strong Name
        4. 17.2.4. Deploying the FileService Assembly
        5. 17.2.5. Implementing an Event Receiver
      3. 17.3. Implementing the Workflow
        1. 17.3.1. Implementing CallExternalMethodActivity
        2. 17.3.2. Implementing HandleExternalEventActivity
        3. 17.3.3. Sending an E-mail
      4. 17.4. Testing the Workflow
      5. 17.5. Summary
  11. V. Business Connectivity Services (BCS)
  12. 18. Creating External Content Types
    1. 18.1. Creating a Read-Only List
      1. 18.1.1. Creating an External Content Type
      2. 18.1.2. Creating a Database Connection
      3. 18.1.3. Creating a Read Item Operation
      4. 18.1.4. Creating a Read List Operation
        1. 18.1.4.1. Adding a Limit Filter
        2. 18.1.4.2. Choosing Fields for the Picker Control
      5. 18.1.5. Setting Permissions
      6. 18.1.6. Creating the Employees External List
    2. 18.2. Creating an Updatable List
      1. 18.2.1. Creating the External Content Type
      2. 18.2.2. Creating the Sales Person List
    3. 18.3. Defining an Association
      1. 18.3.1. Creating the Territory External Content Type
      2. 18.3.2. Adding the Association
      3. 18.3.3. Configuring the Association
      4. 18.3.4. Testing the Changes
    4. 18.4. Summary
  13. 19. Implementing a .NET Assembly Connector
    1. 19.1. Creating the Business Data Connectivity Project
    2. 19.2. Using the BDC Explorer
      1. 19.2.1. Updating the Method Details
      2. 19.2.2. Using the BDC Explorer
      3. 19.2.3. The BDC Model File
    3. 19.3. Implementing the CRUD Operations
      1. 19.3.1. Defining the Data Class
      2. 19.3.2. Using LINQ to SQL
      3. 19.3.3. Configuring the Database Connection
      4. 19.3.4. Implementing the Operations
      5. 19.3.5. Testing the ProductDetail External Content Type
    4. 19.4. Creating a Updatable External Content Type
      1. 19.4.1. Adding a New Entity
      2. 19.4.2. Defining the Data Class
      3. 19.4.3. Defining the ReadItem Method
      4. 19.4.4. Defining the Review Fields
      5. 19.4.5. Creating the Remaining Operations
      6. 19.4.6. Removing Fields
      7. 19.4.7. Implementing the CRUD Operations
      8. 19.4.8. Testing the Review External Content Type
    5. 19.5. Creating an Association
      1. 19.5.1. Defining Associations
      2. 19.5.2. Implementing the Association Methods
      3. 19.5.3. Testing the Changes
    6. 19.6. Summary
  14. 20. Using External Lists in Outlook
    1. 20.1. Linking the External Content Type
      1. 20.1.1. Mapping to Office
      2. 20.1.2. Connecting to Outlook
    2. 20.2. Synchronizing Data
      1. 20.2.1. Changing the Limit Filter
      2. 20.2.2. Applying the Changes
    3. 20.3. Linking the Territories List
      1. 20.3.1. Modifying the Territory External Content Type
      2. 20.3.2. Mapping to Office
      3. 20.3.3. Connecting to Outlook
      4. 20.3.4. Adding a Territory
    4. 20.4. Summary