# Grocery shopping without buying everything

> A process map exported from forks.world (https://forks.world). Author: Brian. Source: https://forks.world/p/cmv0iekgd006njw06ns5jg2p9
> It describes who does what, in what order, and with which technology. Read the plain-language sections first; the JSON at the end is the exact, complete data.

## Summary

- 12 steps across 1 layer
- Persona: You
- Technology / systems: Phone list, The store, Checkout

## How to read this file

- A process is made of **layers**. The main layer is the top level; any step of kind `subprocess` opens a detail layer with its own lanes and steps.
- **Lanes** are either persona (people/roles) or technology (systems). Each step belongs to one lane; `using` lists tools a person uses for that step.
- Step kinds: `start`, `task`, `decision` (its arrows carry the answer as a label), `subprocess`, `end`.

## Grocery shopping without buying everything

Lanes:
- You: person / role (id `me`)
- Phone list: technology / system (id `list`)
- The store: technology / system (id `store`)
- Checkout: technology / system (id `cart`)

Steps, in the order they run:

1. **Check what you are out of** [start; You; id `g1`]
   - then Write the list in the store's aisle order
2. **Write the list in the store's aisle order** [task; Phone list; id `g2`]
   - then Hungry right now?
3. **Hungry right now?** [decision; You; id `g3`]
   - if "Yes" go to Have a snack first. Never shop hungry.; if "No" go to Walk in with a cart
4. **Have a snack first. Never shop hungry.** [task; You; id `g4`]
   - then Walk in with a cart
5. **Walk in with a cart** [task; The store; id `g5`]
   - then Any item left on the list?
6. **Any item left on the list?** [decision; The store; id `g6`]
   - if "Yes" go to Find it and compare prices; if "No" go to Scan and pay
7. **Find it and compare prices** [task; You; id `g7`]
   - then Is it out of stock?
8. **Is it out of stock?** [decision; The store; id `g8`]
   - if "Yes" go to Pick a substitute or skip it; if "No" go to Any item left on the list?
9. **Pick a substitute or skip it** [task; You; id `g9`]
   - then Any item left on the list?
10. **Scan and pay** [task; Checkout; id `g10`]
   - then Bags in the car
11. **Bags in the car** [task; You; id `g11`]
   - then Put the cold stuff away first
12. **Put the cold stuff away first** [end; You; id `g12`]

```mermaid
flowchart LR
  subgraph l_me["You"]
    n_g1(["Check what you are out of"])
    n_g3{"Hungry right now?"}
    n_g4["Have a snack first. Never shop hungry."]
    n_g7["Find it and compare prices"]
    n_g9["Pick a substitute or skip it"]
    n_g11["Bags in the car"]
    n_g12(["Put the cold stuff away first"])
  end
  subgraph l_list["Phone list"]
    n_g2["Write the list in the store's aisle order"]
  end
  subgraph l_store["The store"]
    n_g5["Walk in with a cart"]
    n_g6{"Any item left on the list?"}
    n_g8{"Is it out of stock?"}
  end
  subgraph l_cart["Checkout"]
    n_g10["Scan and pay"]
  end
  n_g1 --> n_g2
  n_g2 --> n_g3
  n_g3 -->|"Yes"| n_g4
  n_g3 -->|"No"| n_g5
  n_g4 --> n_g5
  n_g5 --> n_g6
  n_g6 -->|"Yes"| n_g7
  n_g6 -->|"No"| n_g10
  n_g7 --> n_g8
  n_g8 -->|"Yes"| n_g9
  n_g8 -->|"No"| n_g6
  n_g9 --> n_g6
  n_g10 --> n_g11
  n_g11 --> n_g12
```

## Full data (JSON)

```json
{
  "title": "Grocery shopping without buying everything",
  "maps": {
    "m_root": {
      "id": "m_root",
      "lanes": [
        {
          "id": "me",
          "name": "You",
          "type": "person"
        },
        {
          "id": "list",
          "name": "Phone list",
          "type": "system"
        },
        {
          "id": "store",
          "name": "The store",
          "type": "system"
        },
        {
          "id": "cart",
          "name": "Checkout",
          "type": "system"
        }
      ],
      "steps": [
        {
          "id": "g1",
          "kind": "start",
          "lane": "me",
          "next": [
            {
              "to": "g2"
            }
          ],
          "uses": [],
          "label": "Check what you are out of"
        },
        {
          "id": "g2",
          "kind": "task",
          "lane": "list",
          "next": [
            {
              "to": "g3"
            }
          ],
          "uses": [],
          "label": "Write the list in the store's aisle order"
        },
        {
          "id": "g3",
          "kind": "decision",
          "lane": "me",
          "next": [
            {
              "to": "g4",
              "label": "Yes"
            },
            {
              "to": "g5",
              "label": "No"
            }
          ],
          "uses": [],
          "label": "Hungry right now?"
        },
        {
          "id": "g4",
          "kind": "task",
          "lane": "me",
          "next": [
            {
              "to": "g5"
            }
          ],
          "uses": [],
          "label": "Have a snack first. Never shop hungry."
        },
        {
          "id": "g5",
          "kind": "task",
          "lane": "store",
          "next": [
            {
              "to": "g6"
            }
          ],
          "uses": [],
          "label": "Walk in with a cart"
        },
        {
          "id": "g6",
          "kind": "decision",
          "lane": "store",
          "next": [
            {
              "to": "g7",
              "label": "Yes"
            },
            {
              "to": "g10",
              "label": "No"
            }
          ],
          "uses": [],
          "label": "Any item left on the list?"
        },
        {
          "id": "g7",
          "kind": "task",
          "lane": "me",
          "next": [
            {
              "to": "g8"
            }
          ],
          "uses": [],
          "label": "Find it and compare prices"
        },
        {
          "id": "g8",
          "kind": "decision",
          "lane": "store",
          "next": [
            {
              "to": "g9",
              "label": "Yes"
            },
            {
              "to": "g6",
              "label": "No"
            }
          ],
          "uses": [],
          "label": "Is it out of stock?"
        },
        {
          "id": "g9",
          "kind": "task",
          "lane": "me",
          "next": [
            {
              "to": "g6"
            }
          ],
          "uses": [],
          "label": "Pick a substitute or skip it"
        },
        {
          "id": "g10",
          "kind": "task",
          "lane": "cart",
          "next": [
            {
              "to": "g11"
            }
          ],
          "uses": [],
          "label": "Scan and pay"
        },
        {
          "id": "g11",
          "kind": "task",
          "lane": "me",
          "next": [
            {
              "to": "g12"
            }
          ],
          "uses": [],
          "label": "Bags in the car"
        },
        {
          "id": "g12",
          "kind": "end",
          "lane": "me",
          "next": [],
          "uses": [],
          "label": "Put the cold stuff away first"
        }
      ],
      "title": "Grocery shopping without buying everything",
      "parent": null
    }
  }
}
```
