Part 1 of a three-part series
Any kanban-controlled workflow system can be described by combinations and variations1 of a basic pattern:

Sometimes we can simplify the diagram by replacing the kanban backflow with a simple capacity parameter2, but often it is better to show the flow of kanban explicitly. Many of the software development kanban systems we’ve seen are simple workflow systems composed by chaining this basic element:

I would like to think that any professional software engineer would be able to think up more interesting workflows than just a linear cascade. Then again, I would also like to think that any professional software engineer would understand the value of keeping things simple. I have personally come to prefer a more symmetrical call-stack style of flow for software development, because I believe that any person who requests custom work should also be responsible for approving the completion of that work. Consumers pull value from producers, not the other way around:

Petri nets are ideal for describing workflow systems because they are a) concurrent; b) formal, simulable, and sometimes even verifiable; and c) relatively easy to read by humans. Any Petri net that can be drawn without crossing edges can easily be made into a “card wall” for visual control3:

Sometimes a different workflow is needed, depending on the kind of thing being made:

Some tasks can be done in parallel by specialized resources:

When we split tokens, we may need to keep track of their common ancestor so that we can merge them again. Colored Petri nets let us associate composite work items across branches:

Sometimes a large work item can be decomposed into smaller work items of a similar type. We might think of a branching workflow to model this, but that is hard to do if we don’t know how many component work items will be created. Petri nets allow us to take another approach by generating new tokens in-place and then executing them concurrently on the same workflow branch:

When all of the unit work items are complete, they are integrated into their parent work item:

While that might look a little complicated, in practice it’s as simple as the “2-tier” style (or n-tier) cardwall that is often used for project management:

A state transition is a black box that may have some internal process. We might expose that process with a hierarchical model. Alternately, we might want to collapse extraneous diagram detail into a single supertransition. Hierarchy is a simple syntax extension to any workflow model.
Feedback should be considered implicit to any creative process, but it can complicate these models without much benefit to understanding4. In practice, kanban systems regulate feedback very well, because the limits serve as a ratchet function that gracefully responds to feedback and damps oscillation. A process operating at capacity will not accept new work, and a process operating over capacity will also not accept new work. Again, it’s awkward to model “over capacity” so we have to be mindful to treat our models for what they are: models.
Once we understand some of these basic design elements, we can use them to describe or design a wide variety of product development processes. A computer scientist armed with Petri nets and a bit of knowledge about queueing, networks, and processor scheduling has some wicked tools at his disposal for Value Stream Analysis.
1. Some variations involve rules about queue placement and timing of the kanban backflow. GKCS and EKCS are examples in the literature. I wrote about some of that here.
2. Whether or not you can simplify in this way depends on which queuing rules are used.
3. I debated using the blink tag for this point.
4. You can usually cheat by adding an “escape” transition to send all feedback to the beginning of the model and allow it to repropagate downstream without friction. Feedback is easier to account for in matrix representations than in graphic representations. Feedback in a dependency matrix looks like row elements or “rabbit ears” on the “wrong” side of the diagonal.




Daily Links for Tuesday, June 9th, 2009 | LaptopHeaven's Blog | 09-Jun-09 at 4:36 am | Permalink
[...] Patterns of software engineering workflow (part 1) | Lean Software Engineering [...]
Dew Drop - June 9, 2009 | Alvin Ashcraft's Morning Dew | 09-Jun-09 at 6:04 am | Permalink
[...] Patterns of software engineering workflow (part 1) (Corey Ladas) [...]
Agile Management by David Anderson | 10-Jun-09 at 11:20 am | Permalink
Kanban Blogosphere Roundup June 10th…
In today's Kanban blog roundup, we have this very nice Kanban process description from the Going…
Daily Links for Tuesday, June 9th, 2009 | 10-Jun-09 at 5:45 pm | Permalink
[...] Patterns of software engineering workflow (part 1) | Lean Software Engineering [...]
Sebastiano | 12-Jun-09 at 1:13 am | Permalink
Hi Corey,
could you give me some hints about how to estimate the costs of a feature in a pure kanban system?
If I break the MMF into stories and then I estimate the stories with story points or similar maybe I can have the chance to evaluate costs “just in time”, but are there more standardized ways to evaluate costs in an agile environment like this?
Corey Ladas | 12-Jun-09 at 9:42 am | Permalink
Hi Sebastiano,
If you really have to estimate feature-by-feature costs, then you’ll probably have to use something like story points. You’ll also want to use a weighted story-point-throughput, because it might not take 9 times as long to deliver a 9 point story as a 1 point story. The more similarly-sized your stories are, the easier this gets.
Sebastiano | 12-Jun-09 at 12:16 pm | Permalink
Corey, thanks for your answer.
I think feature cost estimastion is as important as good progresses reporting (under the stakeholder point of view), also to justify the feature prioritization (or even avoid a feature development).
Actually I find Cost management a weird issue, what I mean is that I’m studying and assimiliating a lot of new interesting theory to apply on game development, but it looks like feature cost estimation is understimated, not so much discussed in agile enviroment.
So, you think it is a very empirical practice?
Corey Ladas | 12-Jun-09 at 1:19 pm | Permalink
I think one of the advantages of using a Lean approach is exactly that it makes accounting easier. The thing about throughput metrics is they help you to measure cost instead of estimate cost.
Q: How much will this feature cost?
A: About as much as each of the last 37 features cost.
If you make a histogram of your cycle times, it might tell you something interesting about feature sizes.
Richard Hensley | 15-Jun-09 at 2:36 pm | Permalink
I will jump on the measure cost instead of estimate cost band wagon. It took us about 2 weeks into our kanban implementation to realize all estimating was completely wasted energy.
We track adherence to SLA, cycle times, through put, work allocation, and quality.
The interesting thing is that cost to produce value changes very slowly over time. We know our staffing and infrastructure costs on a weekly basis, we also know the number of features we produce in a week. So, a feature will cost pretty close to the same as the other features.
The key for us has been tracking and ensuring that we stick to our service level agreements on cycle times. Turns out that it takes the all members participating along our value stream to keep the SLA intact.
Corey Ladas | 15-Jun-09 at 3:44 pm | Permalink
Thank you, Richard, that’s a great story. Sounds like your process has stabilized. Do people seem happy with the pace?
Richard Hensley | 16-Jun-09 at 1:13 pm | Permalink
People are happy with the pace. However, the level of transparency provided by the metrics and the kanban board have upset folks due to work allocation.
Basically, we surfaced something that engineering knew but could not quantify. We surfaced that we were spending in excess of 70% of our capacity on rework and technical debt repayment. We were ignoring much of this needed rework and allowing it to build. This was primarily due to the implementation of Scrum in our context. We were very much a doing lots of stuff, barely getting it done, and adding quality. We flipped that to focusing on quality, getting things done, and limiting what we are doing.
The focus on quality combined with the metrics has made the technical debt problem stick out. So, we are fixing it. Because we are tracking our trends and metrics closely, we can are seeing a decline in the rework, and predict a stabilization point. As the allocation to rework declines, the allocation to features goes up. We are also seeing a consequent increase in our feature through put, which is what the system is all about.
Corey Ladas | 16-Jun-09 at 1:37 pm | Permalink
That is such a powerful lesson. Thank you for sharing!
Sebastiano | 02-Jul-09 at 1:03 am | Permalink
I read now your answers
.
.
It’s ok but I can’t understand how you can prioritize if you can’t estimate.
Isn’t the prioritazion a process based on the ratio between the feature value and the feature cost? Or you prioritize using gut feelings (that probably is very possible too)?
I thought for a long while about the idea to think about to create equally sized stories and eventually I could guess that maybe it’s possible.
So if the story become an unit, I was thinking if it could have been different to measure a feature size in terms of number of stories.
But as you know all of this is just a mental excercise, since I can’t even test it in my current environment
What I know is that I’m looking forward to test Kanban in a real environment, since I’m sure it a great step forward compared to the basic scrum process.
Sebastiano | 02-Jul-09 at 1:07 am | Permalink
About the tracking instead, I love the fact that Kanban introduces much more precise metrics that I missed a lot when I used pure scrum.
.
Personally I think that the most important difference between commonsense and agile methodologies eventually is the tracking process, because thanks to the tracking you can be aware of what you are doing and then you can improve yourself
Corey Ladas | 02-Jul-09 at 8:52 am | Permalink
Making the stories similarly sized means the cost for everything is similar and you prioritize on value alone. Reinertsen’s advice is to prioritize based on the cost of delay. If that cost is difficult to calculate, I wrote a couple of articles about consensus prioritization.
The point about estimation is not to do it or avoid it for moral reasons, it’s about cost and value. Estimation can have high cost and low value. We want to make it cheaper and the cheapest estimation of all is no estimation. A histogram of cycle times will tell you how much effort is worth investing in estimation. Some people do estimate with kanban systems, and you can limit something like function points instead of cards. My first suggestion would be to very quickly triage work items into two categories when they show up in the design queue: too-big / not-too-big. Not-too-big items go forward. Too-big items are requeued for further analysis. You can reduce the number of too-big work requests by making QA part of the analysis process. Right-sizing features is a matter of analysis skill and it can be learned.
Sebastiano | 03-Jul-09 at 12:14 pm | Permalink
thanks Corey, kind as usual.
Patterns of software engineering workflow | 11-Jul-09 at 7:25 pm | Permalink
[...] 25, 2009 03:36 by Chad Albrecht Corey Ladas has a good post on Kanban-controlled workflow systems here. 39ab478f-77a6-4d82-95d6-08c006fd5db3|0|.0 Tags: kanban, patterns, workflow Categories: Software [...]
gaya | 19-Aug-09 at 2:39 am | Permalink
good and fine book