Edge
PartDraftv1.0.0-rc.2
An edge: a link from one step of a flow to the next. Its when says when the flow takes it.
https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Edge.json
Fields
idtextnot emptyThe record's id: unique within the document.
fromRequiredThe step the edge leaves.
toRequiredThe step the edge goes to.
whenWhen the flow takes the edge. Leave it out when the flow always takes it.
labeltextThe text a person sees for the choice.
prioritynumberWhich edge the flow tests first when several leave one step: higher first.
Links
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.
Examples
An id that another example defines opens that record.
Example 2
{
"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
Example 1
{
"from": "step-1",
"to": "step-ask-hours"
}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/Edge.json",
"title": "Edge",
"description": "An edge: a link from one step of a flow to the next. Its `when` says when the flow takes it.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "The record's id: unique within the document."
},
"from": {
"type": "string",
"minLength": 1,
"x-ods-ref": "Step",
"description": "The step the edge leaves."
},
"to": {
"type": "string",
"minLength": 1,
"x-ods-ref": "Step",
"description": "The step the edge goes to."
},
"when": {
"$ref": "Expression.json",
"description": "When the flow takes the edge. Leave it out when the flow always takes it."
},
"label": {
"type": "string",
"description": "The text a person sees for the choice."
},
"priority": {
"type": "number",
"description": "Which edge the flow tests first when several leave one step: higher first."
}
},
"required": [
"from",
"to"
],
"patternProperties": {
"^x-": {}
},
"unevaluatedProperties": false,
"examples": [
{
"from": "step-1",
"to": "step-ask-hours"
},
{
"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": "part",
"x-ods-module": "core",
"x-ods-changes": {
"0.1.0": "First version."
}
}