Process and state models

Hand-drawn three hatched terracotta rounded boxes joined by a gently bending terracotta band, with a thinner terracotta arc from the last box back to the first, over dense small hatched cells in cream, sand, umber and moss.

Process and state models are diagrams and tables that describe how software behaves over time. A model that is easy to understand is not always easy to use correctly. In an experiment with students, activity diagrams were easier to understand than state machines but led to more errors (Felderer & Herrmann, 2018). Readers answer questions on loops and choices correctly less often than questions on order and concurrency, and rate loops the hardest pattern (Figl & Laue, 2011). How much loops matter is less certain, since a review found only weak evidence for an effect of looping flows (Figl, 2017).

An activity diagram or a BPMN (Business Process Model and Notation) model shows a flow of steps with decisions, loops and exits. A state machine, or statechart, shows the states one thing can be in and the events that move it between them. A state table lists the same transitions in rows.

Diagrams do not reliably beat text: in several experiments, adding a diagram gave no uniform gain, and text helped untrained readers more than a BPMN model did (Ottensooser et al., 2012; Albayrak, 2009; Broccia et al., 2026b). Language models draw states more reliably than the transitions between them, and in one test left out almost all self-transitions, which often stand for timeouts (Abdulkarim et al., 2026; Hatahet et al., 2025).

The notations and their use

Both kinds of model are common where teams use UML (the Unified Modeling Language, a standard family of software design diagrams). In a survey of 275 people from industry and academia, state machine and activity diagrams were among the five most used UML diagrams, used by 67 to 79 percent. They sat in the top group, with sequence, class and use case diagrams (Reggio et al., 2014). Interviews with 50 engineers in 50 companies question whether UML is the common language of software engineering, so these shares may describe UML users rather than all teams (Petre, 2013).

A flow model and a state model answer different questions about the same behaviour. A flow model follows one process from start to end, with branches, loops back and exits. A state model follows one object or component through its lifecycle, so it shows which events each state handles. General flowcharts, swimlanes and decision trees are covered in Flowcharts and timelines, and the other views of a software architecture in Architecture description and modelling.

Activity diagrams against state machines Weak evidence: few or small studies support this

Readers understood activity diagrams better than state machines but made more mistakes using them. In a controlled experiment with 84 students, activity diagrams were more comprehensible for deriving test cases by hand, yet led to more errors in the test cases (Felderer & Herrmann, 2018).

How well a reader understands a model does not predict how well they use it. In the same experiment, comprehension and errors in test derivation did not correlate, and readers’ own judgment of how well they understood did not match the measured comprehension (Felderer & Herrmann, 2018).

The better notation may depend on the domain. An earlier study by Otero and Dolado found that state diagrams gave higher comprehension of behaviour in real-time systems, while sequence diagrams did better for management information systems (Felderer & Herrmann, 2018).

Structuring state machines Weak evidence: few or small studies support this

How a state machine is split up changed how many defects inspectors found. A flat state machine draws every state at one level. A hierarchical one nests states inside composite states, and an aspect-oriented one (AspectSM) models behaviour that cuts across many states as separate pieces. In two experiments with trained graduate students, defect identification and fixing were significantly better with AspectSM than with flat or hierarchical state machines (Ali et al., 2014).

The gain in defect finding did not come with clear gains in understanding or effort. AspectSM gave better comprehension scores than flat state machines in the first experiment, but the replication by the same authors found no difference in comprehension between the three approaches. Inspection effort did not differ significantly (Ali et al., 2014). Inspectors found defects by checking each state machine against a specification written in English, into which the experimenters had seeded design defects (Ali et al., 2014).

Tabular specifications can be checked by a machine. SCR is a tabular notation for specifying system behaviour. For requirements written in it, a consistency checker automatically detects missing cases, nondeterminism (two transitions possible for one event), type errors and circular definitions. Two experiments evaluated how useful and scalable the checking was on a real avionics application (Heitmeyer et al., 1996).

Inspecting process models

Diagrams against text Weak evidence: few or small studies support this

Adding a diagram to a text description does not uniformly help readers understand or inspect it. In experiments by Ottensooser and colleagues, reading a textual description of a process raised understanding for all readers. The BPMN model raised it only for readers trained in BPMN (Ottensooser et al., 2012). An experiment with 35 subjects found that including UML diagrams in a requirements document had no significant effect on how well individuals inspected it (Albayrak, 2009).

The effect can differ between readers. In a crossover experiment, each of 38 participants worked both with and without the diagrams. Adding UML sequence diagrams to text requirements did not improve inspection for everyone. Participants who scored high on both working memory and mental rotation found fewer violations with the diagrams, though they justified the ones they found more accurately (Broccia et al., 2026b).

Expertise and inspection strategy Weak evidence: few or small studies support this

Experts inspecting process models raise more false alarms than novices. In a study where experts and novices reviewed 75 BPMN models, experts reported more defects that were not there. Both groups diagnosed syntactic errors, which break the notation’s rules, faster than semantic errors, which misstate the process (Boutin et al., 2022).

People inspecting BPMN models use no single method. In an exploratory study of how people find and classify quality issues in BPMN models, participants adopted different strategies and met several challenges (Haisjackl et al., 2016). Reading techniques for design inspection are compared in Design review.

Which control-flow patterns are hardest Weak evidence: few or small studies support this

Loops and choices are harder to read than plain sequence and parallel steps. In a study with 199 students, questions on choices were answered correctly 70% of the time and questions on loops 71%, against 85% for order and 83% for concurrency. Loops were rated the most difficult (Figl & Laue, 2011). The difference in rated difficulty was significant, but the difference in correct answers was only a trend. Its p-value of 0.058 sits just above the usual 0.05 threshold for calling a result unlikely to be chance (Figl & Laue, 2011).

Later work found the same pattern, and knowledge lowered the difficulty. In a study of 155 modellers solving 61 reasoning tasks, sequence was relatively easy while loops were difficult. Modellers with more knowledge of process modelling performed better and rated loops less difficult (Figl & Laue, 2015).

The wider literature is less sure. A review of process model comprehension research found only weak evidence for an effect of looping flows (Figl, 2017).

Layout and structure

Layout and direction Weak evidence: few or small studies support this

Layout changes how hard a diagram is to read more than whether readers answer correctly. A review found no effect of layout on comprehension accuracy in one study, though eye tracking showed less mental effort (Figl, 2017). In an eye-tracking experiment with 70 participants, models with more changes of direction drew attention to irrelevant regions. Comprehension suffered little as long as the control-flow patterns stayed visible (Figl et al., 2024). Controlled experiments on UML diagrams found that layout quality had a notable effect on cognitive load, and that good layouts combine many layout rules at once (Störrle, 2011).

The evidence on flow direction is thin. Most recommendations on whether process models should run left to right or top to bottom rest on neither scientific claims nor empirical evidence (Figl & Strembeck, 2014). Studies of reading direction in flowcharts and BPMN diagrams are covered in Flowcharts and timelines. The evidence base on layout is small: only two of the studies in the 40-study review tested layout at all (Figl, 2017).

Rules for drawing abstract graphs do not carry over unchanged to software diagrams. Experiments on abstract graphs supported fewer edge crossings and bends, but people judging UML diagrams preferred a different order of priorities. That study measured preference, not task performance (Purchase et al., 2002). In a small eye-tracking pilot with 16 subjects, crossings slowed the tracing of paths when they met at small angles but had little effect on finding nodes (Huang, 2008).

Structuredness and sub-processes Weak evidence: few or small studies support this

A fully block-structured model is not always easier to read. A process model is structured when every branch that splits joins again in a matching block. In an experiment with students reading equivalent structured and unstructured models, structuredness traded off against other properties of the model and was not an absolute requirement for understanding (Dumas et al., 2012). The seven process modelling guidelines (7PMG) synthesise research on how model structure relates to errors and understanding (Mendling et al., 2010).

Readers understood a flat model better than one split into collapsed sub-processes. In two experiments with 60 practitioners and 140 graduate students, BPMN models were best understood fully flattened, with or without visual groups. They were also better understood on paper than on a computer (Türetken et al., 2019).

Language models drawing behaviour models Weak evidence: few or small studies support this

Language models find the states of a system more reliably than the transitions between them. Drafting UML state machines, Claude 3.5 Sonnet reached an F1 score of 0.90 for states and 0.75 for transitions. F1 combines how many of the true elements a model found with how many of its elements were correct, on a scale from 0 to 1. The authors conclude that current models are not sufficient for fully automated state machine generation (Abdulkarim et al., 2026).

The omissions fall on timeouts and entry points. In state machines GPT-4o generated from C++ code, self-transitions, which often stand for timeouts, were almost entirely absent. Timeout transitions were inconsistently labelled and often lacked their duration, and start states inside substates were often missing, which broke the logical flow (Hatahet et al., 2025).

Language models are also weak at checking behaviour models. Asked directly to compare a sequence diagram with its requirements, a language model found less than 35% of the issues that experienced engineers found (Ahmed et al., 2025b).

Further reading

  • Felderer and Herrmann (2018): the experiment comparing activity diagrams and state machines, which separates comprehension from correct use.
  • Ali et al. (2014): two experiments on flat, hierarchical and aspect-oriented state machines, measured by seeded defects found.
  • Figl (2017): a review of 40 studies on how people understand process models, including loops and layout.
  • Figl and Laue (2011): the study ranking order, concurrency, loops and choices by how often readers answered correctly.
  • Hatahet et al. (2025): what a language model left out when generating state machines from code.

Known gaps

What this article cannot tell you yet.

  1. No study was found that measures whether reviewers find missing states, unhandled events, missing error paths or unbounded retries better with a state machine or process diagram than with sequence diagrams or text.
  2. No inspection study or industrial case report of reviewers missing faults in state machine models was found.
  3. State diagrams and state or transition tables were not compared for finding missing transitions.
  4. No experiment was found that compares notations for loops (a loop marker against a gateway, cycles against blocks) or tests how to route a backward edge or mark an exit or exception.
  5. No evaluation counts omitted exits, error paths or loop-backs in language-model-drawn activity, BPMN or sequence diagrams, and it is not known how the quality of generated process models changes as control flow grows more complex.
  6. How composite states in statecharts, gateway constructs in process models, and flowcharts against pseudocode affect comprehension is not covered.
  7. Most comprehension findings here come from small experiments, often with students, so they may not hold for practising reviewers.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 24 references