Interfaces
How does the contract for “release maintenance” distinguish a repetition from a new intention?
The load profile meets the specific change instruction “Release maintenance”. Its contents consist of machine, measurement window, model revision, findings and review results. An idempotency key detects the same intention after a loss of response; an aggregate version protects the changed business state.
Starting point Test measurement rate and concurrent finding updates separately.
Assumptions for the example case
Own fictitious example design. Fictional suggestions for a single machine based on vibration trends, with human approval of work orders. Measurement windows last 60 seconds and are closed on the left, open on the right; a measurement at exactly 60 seconds belongs in the next window. All figures and test goals are illustrative assumptions.
Commands, retries and current state
Approval, commit and replay
The maintenance API binds the machine, window, model revision, finding and review result.
Proposed API for this example
- POST
/maschineninstandhaltung/{id}/commandsRelease maintenance
- Input
- Machine, measurement window, model revision, findings and review results; expected aggregate version, authorized role and stable command key.
- Result
- Durably stored business result and new version; version or content conflicts produce no partial effects. An accepted external request receives an open status.
- Retry behaviour
- The key is scoped to the actor, operation and business object. After authentication, first compare the existing result and canonical content: identical content returns the stored evidence; changed content produces a conflict. Only new keys trigger validation of the current version.
- GET
/maschineninstandhaltung/{id}Read the current business state and reason for investigation.
- Input
- Authorised identity and business object.
- Result
- Maintenance finding with its current version, evidence and reason for any unresolved work.
- Retry behaviour
- Repeating a read creates no business change; access is checked again.
Additional state changes
| Operation | Input | Result and protection |
|---|---|---|
| Ingest a measurement window | Machine, window start, end, values and completeness | Same window contents once; deviation generates a need for revision or clarification. |
| Propose a finding | Window reference, model revision and reasoned score | One suggestion per combination; no physical equipment effect. |
| Dismiss a finding | Maintenance reviewer, version and review rationale | Under review → dismissed without a maintenance order. |
| Complete maintenance | Maintenance, released order and actual report | Released → done; report remains linked to the finding. |
Ingest a measurement window
- Input
- Machine, window start, end, values and completeness
- Result and protection
- Same window contents once; deviation generates a need for revision or clarification.
Propose a finding
- Input
- Window reference, model revision and reasoned score
- Result and protection
- One suggestion per combination; no physical equipment effect.
Dismiss a finding
- Input
- Maintenance reviewer, version and review rationale
- Result and protection
- Under review → dismissed without a maintenance order.
Complete maintenance
- Input
- Maintenance, released order and actual report
- Result and protection
- Released → done; report remains linked to the finding.
Messages across the external boundary
- Source contract
- NIST describes condition monitoring and prognostics as supporting industrial decisions. Our windows and release rules are illustrative assumptions.
- System responsibility
- Model processing uniquely stores findings and window reference. Two examiners attempt release and rejection. The local version serializes the decisions; only the successful release commit creates a maintenance order.
Approval identifies the measurement window and model revision
Approval identifies the measurement window and model revision.
Releasing maintenance can re-arrive after a lost response.
Machine, measurement window, model revision, result and review result must remain the same for Replay. The exercise specifies the input and expected result.
- Alternative considered
- A key stored only in volatile memory loses its evidence on restart.
- Trade-off
- The maintenance-approval journal requires durable retention and protected access.
- Reassess
- The documented retry window and journal volume determine the future archiving strategy.
Try it yourself
Predict the results for identical repetition of “Release maintenance”, the same key with a different model revision and a new key with an old version.
A hint for your attempt
Retry identity and current state require separate checks.
Compare with a possible solution
- Identical
- The saved result for maintenance finding B-30 is returned; the effect is not repeated.
- Changed
- The same key with altered canonical content results in conflict.
- New intent with a stale version
- A new key with a stale version is rejected before any business change. The interface reloads the current state and asks the user to confirm the decision again.
Apply to your project
Which input fields make two change intentions different in your project?