{
  "version": 5,
  "app": "fluyo",
  "doc": {
    "theme": "crema",
    "customBg": "",
    "cur": 0,
    "nextEventTypeId": 5,
    "eventTypes": [
      {
        "id": 1,
        "name": "Petición",
        "primitive": "FLOW",
        "sentenceTemplate": "{source} pide a {target}",
        "visual": {
          "kind": "token",
          "value": "●"
        },
        "motion": "normal"
      },
      {
        "id": 2,
        "name": "Respuesta",
        "primitive": "FLOW",
        "sentenceTemplate": "{source} responde a {target}",
        "visual": {
          "kind": "token",
          "value": "◆"
        },
        "motion": "normal"
      },
      {
        "id": 3,
        "name": "Caída",
        "primitive": "SET_AVAILABILITY",
        "sentenceTemplate": "{target} deja de responder",
        "availability": "DOWN",
        "visual": {
          "kind": "token",
          "value": "✕"
        }
      }
    ],
    "pages": [
      {
        "name": "Compra online",
        "nextId": 10,
        "behaviors": [],
        "nextScenarioId": 3,
        "nodes": [
          {
            "id": 1,
            "shape": "icon",
            "x": 200,
            "y": 200,
            "w": 120,
            "h": 92,
            "label": "Cliente",
            "color": "#6a9fb5",
            "fill": null,
            "border": "solid",
            "lblPos": "center",
            "textBg": null,
            "font": null,
            "bold": false,
            "pulse": false,
            "order": 1,
            "icon": "user"
          },
          {
            "id": 2,
            "shape": "rect",
            "x": 480,
            "y": 200,
            "w": 180,
            "h": 70,
            "label": "Tienda online",
            "color": "#9b7fb5",
            "fill": null,
            "border": "solid",
            "lblPos": "center",
            "textBg": null,
            "font": null,
            "bold": false,
            "pulse": false,
            "order": 2
          },
          {
            "id": 3,
            "shape": "rect",
            "x": 780,
            "y": 200,
            "w": 180,
            "h": 70,
            "label": "Almacén",
            "color": "#7bb85b",
            "fill": null,
            "border": "solid",
            "lblPos": "center",
            "textBg": null,
            "font": null,
            "bold": false,
            "pulse": false,
            "order": 3
          },
          {
            "id": 4,
            "shape": "rect",
            "x": 480,
            "y": 420,
            "w": 180,
            "h": 70,
            "label": "Pagos",
            "color": "#d08b5b",
            "fill": null,
            "border": "solid",
            "lblPos": "center",
            "textBg": null,
            "font": null,
            "bold": false,
            "pulse": false,
            "order": 4
          },
          {
            "id": 5,
            "shape": "icon",
            "x": 780,
            "y": 420,
            "w": 120,
            "h": 92,
            "label": "Banco",
            "color": "#c9b458",
            "fill": null,
            "border": "solid",
            "lblPos": "center",
            "textBg": null,
            "font": null,
            "bold": false,
            "pulse": false,
            "order": 5,
            "icon": "vault"
          }
        ],
        "edges": [
          {
            "id": 6,
            "from": 1,
            "to": 2,
            "route": "straight",
            "fromSide": null,
            "toSide": null,
            "waypoints": [],
            "label": "",
            "font": null,
            "bold": false,
            "endArrow": true,
            "startArrow": false,
            "flowDir": "normal"
          },
          {
            "id": 7,
            "from": 2,
            "to": 4,
            "route": "straight",
            "fromSide": null,
            "toSide": null,
            "waypoints": [],
            "label": "",
            "font": null,
            "bold": false,
            "endArrow": true,
            "startArrow": false,
            "flowDir": "normal"
          },
          {
            "id": 8,
            "from": 4,
            "to": 5,
            "route": "straight",
            "fromSide": null,
            "toSide": null,
            "waypoints": [],
            "label": "",
            "font": null,
            "bold": false,
            "endArrow": true,
            "startArrow": false,
            "flowDir": "normal"
          },
          {
            "id": 9,
            "from": 2,
            "to": 3,
            "route": "straight",
            "fromSide": null,
            "toSide": null,
            "waypoints": [],
            "label": "",
            "font": null,
            "bold": false,
            "endArrow": true,
            "startArrow": false,
            "flowDir": "normal"
          }
        ],
        "scenarios": [
          {
            "id": 1,
            "engineVersion": 2,
            "name": "Compra con éxito",
            "nextStepId": 8,
            "steps": [
              {
                "id": 1,
                "at": 0,
                "action": "SEND",
                "edgeId": 6,
                "eventTypeId": 1,
                "message": "El cliente pulsa «Pagar» (49 €)"
              },
              {
                "id": 2,
                "at": 2400,
                "action": "SEND",
                "edgeId": 7,
                "eventTypeId": 1,
                "message": "La tienda pide a Pagos que cobre"
              },
              {
                "id": 3,
                "at": 4800,
                "action": "SEND",
                "edgeId": 8,
                "eventTypeId": 1,
                "message": "Pagos pide al banco que autorice la tarjeta"
              },
              {
                "id": 4,
                "at": 7200,
                "action": "SEND",
                "edgeId": 8,
                "eventTypeId": 2,
                "message": "El banco autoriza el cobro",
                "reverse": true
              },
              {
                "id": 5,
                "at": 9600,
                "action": "SEND",
                "edgeId": 7,
                "eventTypeId": 2,
                "message": "Pagos confirma a la tienda: cobrado",
                "reverse": true
              },
              {
                "id": 6,
                "at": 9700,
                "action": "SEND",
                "edgeId": 9,
                "eventTypeId": 1,
                "message": "Solo ahora la tienda avisa al almacén"
              },
              {
                "id": 7,
                "at": 12100,
                "action": "SEND",
                "edgeId": 6,
                "eventTypeId": 2,
                "message": "El cliente ve «Pedido confirmado»",
                "reverse": true
              }
            ],
            "arrivalDependencies": [
              {
                "stepId": 6,
                "waitsForArrivalOf": [
                  5
                ]
              }
            ]
          },
          {
            "id": 2,
            "engineVersion": 2,
            "name": "El banco no responde",
            "nextStepId": 7,
            "steps": [
              {
                "id": 1,
                "at": 0,
                "action": "SEND",
                "edgeId": 6,
                "eventTypeId": 1,
                "message": "El cliente pulsa «Pagar» (49 €)"
              },
              {
                "id": 2,
                "at": 2400,
                "action": "SEND",
                "edgeId": 7,
                "eventTypeId": 1,
                "message": "La tienda pide a Pagos que cobre"
              },
              {
                "id": 3,
                "at": 4800,
                "action": "SET_STATE",
                "nodeId": 5,
                "eventTypeId": 3,
                "message": "El banco deja de responder",
                "state": "DOWN"
              },
              {
                "id": 4,
                "at": 7200,
                "action": "SEND",
                "edgeId": 8,
                "eventTypeId": 1,
                "message": "Pagos intenta autorizar… sin respuesta"
              },
              {
                "id": 5,
                "at": 9600,
                "action": "SEND",
                "edgeId": 7,
                "eventTypeId": 2,
                "message": "Pagos avisa a la tienda: cobro no realizado",
                "reverse": true
              },
              {
                "id": 6,
                "at": 12000,
                "action": "SEND",
                "edgeId": 6,
                "eventTypeId": 2,
                "message": "El cliente ve «Pago no completado»",
                "reverse": true
              }
            ]
          }
        ]
      }
    ]
  },
  "settings": {
    "speed": 0.5,
    "dots": 3,
    "build": false,
    "stagger": 0.45,
    "grid": false,
    "snap": false,
    "font": "Georgia, serif",
    "single": false
  }
}
