Documente Academic
Documente Profesional
Documente Cultură
Overview
SharePoint is a:
Persistence Engine – You don’t have to worry
about where the workflow is stored
User Interface – Interact via the Web or
through Microsoft Office system integration
Workflow brings process to SharePoint data
Differentiating Event Handlers and
Workflow
Out-of-the-Box Templates
Three Templates: Three State, Approval, Collect Feedback
Easy to use but flexibility is limited
SharePoint Designer
Easier to build than workflows with Visual Studio
Limited rules-based engine
Can not be moved between sites or between environments
(not reusable)
Workflow Life Cycle
Developer
Developer wraps Farm administrator
develops a workflow template in deploys the workflow
workflow Feature and Solution solution
template
Workflow executes
Optionally, the
activities and
workflow owner Workflow
optionally creates
tasks and history
modifies the running completes
workflow instance
items
Workflow Forms
An activity is:
An atomic set of instructions used to
complete a unit of work
A reusable component used to
compose workflows
Activities are like controls in forms
development
You drag and drop them onto a
design surface
You modify their properties with
property sheets
You generate event handlers and
write code inside
Common Composite Activities
If Else
While
Sequence
Parallel
Writing Code in the Workflow
Code Activity
Contains one method to execute—thus
providing a way to plug code directly into a
workflow
Custom Developed Activity
Derive from the Activity class, override the
Execute method, and deploy to the Global
Assembly Cache (GAC)
The Workflow Project
Sequential Workflow
Predictable and fixed path for the workflow
Move from one activity to the other, possibly branch but
flow is predefined
State Machine
Workflow
Event-driven workflow
Events control the
execution of the
activities
Model the Workflow
Define Rules
Code condition
Declarative condition
Code Activity
CreateTask activity
WhileActivity
OnTaskChanged
activity
CompleteTask
activity
Preparing a Task
Code condition
Class-level variable in code is set to true if
manager completes the task (setting
percentage complete to 100%)
Exit the loop when condition is false