Data and states
Cancellation does not erase work performed. Which conditions ensure a valid result?
Work may have been performed during a shift that was cancelled.
Starting point Device and event identifiers form the deduplication key.
Assumptions for the example case
A fictional maintenance operation with a defined qualification for each shift. The example requires 11 hours of rest between planned shifts; this is an exercise assumption and does not replace an employment-law review. All quantities, thresholds and operational objectives are illustrative assumptions.
Separate planned and actual work
Planned and actual work as separate state machines
Shift plan
Actual time
Cancelling a plan preserves actual work; the time entry is retained and deviations go for review.
State transitions and completion
| Starting point | Condition and effect | Subsequent state |
|---|---|---|
| Proposed | Eligibility and timing rules satisfied | Confirmed |
| Proposed | Rule test fails | Rejected |
| Confirmed | Cancellation authorised before the shift starts | Cancelled |
| Confirmed | Shift time ended; actual times fully checked | Ready for handover |
| Time entry pending | Contradiction between devices | Under review |
| Under review | A time reviewer confirms a correction linked to the original | Verified |
Proposed
- Condition and effect
- Eligibility and timing rules satisfied
- Subsequent state
- Confirmed
Proposed
- Condition and effect
- Rule test fails
- Subsequent state
- Rejected
Confirmed
- Condition and effect
- Cancellation authorised before the shift starts
- Subsequent state
- Cancelled
Confirmed
- Condition and effect
- Shift time ended; actual times fully checked
- Subsequent state
- Ready for handover
Time entry pending
- Condition and effect
- Contradiction between devices
- Subsequent state
- Under review
Under review
- Condition and effect
- A time reviewer confirms a correction linked to the original
- Subsequent state
- Verified
Cancellation does not erase work performed.
The time account remains independent.
Work may have been performed during a shift that was cancelled.
Confirmed→Cancelled preserves history. Late booking will be accepted and verified; it will not be discarded by cancellation.
- Alternative considered
- Deleting with the plan destroys proof.
- Trade-off
- Some cases still require review.
- Reassess
- Frequent deviations require process verification.
Try it yourself
Draw cancellation and subsequent actual booking.
A hint for your attempt
Work may have been performed during a shift that was cancelled.
Compare with a possible solution
- Plan
- Confirmed→Cancelled preserves history.
- Actual work
- Late booking will be accepted and verified; it will not be discarded by cancellation.
Apply to your project
How does this principle apply in your own project: Cancellation does not erase work performed.