Stage-Based Workflows:Principles & Practices
Mike FitzmauriceChief Technology Officer - skybow
[email protected]@mikefitz
Who am I?
• Mike Fitzmaurice
• [email protected] or @mikefitz
• 11 years at Microsoft, 10 years at Nintex, now CTO of skybow
• The original SharePoint evangelist
• 25 years experience with workflow, business productivity, citizen development
Agenda
• This isn’t how to use any particular workflow tool
• This is how to think about workflow
• It should apply to most, if not all, tool options
• It’s based on repeated experiences and observations
Sequential workflows get messy – quickly
Example: Press Release
• Author
• Management
• Legal
• Publisher
You may think it looks like this…
StartPublisher deploys to
public web siteEnd
End End
Manager approves
Yes
No
Lawyer Approves
Yes
No
Or perhaps this…
Start
Publisher deploys to
public web siteEnd
End
Author Revises
Yes
No
ManagerApproves
Yes
No
Lawyer Approves
Yes
No
We can make it messier…
• Professional editorial review
• Lawyer with question for management
This will get ugly, unless we rethink it
How About This Instead?
Author Manager Legal Publisher
How About This Instead?
(re)Submit?
Author
End Manager
OK?
Manager
Author Legal
Choice
Legal
Author ManagerPublish
Publisher
End
Publish
Stage Workflow
Immediate Payoffs to State Workflows
• Designer determines what’s possible
• Participants determine what happens
• Every execution can take a different path – within reason
• Better reflects reality
State Machine
State Machine Concepts
States Events Transitions
Push Button Light Switch
OnOff
Press Button
Complete Circuit
Press Button
Break Circuit
State
Transition
Event
Keep in Mind:
• The machine stays in a given state by default
• An event must occur to change state
• The work takes place during the transitions
Easy User Participation
How easy is it to have the Lawyer review this?
Start
Publisher deploys to
public web siteEnd
End
Author Revises
Yes
No
ManagerApproves
Yes
No
Lawyer Approves
Yes
No
How easy is it to have the Lawyer review this?
Choice
Legal
Author ManagerPublish
How easy is it to have the Author review this?
(re)Submit?
Author
End Manager
Payoffs to Participation
• Users teach you what they know
• Each story is a stage
• You assemble the stages together
• No one needs to learn how to read a BPMN diagram
Easy to adjust
(re)Submit?
Author
End Manager
OK?
Manager
Author Legal
Choice
Legal
Author PublisherManager
Publisher
End
Publish
(re)Submit?
Author
End Manager
OK?
Manager
Author Legal
Choice
Legal
Author PublisherManager
Publisher
End
Publish(re)Submit?
Editor
Author ManagerEditor
Payoffs to Updatability
• Major changes with minimal disruption
• Stages are relatively independent
• Transition logic is all that needs to change
Easy to restore state
(re)Submit?
Author
End Manager
OK?
Manager
Author Legal
Choice
Legal
Author PublisherManager
Publisher
End
Publish
(re)Submit?
Author
End Manager
OK?
Manager
Author Legal
Choice
Legal
Author PublisherManager
Publisher
End
Publish
(re)Submit?
Author
End Manager
OK?
Manager
Author Legal
Choice
Legal
Author PublisherManager
Publisher
End
Publish
Record Stage
Record Stage
Record Stage
Record Stage
(re)Submit?
Author
End Manager
OK?
Manager
Author Legal
Choice
Legal
Author PublisherManager
Publisher
End
Publish
Record Stage
Record Stage
Record Stage
Record Stage
Last Known Stage
Legal
Author Publisher
Manager Legal
The alternative is unpleasant
Without using stages
• Ugly, hard-to-create, hard-to-read diagrams
• You have to think about every possible path in advance
• Users have no flexibility
Without explicit software support for stages…
• A lot of looping
• A lot of If-Then-Else conditions
• Very confusing diagrams…
Parallel
OK to exit?
Author?
Editor?
Manager?
Legal?
Publish?
… … … … …
Loop
What shouldn’t be stage-based?
Nothing.Everything can be stage-based.
Author
Manager
Review
Manager
Legal
Review
Legal
Publisher
Review
Publisher
End
Publish
This is a sequential workflow using stages
There’s still one thing missing…
Multiple Events/Transitions per Stage
Stage ≠ Role
Stages
Author Revisions
Editorial Review
Management Review
Legal Review
Publishing
Ro
les
Author• Edit• Resubmit
• Recall • Recall • Recall
Editor • Reassign• Approve• Reject
• Recall • Recall
Manager • Cancel • Cancel• Approve• Reject• Cancel
• Cancel • Cancel
Lawyer• Approve• Reject• Pose Question
Publisher • Publish
1. Notify Previous Reviewers2. Set Stage to “Author Revisions”3. Assign task to Author
1. Set Stage to “Manager Review”2. Assign task to Manager
Multi-Role/Multi-State Payoff
• Everyone can stay connected to the process
• Individual transition actions are short and simple
• Completely reflects reality
• (Weirdly) reduces the need for an elaborate workflow engine
Ramifications
• UX plays a much bigger role
• UX must adapt to stage
• Individual short-lived transition steps
• There’s no concept of automatic “waiting”
• Audit trails become very important
• Anything is possible
Call to Action
• Try to design using stages
• Consider tools and techniques that support stages
• Even sequential paths can be a set of stages
• Each with one event/transition
• Even if you can’t build with stages, model with them and communicate using them.
Thank you for attending!