Guest post by Paweł Misiurewicz, CEO and shareholder of Datapolis. Follow him @pawelmis
In today’s corporate world business processes are present everywhere. But their sequential automation is not sufficient anymore. It reduces the people taking part in them to simple machine-like elements. Fortunately, in the SharePoint environment apart from sequential workflows we can use another type: state machine workflows. This article will show which type suits your needs better.
State machine and sequential workflows
The concept of workflow comes from the time when work was rather mechanical. People (and later machines) were supposed to repeat precisely defined steps in a fixed sequence. Any deviation from prescribed path, any thinking or improvising was not welcome.
Let us take a look at the example probably familiar to most of us: a GPS navigation. When you set your destination, the GPS shows you the way with detailed instructions where to turn or where to go straight ahead. There is only one itinerary and one sequence of moves. You follow them by mechanically performing instructions defined by your navigation system, neither thinking nor making decisions. It’s a sequential process.
On the other hand, imagine a map with just a starting point and your goal. You want to reach your final destination, but on the way you make some decisions that may change your course. You may decide to visit another city, take a scenic route instead of a highway, stop for lunch or go back to the city you already visited. Of course choices are not unlimited so eventually you will reach the end point, but you decide how to compose your itinerary. It’s a state machine workflow. The journey moves from one state to another whenever you decide it.
Coming back to business processes, imagine a Contract Approval workflow that has to include three approvals: one from the Legal Department, one from the Finance Department and one from your boss. Let’s assume you may get them in any order. In a sequential process that order is predesigned, for instance first Legal Department, then Finance, and finally your boss. You cannot change it. In the state machine process, however, it’s the user who decides which approval he wants to get first. The only requirement is that in the end he has to get all three.
State machine model clearly separates states in which a process awaits a specific action to be performed (approval of a document, its verification, rejection, asking for corrections etc.), and transitions which may be a single action or a sequence. Usually states are places where people make decisions, while actions are programmed and performed by a machine. Sequential model mixes it all in one schema.
Sequential workflows are therefore predictable and in control of the process. State machine workflows in turn are controlled by external factors (people, for example) and may have many paths leading to the end point.
How does it affect business?
Let’s take a look at the first example – Contract Approval – to better understand the problem. As we mentioned before, we have to receive three approvals: Legal, Finance and Boss.
The sequential process will look like this:
The state machine process will be:
At this point the sequential process is a better choice. It clearly guides you from start to end.
But in many cases users may have their own preferences about the order of approvals. They might, for example, know that the lawyer makes many changes, so they want him to be the first. Or perhaps the boss is going on holiday so it is he who should now approve the document? You might like to put all these choices in the process.
With state machine process we don’t have to change anything because the order of approvals is not built in the design. Sequential process, however, has to have all the choices and alternate paths hardwired, so the final schema will look like this:
What will happen if we now add a fourth Approver (Second Boss, for example)? In state machine we need to add just one more state:
In a sequential process we have to add fourth approver in all branches, plus fourth condition (“if”) and new branches. Try to imagine what the chart will look like!
Advantages of state machine workflows
This gives us the first very important advantage of state machine workflows: flexibility, both in the way the workflows are run and in implementing changes.
A quick look at both diagrams instantly shows us the next difference: readability. Business processes require cooperation of many different people inside and outside of the company. A common platform understandable by everyone is the first important thing to enable cooperation. If this requirement fails, it makes collaboration very difficult, if not impossible.
It’s also critical for the user to see and understand the whole process in order to make a decision. Here readability is the key to process management. Managers who have a broad picture of the current state of action can see in which phase all the processes are at any given time. Then they can analyze them, find bottlenecks and optimize the process by finding shortest (or quickest) paths based on its current behavior and history.
State machine is the human approach to workflows. When we think about processes, we are usually wondering about their current status (state of the workflow) and what will happen or should be done next (action). When one draws the process representation, it looks more or less like this:
That’s exactly what a state machine process diagram looks like. Why to translate this into a sequential workflow if we can leave it in the same form it was designed?
Most, if not all, workflows may be implemented using either of those process types. If you want people to follow only the narrowly defined path with low level of control over the process, sequential workflow may be, in some cases, desirable. However, state machine workflows have clear advantages and are the most prospective choice in rapidly changing business environments.
The article was originally published on Nothing But SharePoint.