SharePoint 2010 Workflows Part – 1 By Mohamed A bdeen
Nov 18, 2014
SharePoint
2010 WorkflowsPart – 1
By Mohamed Abdeen
Work
flow
D
efinit
ion
Workflows are systems
that manage the execution of a business
process.
A workflow is primarily
described as a process
that manages the flow of
work among individuals,
offices, departments, or
entire companies
Work
flow
Exa
mple
Work
flow
& S
hare
Poin
t
A SharePoint workflow is an
automated flow of objects through a
sequence of operations that are
related to a business process. An
object in SharePoint is a document
or an item in a list like an
announcement or a task SharePoint, because it provides a
user interface and other workflow
fundamentals like security,
reporting, and logging. These
features make SharePoint
workflows and your business
processes a powerful combination.
SharePoint Workflow is
built on Windows Workflow Foundation
(WFF) 3.0
WFF
Arc
hit
ect
ure
WFF
– H
ost
ing L
aye
r
A workflow is not an application
and needs a host process in which
to run
A workflow is typically long
running, meaning that it may start
and then suspend for a while,
possibly even many months. The
state of the workflow needs to be
persisted while the workflow is
waiting for an action to occur and,
when that action occurs, the
workflow should resume where it
left off.
Transactions are another important
aspect of the hosting framework, in
that you can leverage transactions
to roll a workflow back to a
previous state if an error occurs
WFF
– R
unti
me L
aye
r
represents all the core
services that come with WF like scheduling, persistence services
WFF
– P
rogra
mm
ing
Laye
r
Has Out-of-the-box activities that can perform various functions in the workflow Custom activities
Rules allow developer
to declaratively create
business logic
Types
of
Work
flow
s1.Sequential 2.State Machine
Sequenti
al W
F The steps within workflow execute sequentially one after
the anotherNever going back to previous step
Sequenti
al W
F Exa
mple
Sta
te M
ach
ine
WF
Executes in no particular order
Steps moves from one
state to another state
until the logic concludes the workflow has completedLike bug tracking
workflow
Sta
te M
ach
ine
WF
List Item Workflow Content type WFSharePoint Site
Out-
of-
the-b
ox
Share
Poin
t W
ork
flow 1.Three State WF
2.Approval WF3.Collect Feedback WF4.Collect Signature WF5.Disposition Approval
WF6.Translation Management WF
1.T
hre
e-s
tate
w
ork
flow
By default is leveraged
on issue tracking lists
in SharePointName of three states
are configurable Comes with out-of-the-
box workflow
2.A
ppro
val W
ork
flow Routing a piece of
SharePoint content to
all designated approvers requesting
their approval or denial of the content
Order of approvers can be Serial or parallel
3.C
olle
ct F
eedback
W
ork
flow WF gives submitter
the ability to acquire
feedback for their peers on the status of
submitted document.
The WF routes the document to the specified team members, after that the feedback is compiled and the submitter is notified
4.C
olle
ct S
ignatu
re
Work
flow
Like approval WF but
this will require each
approver to place a digital signature on the document This workflow can only
be initiated from the
office client like word ,
not the browser
5.D
isposi
tion
Appro
val W
F
Manage document expiration and retention, this enables
you to decide what will
happen to documents
when they expire
6.T
ransl
ati
on
Managem
ent
WF Translating office documents
from one language to
another. This workflow works
with two list types translation
management library and a
translators list A document that needs to be
translated is uploaded into
the translation management
lib and translators in the
translators list receive tasks
to start translating the
source document into their
respective languages
Tools
for
build
ing
Cust
om
SP W
ork
flow
1.SharePoint Designer
20102.Visual Studio 20103.Visio 2010 [new
Template called Microsoft SharePoint
WF]4.InfoPath 2010
Workflow is deployed
in site collection featureWorkflow packaged in
dll which must be deployed in GAC so it
isn’t applicable in sandbox solution
Dem
o D
eta
ils
The workflow we are going to create step by step is an application that allows users to submit their expense reports; as soon as their expense report will be submitted, a workflow will be activated; this workflow will: Generate a unique identifier (a Guid) for
this expense report Check if the report must be submitted to approval : if the amount is less than 1000, the expense report will automatically be approved and the process is completed (status will be “auto approved”) Find the user’s manager Create tasks for the manager to approve
or reject the expense report Update the expense report status (“approved or “rejected”).
Share
Poin
t 2010
Work
flow
New
Featu
res Reusable Workflow
Visio 2010 SharePoint
Workflow Out-of-box workflow can
customized in SharePoint
designer SP2010 enables you to
save a workflow as a
sharepoint solution package (WSP) file and
export and import that
sharepoint solution into
another farm
Share
Poin
t 2010
Work
flow
New
Fe
atu
res
View a workflow’s status
through a Visio diagram,
enable Visio web access
on that workflow Importing SharePoint
Designer workflows into
visual studio Pluggable Workflows
SharePoint 2010 workflows can execute up
to a certain point and then
wait for information from a
external system
SharePoint 2010 supplies a couple of new event handlers,
including the ability to
react to a workflow’s
initialization or completion
How
to b
uild
W
ork
flow
Solu
tions 1.Model the high level
business process [What you are going
to build ?] using Visio
[new template called
SharePoint workflow ]