Workflow Systems: Myths, Truths and Wishful Thinking

73
Workflow Systems Brandon Satrom Chief Architect, Thought Ascent [email protected] www.userinexperience.com Myths, Truths and Wishful Thinking

description

IASA Denver Talk on Workflow Systems, September 2009

Transcript of Workflow Systems: Myths, Truths and Wishful Thinking

Page 1: Workflow Systems: Myths, Truths and Wishful Thinking

Workflow Systems

Brandon SatromChief Architect, Thought [email protected]

Myths, Truths and Wishful Thinking

Page 2: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Opinionated Architect. Often wrong.

Continually improving.

About Me - In Six Words

Page 3: Workflow Systems: Myths, Truths and Wishful Thinking

Long-time Microsoft developerFormer Enterprise Architect

Alt.Net guy, but still nicePresident, IASA Austin

Copyright 2009, Thought Ascent, Inc

Worth mentioning?

Page 4: Workflow Systems: Myths, Truths and Wishful Thinking

Experience with vendor WF toolsExperience with BizTalk (2002+)

Recently built a successful production implementation using WF 3.5See that “opinionated architect” comment.

Copyright 2009, Thought Ascent, Inc

What qualifies me to talk about Workflow…

Page 5: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

So what is “Workflow” anyway?

Page 6: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

A workflow is a depiction of a sequence of operations, declared as work of a person, a group of persons, an organization of staff, or one or more simple or complex mechanisms. Workflow may be seen as any abstraction of real work, segregated in workshare, work split or other types of ordering. For control purposes, workflow may be a view on real work under a chosen aspect, thus serving as a virtual representation of actual work. The flow being described often refers to a document that is being transferred from one step to another.

– from http://en.wikipedia.org/wiki/Workflow

Page 7: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

How about something simpler?

Page 8: Workflow Systems: Myths, Truths and Wishful Thinking

The coordination of work in a “system”

Copyright 2009, Thought Ascent, Inc

Page 9: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Got it. So then what’s a “Workflow System?”

Page 10: Workflow Systems: Myths, Truths and Wishful Thinking

Perhaps…

An application that assists in the definition and/or execution and/or management of workflows

Copyright 2009, Thought Ascent, Inc

Page 11: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

That sounds too similar to a “normal”

system. What’s the difference?

Page 12: Workflow Systems: Myths, Truths and Wishful Thinking

How a workflow system differs from a traditional program

In theory, at least…

Copyright 2009, Thought Ascent, Inc

Page 13: Workflow Systems: Myths, Truths and Wishful Thinking

Declarative

Copyright 2009, Thought Ascent, Inc

Activity A Activity B

Page 14: Workflow Systems: Myths, Truths and Wishful Thinking

Persistent

Copyright 2009, Thought Ascent, Inc

Activity A Activity B Activity C (Idle)

Activity D (Active)

Persistence Store

External Stimulus

Page 15: Workflow Systems: Myths, Truths and Wishful Thinking

Dynamic

Copyright 2009, Thought Ascent, Inc

Activity A

Activity B

Activity C

Activity D

Activity E

Activity F

Business Change

Divert to new activity

Page 16: Workflow Systems: Myths, Truths and Wishful Thinking

Configurable

Copyright 2009, Thought Ascent, Inc

Activity A Activity B Activity C

Rules Store

Activity D

Activity E

Page 17: Workflow Systems: Myths, Truths and Wishful Thinking

Centrally Defined…

Copyright 2009, Thought Ascent, Inc

Page 18: Workflow Systems: Myths, Truths and Wishful Thinking

… though not necessarily visual.

Copyright 2009, Thought Ascent, Inc

static SessionSaga(){ Define(() => { Initially( When(NewSession) .Then((saga, message) => saga.NewSessionStarted(message)) .TransitionTo(SessionActive) );

During(SessionActive, When(FeedbackCheckRequested) .Then((saga, message) => saga.CheckForFeedback(message)) When(new Timer() .StartOn(session.Start)

.RunAtInterval(session.CheckInterval) .Until(session.End))

.Then((saga, message) => saga.CheckForFeedback(message)) When(SessionComplete) .Then((saga, message) => saga.SessionEnded(message)) .Complete() ); });}

Page 19: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Ok, I get it. So why are we

still doing this presentation?

Page 20: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Workflow has a PR problem…

Page 21: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

There seem to be two sides…

Page 22: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

…who can’t (or won’t) get along.

Page 23: Workflow Systems: Myths, Truths and Wishful Thinking

The “Workflow will Save us all” side

Copyright 2009, Thought Ascent, Inc

Page 24: Workflow Systems: Myths, Truths and Wishful Thinking

The “Run like you’re on fire” side

Copyright 2009, Thought Ascent, Inc

Page 25: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

I’d like a third option

please.

Page 26: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

How about the best of both?

Page 27: Workflow Systems: Myths, Truths and Wishful Thinking

Consider both sides of the story…

Page 28: Workflow Systems: Myths, Truths and Wishful Thinking

And be a cautious optimist…

Copyright 2009, Thought Ascent, Inc

Page 29: Workflow Systems: Myths, Truths and Wishful Thinking

There are reasons to get excited about Workflow…

Copyright 2009, Thought Ascent, Inc

Page 30: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Visual, Visual, Visual

Page 31: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Clear expression of intent from domain experts…

Page 32: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

The Next “Great Leap” in software

Page 33: Workflow Systems: Myths, Truths and Wishful Thinking

…and there are reasons to be wary…

Copyright 2009, Thought Ascent, Inc

Page 34: Workflow Systems: Myths, Truths and Wishful Thinking

Steep-learning cu

rves

Copyright 2009, Thought Ascent, Inc

Page 35: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Poor Performance

Page 36: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Sleights of hand and shell-games

Page 37: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Both sides are right …

Both sides are wrong….

Page 38: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Right and wrong? How

so?

Page 39: Workflow Systems: Myths, Truths and Wishful Thinking

Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Page 40: Workflow Systems: Myths, Truths and Wishful Thinking

1) Visual Workflow Tools are the only way to “do” Workflow

Copyright 2009, Thought Ascent, Inc

Page 41: Workflow Systems: Myths, Truths and Wishful Thinking

Myth

Copyright 2009, Thought Ascent, Inc

Page 42: Workflow Systems: Myths, Truths and Wishful Thinking

Is this really easier to comprehend…

Copyright 2009, Thought Ascent, Inc

Page 43: Workflow Systems: Myths, Truths and Wishful Thinking

Than this?

require 'rubygems' require 'statemachine'

vending_machine = Statemachine.build do state :waiting do

event :dollar, :paid, :activate event :selection, :waiting on_entry :sales_mode on_exit :operation_mode

end trans :paid, :selection, :waiting, :release trans :paid, :dollar, :paid, :refund context VendingMachineContext.new

end

Copyright 2009, Thought Ascent, Inc

Page 44: Workflow Systems: Myths, Truths and Wishful Thinking

The Truth

Many open-source “code-first” solutions offer most of the benefits of a workflow system without the steep learning curve.

Copyright 2009, Thought Ascent, Inc

Page 45: Workflow Systems: Myths, Truths and Wishful Thinking

Demo –Workflow with Mass Transit

Copyright 2009, Thought Ascent, Inc

Page 46: Workflow Systems: Myths, Truths and Wishful Thinking

2) Workflow should be running all your application logic

Copyright 2009, Thought Ascent, Inc

Page 47: Workflow Systems: Myths, Truths and Wishful Thinking

Lie

Copyright 2009, Thought Ascent, Inc

Page 48: Workflow Systems: Myths, Truths and Wishful Thinking

Turn a simple flow…

Copyright 2009, Thought Ascent, Inc

Page 49: Workflow Systems: Myths, Truths and Wishful Thinking

…into “Spaghetti Flow”

Copyright 2009, Thought Ascent, Inc

Page 50: Workflow Systems: Myths, Truths and Wishful Thinking

The Truth

Workflow systems can be a good choice for managing long-running, complex processes, but don’t yet perform well-enough to handle all your logic.

Copyright 2009, Thought Ascent, Inc

Page 51: Workflow Systems: Myths, Truths and Wishful Thinking

3) Domain experts can (and should) easily change workflows at runtime

Copyright 2009, Thought Ascent, Inc

Page 52: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Page 53: Workflow Systems: Myths, Truths and Wishful Thinking

Wishful Thinking…

Copyright 2009, Thought Ascent, Inc

Page 54: Workflow Systems: Myths, Truths and Wishful Thinking

The Truth

We don’t change systems at runtime without some diligence. So why would our users?

That said. There are models that are more illustrative of reality…

Copyright 2009, Thought Ascent, Inc

Page 55: Workflow Systems: Myths, Truths and Wishful Thinking
Page 56: Workflow Systems: Myths, Truths and Wishful Thinking

4) Declarative/Visual App Dev is easier than traditional dev…

Copyright 2009, Thought Ascent, Inc

Page 57: Workflow Systems: Myths, Truths and Wishful Thinking

Half-Truth

Copyright 2009, Thought Ascent, Inc

Page 58: Workflow Systems: Myths, Truths and Wishful Thinking

The Truth

Where it’s easier:OOB programming constructs (IF, While, etc)Encourages/ Rewards SRP-development

Where it’s harder:Visual IDEs slower than code IDEsTesting is hard, if not impossibleRefactoring involves more rework than necessary

Copyright 2009, Thought Ascent, Inc

Page 59: Workflow Systems: Myths, Truths and Wishful Thinking

5) “I can build a WF system in 100 lines of code”

Copyright 2009, Thought Ascent, Inc

Page 60: Workflow Systems: Myths, Truths and Wishful Thinking

Wishful Thinking…

Copyright 2009, Thought Ascent, Inc

Page 61: Workflow Systems: Myths, Truths and Wishful Thinking

The TruthCode-only solutions can address simple scenarios quickly…

But tend to unravel when persistence, durability, scale, timed-events, long-running processes, human workflow and other complex issues are introduced.

Copyright 2009, Thought Ascent, Inc

Page 62: Workflow Systems: Myths, Truths and Wishful Thinking

Demo:

The Faceplant Application“Social Speaking”

Copyright 2009, Thought Ascent, Inc

Page 63: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

Congratulations! You’ve done an excellent

job of not telling me

what I should do…

Page 64: Workflow Systems: Myths, Truths and Wishful Thinking

Open Discussion – When should a Workflow Tool be considered?

Copyright 2009, Thought Ascent, Inc

Page 65: Workflow Systems: Myths, Truths and Wishful Thinking

When does WF make sense?

Copyright 2009, Thought Ascent, Inc

Page 66: Workflow Systems: Myths, Truths and Wishful Thinking

Copyright 2009, Thought Ascent, Inc

I think it’s time for the bottom

line…

Page 67: Workflow Systems: Myths, Truths and Wishful Thinking

There is no simple answer…

Only the right tool for the job

Copyright 2009, Thought Ascent, Inc

Page 68: Workflow Systems: Myths, Truths and Wishful Thinking

The Right Tool for The Job might be…

“Roll Your Own” WorkflowUse an open-source Bus

NServiceBusMass TransitSimple ServiceBus

Use an open-source State management toolSimple State Machine

Use Windows WFAfter you’ve exhausted all other possibilities

Copyright 2009, Thought Ascent, Inc

Page 69: Workflow Systems: Myths, Truths and Wishful Thinking

Consider a “Workflow System” when:

Need a visual, changeable representationTimed-events are keyLong-running:

TransactionsConversations Services

Many, complex processes Economies of scale principle

Copyright 2009, Thought Ascent, Inc

Page 70: Workflow Systems: Myths, Truths and Wishful Thinking

Don’t start with a workflow system as a solution.

Get there by eliminating other options

Copyright 2009, Thought Ascent, Inc

Page 71: Workflow Systems: Myths, Truths and Wishful Thinking

And pay attention…

Software development is changing.

Copyright 2009, Thought Ascent, Inc

Page 72: Workflow Systems: Myths, Truths and Wishful Thinking

Questions?

[email protected]

Twitter: @thesatch

Code and slides available at: http://github.com/bsatrom/WorkflowSystems

Copyright 2009, Thought Ascent, Inc

Page 73: Workflow Systems: Myths, Truths and Wishful Thinking

Image Credits

WF System, InfoWorldhttp://www.infoworld.com/d/developer-world/product-review-ultimus-jump-starts-bpm-deployment-546?page=0,1

Pinnochio – House of Sims, Flickrhttp://www.flickr.com/photos/houseofsims/2662410465/

Myth – Mythbusters on Discoveryhttp://dsc.discovery.com/fansites/mythbusters/wallpaper/wallpaper.html

Steep Learning Curve – Casual Game Designhttp://www.casualgamedesign.com/?p=27

Skeptic Guy – Flickhttp://www.flickr.com/photos/mcleod/3909431214/in/set-72157607796029636

Copyright 2009, Thought Ascent, Inc