{
 "$schema": "../../lib/umlimator.schema.json",
 "schemaVersion": 2,
 "title": "Flowchart",
 "root": "returns",
 "nodes": [
  { "id": "parcel", "type": "flow.Terminator", "label": "Returned parcel arrives" },
  { "id": "slip", "type": "flow.InputOutput", "label": "Read the returns slip" },
  { "id": "found", "type": "flow.Decision", "label": "Order found?" },
  { "id": "key-in", "type": "flow.ManualInput", "label": "Key in the order number" },
  { "id": "inspect", "type": "flow.Process", "label": "Inspect the book" },
  { "id": "condition", "type": "flow.Decision", "label": "Condition of the book?" },
  { "id": "claim", "type": "flow.Process", "label": "Claim from the courier" },
  { "id": "refund", "type": "flow.PredefinedProcess", "label": "Refund the payment" },
  { "id": "bank", "type": "flow.Delay", "label": "Wait for the bank to confirm" },
  { "id": "to-b", "type": "flow.Connector", "label": "B" },
  { "id": "from-b", "type": "flow.Connector", "label": "B" },
  { "id": "restock", "type": "flow.Process", "label": "Put the book back on the shelf" },
  { "id": "stock", "type": "flow.Database", "label": "Stock records" },
  { "id": "letter", "type": "flow.Document", "label": "Rejection letter" },
  { "id": "post-back", "type": "flow.Process", "label": "Post the book back" },
  { "id": "join", "type": "flow.Connector", "label": "A" },
  { "id": "closed", "type": "flow.Terminator", "label": "Return closed" },
  { "id": "why-b", "type": "uml.Comment", "label": "The two B circles are one point: the flow carries on from the other B" }
 ],
 "edges": [
  { "id": "parcel-slip", "type": "flow.Flow", "from": "parcel", "to": "slip" },
  { "id": "slip-found", "type": "flow.Flow", "from": "slip", "to": "found" },
  { "id": "found-yes", "type": "flow.Flow", "from": "found", "to": "inspect", "label": "yes" },
  { "id": "found-no", "type": "flow.Flow", "from": "found", "to": "key-in", "label": "no" },
  { "id": "key-in-again", "type": "flow.Flow", "from": "key-in", "to": "found", "label": "look again" },
  { "id": "inspect-condition", "type": "flow.Flow", "from": "inspect", "to": "condition" },
  { "id": "condition-new", "type": "flow.Flow", "from": "condition", "to": "refund", "label": "as new" },
  { "id": "condition-transit", "type": "flow.Flow", "from": "condition", "to": "claim", "label": "damaged in the post" },
  { "id": "condition-worn", "type": "flow.Flow", "from": "condition", "to": "letter", "label": "worn by the reader" },
  { "id": "claim-refund", "type": "flow.Flow", "from": "claim", "to": "refund" },
  { "id": "refund-bank", "type": "flow.Flow", "from": "refund", "to": "bank" },
  { "id": "bank-b", "type": "flow.Flow", "from": "bank", "to": "to-b" },
  { "id": "b-restock", "type": "flow.Flow", "from": "from-b", "to": "restock" },
  { "id": "restock-stock", "type": "flow.Flow", "from": "restock", "to": "stock" },
  { "id": "stock-join", "type": "flow.Flow", "from": "stock", "to": "join" },
  { "id": "letter-post", "type": "flow.Flow", "from": "letter", "to": "post-back" },
  { "id": "post-join", "type": "flow.Flow", "from": "post-back", "to": "join" },
  { "id": "join-closed", "type": "flow.Flow", "from": "join", "to": "closed" },
  { "id": "why-b-link", "type": "uml.CommentLink", "from": "why-b", "to": "from-b" }
 ],
 "views": [
  { "id": "returns", "diagram": "flowchart", "title": "Handling a returned book", "parent": null, "direction": "down",
   "nodeIds": ["parcel", "slip", "found", "key-in", "inspect", "condition", "claim", "refund", "bank", "to-b", "from-b", "restock", "stock", "letter", "post-back", "join", "closed", "why-b"] },
  { "id": "returns-right", "diagram": "flowchart", "title": "The same flowchart, laid out right", "parent": "returns", "direction": "right",
   "nodeIds": ["parcel", "slip", "found", "key-in", "inspect", "condition", "claim", "refund", "bank", "to-b", "from-b", "restock", "stock", "letter", "post-back", "join", "closed", "why-b"] }
 ]
}
