Flow

EntityDraftv1.0.0-rc.2

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
  • idRequired
    textnot empty

    The record's id: unique within the document. Fields that point at the record hold this id.

  • name
    text

    The name people use for the record.

  • description
    text

    What the record is, in words.

  • identifiers

    Ids the record has in other systems.

  • links

    Open-ended links to other records.

  • createdAt
    date-time (RFC 3339)

    When the record was created, in its producer's system.

  • updatedAt
    date-time (RFC 3339)

    When the record last changed, in its producer's system.

  • version
    text

    The flow's version.

  • frameworks

    The frameworks the flow judges against.

  • steps
    List ofPartStep

    The steps.

  • edges
    List ofPartEdge

    The links between steps.

  • variables

    The method's parameters.

  • embedded
    true or false

    True when the flow runs only as a step of other flows.

Links

Held by Records that embed this one, with their field that holds it.

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 example

Minimal example: the required fields only

{
  "id": "flow-1"
}

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