# A supplier shuts down — three regions, one stock, a plan refused by the stock, and a plan made again

> A pump maker's supplier of housings shuts down. The response is one job with a job under it for each sales region. An agent in charge has the stock read and each region assessed; one region is too much for its analyst's allowance and its lead is asked instead. A planning agent plans each region in turn, and each region's lead approves what is taken from the shared stock: one proposal is refused by a person, one is approved and then refused by the stock — another region already holds those housings — and one region waits its turn. A foundry outside answers through a link. Then a count finds less stock than is held: nothing is taken from anybody, the operations director decides who gives way, and that region's plan is made and approved again. One region's work is handed over and then called off. Every fact in the story is asserted by the tests of the app it comes from.

<!-- id: agent-story-disruption · area: agent · stability: preview · html: https://osysharp.com/reference/agent/story-disruption/ -->

> **You are here:** [Agents in an Osy# app](https://osysharp.com/reference/agent/overview/) › Stories › A supplier shuts down

## Summary        {#summary}
Halden Pumps builds the H-40 pump. Brask Castings, who cast its housings, shuts down. 120 housings are in the Malmö
warehouse, and orders in three regions need them this month. The plant owns that until every one of those
commitments is fulfilled, or resolved with the customer.

This is the response, from Monday 5 May to Friday 16 May.

## Description    {#description}

### Who is involved?   {#people}

| Person | Their job | What they see and may do |
|---|---|---|
| Astrid Holm | operations director | reports the disruption; keeps the shared stock — says what there is, decides who gives way; approves the plan as a whole; sees what the agents cost |
| Bram Okafor | leads the Nordic region | owns his region's job; approves what is taken from the stock for it, and any order that is moved |
| Clara Weiss | leads the DACH region | the same, for hers. Cannot read another region's job |
| Deniz Aydin | leads the UK region | the same — until he moves to another post in the second week |
| Mateo Ruiz, at Ferrol Foundry | a foundry, outside | has no account: answers one question through a link |

| Agent | Its part | What it may do alone |
|---|---|---|
| Response coordinator | assesses the disruption: has the stock read and each region assessed | hand those readings on |
| Stock analyst | reads what is in the warehouse | only read |
| Impact analyst | works out what one region's orders need | record it — on a small allowance for each region |
| Recovery planner | plans how one region keeps its promises | wait for stock; ask the foundry. Taking stock, and moving a customer's order, are proposed to the region's lead, every time |

### How is the work shaped?   {#shape}
One **job** for the response, and under it a job for each region — each owned by that region's lead, each with its
own plan and its own outcome. The response is not done until each region's job is fulfilled or resolved: that is
written into what "done" means for the job above.

All three regions draw on one thing: the housings in Malmö. That is a **shared pool** — one place that says how
many there are, who holds how many, and who is waiting. Two regions cannot hold the same housing.

The response itself is a **process**: assess, plan each region, decide the plan, carry it out — and plan again
when what there is changes.

![The response's page once it is over: the process with the way it went — out to carrying it out, back to planning again, and out — and what happened at each step](https://osysharp.com/media/ref/364e22-assignments-allocations-response-run-wide-light.png)

### Monday 5 May: what is at risk   {#monday}
Astrid reports the shutdown. The **Response coordinator** hands out four readings at once: the stock to the Stock
analyst, and each region's order book to an Impact analyst. Three come back: 120 housings; the Nordics need 80;
DACH needs 60. The UK's order book is forty-one small orders; the analyst spends most of its allowance on the first
step and is stopped before the next.

The process opens a job for each region, and says on its own page that one region could not be assessed by the
agents — so its lead is asked. On Tuesday Deniz answers a one-field form: 30.

### Tuesday 6 May: three plans, one stock   {#plans}
The **Recovery planner** plans the regions one at a time, in the order Astrid ranked them. What it wants to take
from the stock is proposed to that region's lead.

- **Nordics.** It proposes to take 100 — a margin of 20 for breakage. Bram says no: "We need 80, not 100. Do not
  take what the other regions need." It proposes 80. He approves, and 80 are held for the Nordics.
- **DACH.** It proposes 60, and Clara approves. **The stock refuses it**: 40 are left, and 80 are held for Nordic
  orders. A person's yes does not make housings. The planner is told exactly that, proposes the 40 that are left —
  approved, and held — and asks a foundry outside whether it can cast the other 20.
- **UK.** Nothing is left. The planner asks for 30 and the UK **waits its turn**: its job carries a piece of work
  that cannot move, which says what it is waiting for.

The plan as a whole goes to Astrid, with each region's part as a line. On Wednesday she approves it.

On Thursday Ferrol Foundry answers through its link: it can deliver in time, at 46 euros each. What it said is kept
on the DACH job, by the name Mateo Ruiz gave.

### Friday 9 May and Monday 12 May: a region handed over, and called off   {#uk}
Deniz moves to another post, and the UK's job is handed to Bram. On Monday the UK's distributors agree to wait
until July for housings from the new supplier. The UK's work is no longer needed: its job is called off, and what
it waited for is withdrawn with it, with the reason.

That does not make the response done. What it promised for the UK is neither fulfilled nor accepted as resolved,
and the job above cannot be completed — until Astrid accepts, in writing, that the UK was resolved by agreement and
not fulfilled.

### Monday 12 May: there is less than was thought   {#short}
The same day a count finds 30 housings damaged by damp. 90 exist; 120 are held.

Nothing is taken from anybody. The stock is **overdrawn by 30**: both regions are told, on their own jobs, that
their share is in question, and neither can ship from it until it is decided. The response goes back to planning,
and asks Astrid who gives way.

![The shared stock, overdrawn: 90 housings, 120 held, both regions' shares in question, and the UK's claim withdrawn with why](https://osysharp.com/media/ref/364e22-assignments-allocations-response-stock-overdrawn-wide-light.png)

Clara sees the same page, with her own share named by her job and the other named only by what it is for — and her
job's page says what it holds of what is shared.

![The DACH region's job, as its lead reads it: its share of the stock in question, what the foundry said, and — under Linked — the response above it, which is not hers to read](https://osysharp.com/media/ref/364e22-assignments-allocations-response-job-share-in-question-wide-light.png)

### Tuesday 13 May: who gives way, and a plan made again   {#again}
Astrid decides: the Nordics give way by 30 — their orders 14 to 19 are not needed on site until June. She cuts
their share on the stock's page and says so in answer to the question.

That puts the Nordic plan back in question, and only that one: DACH is not asked to plan again. The planner reads
what the Nordic job holds and proposes to move the orders that need 30 housings to June. Moving a customer's order
is the lead's to approve, again.

![Bram's inbox: the planner proposes to move orders needing 30 housings to next month, with its reason and the job it is part of](https://osysharp.com/media/ref/364e22-assignments-allocations-response-inbox-revised-plan-wide-light.png)

Bram approves the revised plan, and the response is back to carrying it out.

### Friday 16 May: what shipped   {#done}
Bram reports 50 pumps shipped and six orders re-dated with each customer's agreement. Clara reports 40 shipped from
stock, and 20 to follow with Ferrol's housings. What each region used is gone from the stock for good; each
region's job is completed with its report as evidence; and the response ends — completed **by exception**, and
saying so: one region was resolved by agreement, not fulfilled.

### What did each person see?   {#who-saw}
- **Astrid** reads all of it: the response, every region's job, the stock with each holder by name, what the
  agents cost.
- **Clara**, a region's lead, reads her own region's job — not the response above it, and not another region's
  job. She sees the stock: her share by her job's name, the others by what each is for. She follows the response's
  run, and is not shown what the models cost. She does not decide who gives way.
- **Somebody in purchasing**, who neither keeps nor claims from the stock, reads none of it.
- **The foundry's link** opens its one question, with its own answer once given. It opens nothing else.

### What was refused, and what was stopped?   {#stopped}
- **A refusal by a person.** Bram's no to taking 100, with its reason, which the planner acted on.
- **A refusal by the stock.** DACH's 60 — approved by its lead, and still not there to take.
- **A limit.** The Impact analyst's allowance on the UK's order book; its lead was asked instead.
- **A wait.** The UK's claim on a stock that had nothing left.
- **A handover.** The UK's job, from one lead to another.
- **Work called off.** The UK's job, and what it waited for.
- **A plan back in question.** The Nordic plan, when its share was cut — and approved again in its revised form.
- **A job that is not done.** The response, until the UK was accepted as resolved.

### What is not in it?   {#not}
Plans are not rehearsed against a simulation of the business before they are approved: there is none. And the kit
never chooses who gives way — it tells whoever keeps the stock, and waits for their decision.

### Where is this written down?   {#source}
In the test app of the kit for shared resources between assignments — a plant called Halden Pumps.
`a_disruption_is_answered_region_by_region_from_one_stock_and_planned_again_when_the_stock_falls_short` is the two
weeks, day by day; `the_run_of_a_response_tells_the_plan_the_shortfall_and_the_plan_made_again` is the page;
`each_reader_of_a_response_sees_what_is_theirs` is who saw what. Six more tests show the stock's own rules, and
four drive the screens in a real browser. No AI model is called in any of them: the model is a scripted stand-in.

## What to read next   {#read-next}
- [A press is repaired — three weeks, a supplier outside, an order refused, and a repair that did not hold](https://osysharp.com/reference/agent/story-repair/) — one job that is opened again when what it settled turns out wrong
- [Somebody is hired — four applications, one read by hand, a candidate who withdraws and is erased, and an offer refused](https://osysharp.com/reference/agent/story-recruiting/) — a process that asks many people, and a person who is erased from it
- [What stays under people's control — ten promises, and where each is shown](https://osysharp.com/reference/agent/overview-control/) — the promises this story relied on

## Go deeper   {#see-also}
- [What several assignments compete for — shared pools, claims, and what happens when there is less than was thought (Assignments.Allocations kit)](https://osysharp.com/reference/agent/assignment-allocations/) — shared pools, claims, and what happens when there is less than was thought
- [Assignments — a piece of work owned until its outcome is reached (Assignments kit)](https://osysharp.com/reference/agent/assignments/) — jobs under a job, and what "done" means
- [Processes — every run of a business process, listed and read from start to now (Processes kit)](https://osysharp.com/reference/workflow/processes-kit/) — the page of a run
- [Shape 3 — agents inside a business process](https://osysharp.com/reference/agent/guide-process/) — agent work as steps of a process
