The Microsoft Office Workflow Environment

The SharePoint development team chose to focus their workflow development efforts around what SharePoint technologies does best, which is share and collaborate on documents. Therefore you will notice that most of the document-centric workflow templates take documents through their typical lifecycle. There is also a heavy focus on human workflow items, which are task-driven processes as opposed to just programmatic automation. The other types of workflows can be addressed using WF and Visual Studio, of course, but you can see the document-centric/human-workflow focus throughout the workflow UI in the browser and SharePoint Designer tool.

Windows Workflow Foundation and Windows SharePoint Services are the fundamental technologies that make up the Microsoft Office Workflow Environment. We move up the complexity continuum starting with browser-based workflow creation to more sophisticated options in the Office SharePoint Designer tool, and finally to full programmatic flexibility with the tools available in Visual Studio.

Windows Workflow Foundation

The Windows Workflow Foundation (or WF) is a common workflow technology for Microsoft products, ISVs, and customer solutions. It is a framework to build on; it is not a server or an application per se. Instead, it should be thought of as a foundation for developers to create workflow applications. The key features include:

  • A unified model for human and system workflow

  • An extensible activity framework

  • The ability for workflows to run in any application or server

  • A visual designer for graphical and code-based authoring

As illustrated in Figure 8.1, workflows are built from activities and they execute using the runtime engine. The runtime services will persist a workflow’s state and monitor its execution. These work-flows can run in any application or server including desktop applications as well as on a portal server farm. With regard to the runtime services, they can be replaced depending on the type of application.

Figure 8.1. Windows Workflow Foundation


The WF functionality is included in WinFX and is used in all of the Microsoft Office 2007 workflows.

WF components

Workflow foundation components include the visual design capability in Visual Studio as well as the various components that are included in the .NET 3.0 framework used by developers to create workflow solutions. These components are explained in this section.

  • Visual Designer: Graphical and code-based development environment that is available in Visual Studio.

  • Base Activity Library: Out-of-the-box activities and base for custom activities. These include:

  • Sequence: Activities are executed one at a time in the order specified.

  • If/Else: Activities are executed in two or more possible paths depending on the condition met.

  • While: Activities are executed repeatedly as long as the condition is true.

  • Code: A defined block of code is executed.

  • Listen: Waits for a set of events, then executes one or more activities when the event fires.

  • InvokeWebService: Calls a Web Service.

  • Policy: Defines and executes business rules using a supplied Windows Workflow Foundation rules engine

    • Runtime Engine: Workflow execution and state management.

    • Runtime Services: Hosting flexibility and communication.

  • Workflow Runtime: The runtime is a lightweight and extensible engine for executing activities. It is hosted within any .NET process and allows developers to add workflow to Windows Forms applications, ASP.NET Web sites, or Windows Services.

WF is part of the .NET Framework 3.0 and also part of the Windows Vista release.

Windows SharePoint Services

Windows Workflow Foundation and Windows SharePoint Services are standard parts of Windows. The core services utilized for workflow processing in WSS are the Source List, Task List, History List, Reporting and Administration, Workflow, and Web Services. Workflows can be initiated by any of the Office authoring applications, from the Browser UI, Outlook, Access, or programmatically.

WSS acts as a host for the WF runtime engine. The functionality of the runtime engine and the hosting capability provided by WSS are exposed via the WSS object model.

Workflow templates

Workflow templates are installed on the server and contain code that defines a workflow. Templates are associated with any WSS list. Workflows that run on a specific item in SharePoint are called instances, and several instances of a workflow template are able to run at the same time on different items.

Association

Workflow templates are made available via association. A template is associated when the template has been made available to a document library, content type, or list. You will associate a basic workflow with a template in the “Creating Basic Workflows” section. This is accomplished by:

  • Creating a unique name for the workflow

  • Selecting a task list for use with the workflow

  • Selecting a history list

  • Configuring start options

The association is created outside of the actual workflow. The association information is stored by WSS in an internal workflow association table, and the data is used to set the parameters when the instance is started.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.216.12