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

  • id
    textnot empty

    The record's id: unique within the document.

  • fromRequired

    The step the edge leaves.

  • toRequired

    The step the edge goes to.

  • when

    When the flow takes the edge. Leave it out when the flow always takes it.

  • label
    text

    The text a person sees for the choice.

  • priority
    number

    Which edge the flow tests first when several leave one step: higher first.

Links

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 example

Example 1

{
  "from": "step-1",
  "to": "step-ask-hours"
}

Changes and file

Changes

  1. 0.1.0 First version.

Schema file

Show 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."
  }
}