{
  "format": 3,
  "id": "door",
  "title": "Door: a finite state machine",
  "direction": "right",
  "layers": {
    "process": {
      "label": "Process"
    }
  },
  "lanes": {},
  "frames": {},
  "nodes": {
    "start": {
      "label": "Start",
      "layer": "process",
      "box": [
        16,
        28,
        60,
        36
      ]
    },
    "closed": {
      "label": "Closed",
      "layer": "process",
      "box": [
        324.099,
        28,
        66,
        36
      ]
    },
    "open": {
      "label": "Open",
      "layer": "process",
      "box": [
        692.1919999999999,
        84,
        60,
        36
      ]
    },
    "locked": {
      "label": "Locked",
      "layer": "process",
      "box": [
        692.1919999999999,
        176.6,
        69,
        36
      ]
    },
    "end": {
      "label": "End",
      "layer": "process",
      "box": [
        692.1919999999999,
        16,
        60,
        36
      ]
    }
  },
  "edges": {
    "start": {
      "from": "start",
      "to": "closed",
      "label": {
        "at": [
          140,
          59.5
        ],
        "text": "init [true] / reset"
      },
      "path": "M76,46 L324.099,46",
      "badge": [
        122.5185625,
        46
      ]
    },
    "open": {
      "from": "closed",
      "to": "open",
      "label": {
        "at": [
          454.099,
          120.5
        ],
        "text": "push [unlocked] / open"
      },
      "path": "M390.099,46 L420.099,46 L420.099,107 L603.161,107 L603.161,108 L692.1919999999999,108",
      "badge": [
        437.2610625,
        107
      ]
    },
    "close": {
      "from": "open",
      "to": "closed",
      "label": {
        "at": [
          463.58050000000003,
          90.9
        ],
        "text": "pull [true] / close"
      },
      "path": "M692.1919999999999,96 L430.099,96 L430.099,40 L390.099,40",
      "badge": [
        446.4798125,
        88
      ]
    },
    "lock": {
      "from": "closed",
      "to": "locked",
      "label": {
        "at": [
          460.42,
          213.1
        ],
        "text": "turnKey [key] / lock"
      },
      "path": "M390.099,58 L400.099,58 L400.099,199.6 L603.161,199.6 L603.161,200.6 L692.1919999999999,200.6",
      "badge": [
        444.51881249999997,
        199.6
      ]
    },
    "unlock": {
      "from": "locked",
      "to": "closed",
      "label": {
        "at": [
          454.099,
          183.5
        ],
        "text": "turnKey [key] / unlock"
      },
      "path": "M692.1919999999999,188.6 L410.099,188.6 L410.099,52 L390.099,52",
      "badge": [
        436.54521875,
        180.6
      ]
    },
    "blocked": {
      "from": "locked",
      "to": "locked",
      "label": {
        "at": [
          797.1919999999999,
          198.79999999999998
        ],
        "text": "push [locked] / rattle"
      },
      "path": "M761.1919999999999,185.6 L785.1919999999999,185.6 L785.1919999999999,203.6 L761.1919999999999,203.6",
      "badge": [
        785.1919999999999,
        194.6
      ]
    },
    "finish": {
      "from": "closed",
      "to": "end",
      "label": {
        "at": [
          460.42,
          47.5
        ],
        "text": "finish [done] / stop"
      },
      "path": "M390.099,34 L692.1919999999999,34",
      "badge": [
        607.2283437499999,
        34
      ]
    }
  },
  "scenarios": [
    {
      "id": "locked-door",
      "label": "Try to open a locked door",
      "display": {
        "counterLabel": true,
        "edges": "progressive",
        "edgeBadges": false,
        "nodeBadges": false,
        "log": "incremental"
      },
      "steps": [
        {
          "id": "start",
          "title": "Start closed",
          "text": "Start is an ordinary node standing in for an initial state.",
          "show": [
            "start",
            "closed"
          ],
          "current": [
            "closed"
          ],
          "edges": [
            "start"
          ],
          "defs": [],
          "sources": [],
          "deeper": []
        },
        {
          "id": "lock",
          "title": "Lock the door",
          "text": "Turn the key: the door becomes locked.",
          "show": [
            "locked"
          ],
          "current": [
            "locked"
          ],
          "edges": [
            "lock"
          ],
          "defs": [],
          "sources": [],
          "deeper": []
        },
        {
          "id": "try",
          "title": "Try to open it",
          "text": "Pushing a locked door rattles the handle. The self-transition leaves the door locked.",
          "show": [],
          "current": [
            "locked"
          ],
          "edges": [
            "blocked"
          ],
          "defs": [],
          "log": [
            "push [locked] / rattle",
            "State stays Locked."
          ],
          "sources": [],
          "deeper": []
        },
        {
          "id": "unlock",
          "title": "Unlock with the key",
          "text": "Turn the key again to unlock the door.",
          "show": [],
          "current": [
            "closed"
          ],
          "edges": [
            "unlock"
          ],
          "defs": [],
          "sources": [],
          "deeper": []
        },
        {
          "id": "open",
          "title": "Open the door",
          "text": "Push the unlocked door.",
          "show": [
            "open"
          ],
          "current": [
            "open"
          ],
          "edges": [
            "open"
          ],
          "defs": [],
          "sources": [],
          "deeper": []
        },
        {
          "id": "close",
          "title": "Close the door",
          "text": "Pull the door closed.",
          "show": [],
          "current": [
            "closed"
          ],
          "edges": [
            "close"
          ],
          "defs": [],
          "sources": [],
          "deeper": []
        },
        {
          "id": "end",
          "title": "Finish the demonstration",
          "text": "End is an ordinary node standing in for a final state.",
          "show": [
            "end"
          ],
          "current": [
            "end"
          ],
          "edges": [
            "finish"
          ],
          "defs": [],
          "sources": [],
          "deeper": []
        }
      ],
      "flow": [
        {
          "node": "start",
          "step": "start",
          "log": []
        },
        {
          "node": "closed",
          "step": "start",
          "log": [
            "State: Closed"
          ],
          "edge": "start"
        },
        {
          "node": "locked",
          "step": "lock",
          "log": [
            "State: Locked"
          ],
          "edge": "lock"
        },
        {
          "node": "locked",
          "step": "try",
          "log": [
            "push [locked] / rattle; state stays Locked"
          ],
          "edge": "blocked"
        },
        {
          "node": "closed",
          "step": "unlock",
          "log": [
            "State: Closed"
          ],
          "edge": "unlock"
        },
        {
          "node": "open",
          "step": "open",
          "log": [
            "State: Open"
          ],
          "edge": "open"
        },
        {
          "node": "closed",
          "step": "close",
          "log": [
            "State: Closed"
          ],
          "edge": "close"
        },
        {
          "node": "end",
          "step": "end",
          "log": [
            "Demonstration finished."
          ],
          "edge": "finish"
        }
      ]
    }
  ],
  "definitions": {},
  "code": {},
  "concepts": [],
  "callouts": {},
  "deeper": [],
  "viewBox": [
    952.2539999999999,
    231.2
  ],
  "measurement": {
    "name": "font-table",
    "labels": {
      "start": {
        "width": 120.09899999999998,
        "height": 12.6
      },
      "open": {
        "width": 139.06199999999998,
        "height": 12.6
      },
      "close": {
        "width": 120.09899999999998,
        "height": 12.6
      },
      "lock": {
        "width": 126.41999999999997,
        "height": 12.6
      },
      "unlock": {
        "width": 139.06199999999998,
        "height": 12.6
      },
      "blocked": {
        "width": 139.06199999999998,
        "height": 12.6
      },
      "finish": {
        "width": 126.41999999999997,
        "height": 12.6
      }
    }
  }
}
