← Files Computable Systems EngineeringARCHIVED FILE
examples/function-flow/water-treatment.json
4.36 KB · Dec 3, 2026 · 18:30 UTC
{
"version": "function-flow-1.0",
"finite_model": {
"version": 2,
"actors": {
"Clerk": {},
"System": {}
},
"properties": {
"Enabled": {
"type": "bool",
"owner": "controlled"
}
},
"data": {
"Request": {
"type": "int",
"min": 0,
"max": 10,
"unit": "litres",
"scale": "1"
},
"Ready": {
"type": "int",
"min": 0,
"max": 10,
"unit": "litres",
"scale": "1"
},
"Result": {
"type": "int",
"min": 0,
"max": 10,
"unit": "litres",
"scale": "1"
}
},
"exchanges": {},
"statements": {},
"traces": [],
"scenarios": {
"Routine": {
"start": "start",
"initial": {
"Enabled": false
},
"initial_data": [
"Request"
],
"terminal": {
"done": "Proposed work complete"
},
"completion": [
"done"
],
"require_completion": true,
"steps": {
"SPrepare": {
"from": "start",
"to": "ready",
"effects": {
"Enabled": true
},
"consumes": [
"Request"
],
"produces": [
"Ready"
]
},
"SComplete": {
"from": "ready",
"to": "done",
"guard": {
"ref": "Enabled",
"op": "==",
"value": true
},
"consumes": [
"Ready"
],
"produces": [
"Result"
]
}
}
}
}
},
"finite_model_sha256": "3b6ef8545c53d4d4f1b21ef873de6946882c82727d26bb96b1f66f5db5dd7a9d",
"functions": {
"Prepare": {
"label": "Filter sample",
"transformation": "Filter sample. Synthetic proposed transformation, not proof.",
"inputs": {
"request": {
"data": "Request",
"type": "int",
"unit": "litres"
}
},
"outputs": {
"ready": {
"data": "Ready",
"type": "int",
"unit": "litres"
}
},
"enabling": null,
"performers": [
"Clerk",
"System"
],
"accountable": [
"Clerk"
]
},
"Complete": {
"label": "Measure treated sample",
"transformation": "Measure treated sample. Synthetic proposed transformation, not proof.",
"inputs": {
"ready": {
"data": "Ready",
"type": "int",
"unit": "litres"
}
},
"outputs": {
"result": {
"data": "Result",
"type": "int",
"unit": "litres"
}
},
"enabling": {
"ref": "Enabled",
"op": "==",
"value": true
},
"performers": [
"Clerk",
"System"
],
"accountable": [
"Clerk"
]
},
"Handle": {
"label": "Treat sample",
"transformation": "Treat sample. Synthetic proposed transformation, not proof.",
"inputs": {
"request": {
"data": "Request",
"type": "int",
"unit": "litres"
}
},
"outputs": {
"result": {
"data": "Result",
"type": "int",
"unit": "litres"
}
},
"enabling": null,
"performers": [
"Clerk",
"System"
],
"accountable": [
"Clerk"
]
}
},
"flows": {
"Handover": {
"from": "Prepare",
"output": "ready",
"to": "Complete",
"input": "ready"
}
},
"step_bindings": {
"Routine": {
"SPrepare": "Prepare",
"SComplete": "Complete"
}
},
"decompositions": {
"Breakdown": {
"parent": "Handle",
"children": [
"Prepare",
"Complete"
],
"inputs": [
{
"parent_port": "request",
"child": "Prepare",
"child_port": "request"
}
],
"outputs": [
{
"parent_port": "result",
"child": "Complete",
"child_port": "result"
}
]
}
},
"policy": {
"accountable": "exactly_one",
"performers_required": true
},
"limits": {
"state_cap": 10000,
"assignment_cap": 10000
}
}
SHA-256: 28bc03da3ac9d901522fb03508a739980cfb07067fad97a9f979645ac08471ca