System Design Atlas

Water leak detection and repair orders

05 / 10Worked example

Authoritative data and states

How does a confirmed finding receive only one active work order under concurrent processing?

The interfaces require an authoritative state. Investigation must confirm a suspected leak before it becomes a confirmed finding. B-111 has at most one active work order. A repair report requires post-repair inspection before the incident can be closed. The following table distinguishes current states from the evidence that created them.

Starting point Use the station and sequence as a stable measurement identity.

Assumptions for the example case

This fictional worked design assumes a bounded metering zone, minute-by-minute flow readings, manual confirmation of findings and one active repair order per confirmed finding. Numbers and quality targets are illustrative test assumptions. Automatic valve control, full hydraulic simulation and drinking water quality assessment are outside scope.

Data relationships and permitted transitions

Reading sequence and work order lifecycle

M-11120.01 · Valid
Minute +120.01 · Valid
Minute +220.01 · Valid
drei Werte → V-111successively
Suspected leak V-111Open investigation
verdacht → widerlegt or bestätigtbestätigt → beauftragt → repariertrepariert → abgeschlossen or nacharbeit

The reading sequence creates V-111; B-111 has exactly R-111; repair and post-repair inspection remain separate evidence.

Two people confirm the same finding. Store exactly one active work order per finding. R-111 is created once.

Entities and relationships

EntityAuthoritative dataResponsibility
Measuring station M-111Measurement time, sequence, litre/min, qualityBelongs to a metering zone through a versioned assignment.
Suspected leak V-111Three readings, rule version, time rangeJustifies investigation; it is not a confirmed leak diagnosis.
Finding B-111Location, verification, confirmationHas at most one active repair order.
Repair order R-111Ownership, work, post-repair inspectionCompletion needs confirmed restoration.
Network section N-111Geometry, assignment versionHistorical measurements retain their original context.

Measuring station M-111

Authoritative data
Measurement time, sequence, litre/min, quality
Responsibility
Belongs to a metering zone through a versioned assignment.

Suspected leak V-111

Authoritative data
Three readings, rule version, time range
Responsibility
Justifies investigation; it is not a confirmed leak diagnosis.

Finding B-111

Authoritative data
Location, verification, confirmation
Responsibility
Has at most one active repair order.

Repair order R-111

Authoritative data
Ownership, work, post-repair inspection
Responsibility
Completion needs confirmed restoration.

Network section N-111

Authoritative data
Geometry, assignment version
Responsibility
Historical measurements retain their original context.

Permitted state transitions

Starting pointTargetCondition
unauffälligverdachtThree valid consecutive minute values exceed the threshold.
verdachtwiderlegtControl room documents plausible other cause.
verdachtbestätigtThe investigation provides evidence for the finding.
bestätigtbeauftragtR-111 is created once.
beauftragtrepariertField service documents work.
repariertabgeschlossenFollow-up inspection proves restoration.
repariertnacharbeitPost-repair readings remain abnormal; the same finding stays open.

unauffällig

Target
verdacht
Condition
Three valid consecutive minute values exceed the threshold.

verdacht

Target
widerlegt
Condition
Control room documents plausible other cause.

verdacht

Target
bestätigt
Condition
The investigation provides evidence for the finding.

bestätigt

Target
beauftragt
Condition
R-111 is created once.

beauftragt

Target
repariert
Condition
Field service documents work.

repariert

Target
abgeschlossen
Condition
Follow-up inspection proves restoration.

repariert

Target
nacharbeit
Condition
Post-repair readings remain abnormal; the same finding stays open.

Assign the work order once

Assign the work order once

Store exactly one active order per finding.

Two people confirm the same finding.

R-111 is created once.

Alternative considered
Only UI lock does not prevent parallel processing.
Trade-off
Combined findings need rules.
Reassess
A finding requires several separate trades.

Terms in this step

Assign the work order once
R-111 is created once.

Try it yourself

Two people concurrently create a work order for B-111. Give both execution orders and the test oracle.

A hint for your attempt

Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.

Compare with a possible solution
First part of the solution
The first commit creates R-111; the second reads the existing active allocation.
Second part of the solution
In reverse order, only the person acting first changes. B-111 always has exactly one active order.

Apply to your project

Which corresponding assumption in your project would you check first? Consider this trigger: A finding requires several separate trades.

Step 6 examines: connect time series and work orders.