Flow
A flow: the steps of an evaluation and the edges between them. A flow can run another flow as one of its steps.
https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Flow.json
Fields
Every entity also has the fields of the Entity base. The first row lists them.
From the Entity baseidnamedescriptionidentifierslinkscreatedAtupdatedAt
idRequiredtextnot emptyThe record's id: unique within the document. Fields that point at the record hold this id.
nametextThe name people use for the record.
descriptiontextWhat the record is, in words.
identifiersList ofDatatypeIdentifierIds the record has in other systems.
linksList ofDatatypeLinkOpen-ended links to other records.
createdAtdate-time (RFC 3339)When the record was created, in its producer's system.
updatedAtdate-time (RFC 3339)When the record last changed, in its producer's system.
versiontextThe flow's version.
frameworksList ofId ofFrameworkThe frameworks the flow judges against.
stepsList ofPartStepThe steps.
edgesList ofPartEdgeThe links between steps.
variablesList ofPartVariableThe method's parameters.
embeddedtrue or falseTrue when the flow runs only as a step of other flows.
Links
Holds Parts this record embeds, with the field that holds each.
- StepPartstepsOne unit of work in a flow, such as a calculation, a question, a decision or a run of an algorithm. A sealed step names its inputs, its outputs and the algorithm it claims to follow, but not how it works.
- EdgePartedgesA link from one step of a flow to the next. Its
whensays when the flow takes it. - VariablePartvariablesA named Value or formula that criteria and steps refer to, such as a framework's limit or a method's parameter.
Points at Records whose ids this record holds, with the field that holds each.
Held by Records that embed this one, with their field that holds it.
Pointed at by Records that hold this one's id, with their field that holds it.
- RegulatorProfileEntityflowsA framework written so that a program can run it. It names the framework, the flows that check it, who publishes it and its version. Its flows have no sealed steps, so any reader can run every rule.
- StepPartflowOne unit of work in a flow, such as a calculation, a question, a decision or a run of an algorithm. A sealed step names its inputs, its outputs and the algorithm it claims to follow, but not how it works.
- TraceEntityflowWhat one run of a flow or an algorithm did: what it used, each step, what it made, and the verdict. Its terms follow W3C PROV where they map: agents (prov:wasAssociatedWith), inputs (prov:used), outputs (prov:generated).
Examples
An id that another example defines opens that record.
Full example
{
"id": "flow-d038",
"name": "Directive 038 compliance",
"version": "3",
"frameworks": [
"framework-d038"
],
"steps": [
{
"id": "step-1",
"type": "entrypoint"
},
{
"id": "step-ask-hours",
"type": "question",
"label": "How many hours a day does the compressor run?",
"question": {
"answerType": "number",
"unit": "h"
},
"outputs": [
{
"name": "hours_per_day",
"unit": "h",
"valueType": "number"
}
]
},
{
"id": "step-propagation",
"type": "algorithm",
"name": "Sound levels at receptors",
"algorithm": "algorithm-iso9613",
"sealed": true,
"inputs": [
{
"name": "sources",
"valueType": "list"
},
{
"name": "receptors",
"valueType": "list"
}
],
"outputs": [
{
"name": "receptor_levels",
"quantity": "a_weighted_sound_pressure_level",
"unit": "dB",
"valueType": "list"
}
]
},
{
"id": "step-compare",
"type": "decision",
"name": "Compare with the permissible sound level"
},
{
"id": "step-mitigation",
"type": "outcome",
"name": "Mitigation needed"
}
],
"edges": [
{
"from": "step-1",
"to": "step-ask-hours"
},
{
"from": "step-ask-hours",
"to": "step-propagation"
},
{
"from": "step-propagation",
"to": "step-compare"
},
{
"id": "edge-over-limit",
"from": "step-compare",
"to": "step-mitigation",
"label": "Over the limit",
"when": {
"operation": "greater",
"arguments": [
{
"variable": "night_level"
},
{
"variable": "variable-night-psl"
}
]
}
}
]
}Show 1 more exampleHide the other example
Minimal example: the required fields only
{
"id": "flow-1"
}Changes and file
Changes
- 0.1.0 First version.
Schema file
Show the JSON SchemaHide the JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Flow.json",
"title": "Flow",
"description": "A flow: the steps of an evaluation and the edges between them. A flow can run another flow as one of its steps.",
"$ref": "Entity.json",
"type": "object",
"properties": {
"version": {
"type": "string",
"description": "The flow's version."
},
"frameworks": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"x-ods-ref": "Framework"
},
"description": "The frameworks the flow judges against."
},
"steps": {
"type": "array",
"items": {
"$ref": "Step.json"
},
"description": "The steps."
},
"edges": {
"type": "array",
"items": {
"$ref": "Edge.json"
},
"description": "The links between steps."
},
"variables": {
"type": "array",
"items": {
"$ref": "Variable.json"
},
"description": "The method's parameters."
},
"embedded": {
"type": "boolean",
"description": "True when the flow runs only as a step of other flows."
}
},
"patternProperties": {
"^x-": {}
},
"unevaluatedProperties": false,
"examples": [
{
"id": "flow-1"
},
{
"id": "flow-d038",
"name": "Directive 038 compliance",
"version": "3",
"frameworks": [
"framework-d038"
],
"steps": [
{
"id": "step-1",
"type": "entrypoint"
},
{
"id": "step-ask-hours",
"type": "question",
"label": "How many hours a day does the compressor run?",
"question": {
"answerType": "number",
"unit": "h"
},
"outputs": [
{
"name": "hours_per_day",
"unit": "h",
"valueType": "number"
}
]
},
{
"id": "step-propagation",
"type": "algorithm",
"name": "Sound levels at receptors",
"algorithm": "algorithm-iso9613",
"sealed": true,
"inputs": [
{
"name": "sources",
"valueType": "list"
},
{
"name": "receptors",
"valueType": "list"
}
],
"outputs": [
{
"name": "receptor_levels",
"quantity": "a_weighted_sound_pressure_level",
"unit": "dB",
"valueType": "list"
}
]
},
{
"id": "step-compare",
"type": "decision",
"name": "Compare with the permissible sound level"
},
{
"id": "step-mitigation",
"type": "outcome",
"name": "Mitigation needed"
}
],
"edges": [
{
"from": "step-1",
"to": "step-ask-hours"
},
{
"from": "step-ask-hours",
"to": "step-propagation"
},
{
"from": "step-propagation",
"to": "step-compare"
},
{
"id": "edge-over-limit",
"from": "step-compare",
"to": "step-mitigation",
"label": "Over the limit",
"when": {
"operation": "greater",
"arguments": [
{
"variable": "night_level"
},
{
"variable": "variable-night-psl"
}
]
}
}
]
}
],
"x-ods-status": "draft",
"x-ods-kind": "entity",
"x-ods-module": "core",
"x-ods-changes": {
"0.1.0": "First version."
}
}