So far, we looked at a simple process flow which Is made up of a single thread of work. While in principle this already permits the declaration of simple processes, we’ll dig into more complex constructs now.
Lets look at a few exemplary cases of repetitive work: first, lets start with a blacksmith hitting a piece of metal until it’s glowing brightly red. BPMN 2.0 offers a “loop” symbol for such an activity:
The loop symbol indicates that the activity is repeated again and again; the process moves on when the event afterwards is triggered.
Obviously, we could design this in a regular flow fashion as well, but for this we’d need a way to differentiate between a glowing and not-glowing piece of metal. BPMN provides so called “conditional gateways” to do this; we’ll look at those a little while later.
Tokens and loops
Previously, we mentioned the “token” principle for describing a BPMN diagram. The token approach works well because it also raises awareness about the object of observation in the process.
For example: a process of “copy a document” starts out with one sheet of paper and produces several duplicates. So, while in the beginning we are looking at one paper, at the end of process we might be looking at several single sheets, documents or one pack of paper. It really depends on the viewpoint.
When we copy a piece of paper and then put each copied piece of paper into a box, we could document it this way:
The second activity is a “multi instance activity”. This instance basically creates additional tokens for each piece of paper. Then each token executes the step in the activity and is consumed by the end of the process.
As you can tell, the later case is an example for the sudden switch between singular “paper” and plural “copied papers”.
The difference between a regular loop and a multi-instance loop becomes clear when put into the process context. Lets compare the following two processes:
In the first process, we copy a paper, repeat the task of putting each copy into a box until we are done and then put a counter mark on our count sheet. If we had a blank count sheet before, we end up with one mark at the end.
In the second process, we copy a paper, and then for each copy we go, put it in the box and move on to put a marker on the count sheet. At the end of the process, we have a many markers on the sheet as we made copies.
See the difference? While the standard loop remains in the activity until done, the multi-instance loop creates a new token for each “object of reference” and then moves on – even if the loop is not completed yet.
Generally, when you’re switching back and forth between singular and plural variants of words you should revisit your process flow and check for inconsistencies in this regard.
To be continued
That’s it for today. Next time, we’ll dig deeper into gateways and move on into parallel processes!