19 Sep 2011

Workflows Architecture SharePoint

 

WF-Workflow Foundation Overview

Proposed by Microsoft since .NET Framework 3.0.

WF is the foundation for creating custom workflow-enabled solutions

Current version of Workflow Foundation (also known as WF4) is the one that is shipped together with Microsoft .NET Framework 4.0. It is a completely fresh new engine, which is absolutely not compatible with the previous versions of WF (WF 3.0/WF 3.5, or WF 3.x).

However, SharePoint 2010 still uses the previous version of the workflow engine that is WF 3.x

 

Workflow Foundation Architecture

WF workflow is a set of elements called activities

image
Simplified overall architecture of WF 3.x.

The main and native runtime services offered by WF 3.x are

  • Loader
  • Scheduler
  • Persistence
  • Tracking
  • Commit Work Batch
  • Communication

Native Activities Offered by WF in . NET 3

  • CallExternalMethod
  • Code
  • Compensate
  • CompensatableSequence
  • ConditionedActivityGroup
  • Delay
  • EventDriven
  • EventHandlingScope
  • FaultHandler
  • HandleExternalEvent
  • IfElse
  • InvokeWebService
  • InvokeWorkflow
  • Listen
  • Parallel
  • Policy
  • Replicator : Replicator can submit the same approval task to a group of approvers.
  • Sequence
  • Suspend
  • SynchronizationScope
  • Terminate
  • Throw : Throw an exception
  • TransactionScope
  • CompensatableTransactionScope
  • WebServiceInput
  • WebServiceOutput
  • WebServiceFault
  • While
  • ReceiveActivity :  Receives data by using a WCF channel and a specific service
    contract, .net 3.5 feature
  • SendActivity

 

Workflow Types

  1. Sequential workflow
  2. State machine workflow

 

Sequential workflow [ SequentialWorkflowActivity]

is a workflow that defines a chronologicallyordered flow. it can only move forward, from the starting activity to the ending activity.

Good choice for those scenarios in which you do need very limited user interaction or no user interaction.

for example : data-intensive activities, machine interaction, conversion processes


State machine workflow [ StateMachineWorkflowActivity]

There are rules for moving between one state and another.
Every time a state machine workflow moves into a specified state, it can execute a custom
sequence of steps before moving to the next state

Example: document approval, multi-step process approval, order processing

 

imageWorkflow designer of a sample sequential workflow

 

image
State machine workflow

 

image
Activity lifecycle of an activity instance during workflow execution

 

image
Architectural schema of Workflow Foundation 3.x hosted in SharePoint 2010.

 

Workflow Targets and Association

  1. List or Library
  2. Content Type
  3. Site , Example: scheduled maintenance tasks

image
Types of workflow associations supported by SharePoint 2010

Each workflow definition comprises an XML definition file, the workflow itself, the assemblies
required for the correct workflow execution, and any UI form.

No comments:

Post a Comment