Skip to content

Action plan

Action plan lists the Actions a request would take, with each action class and cost, before any of them runs.

Contract

Status planned. A try call returns { result, plan }: the result the call would get, and its action plan. Nothing is stored and nothing runs.

The plan lists each Action in run order, one row per Verb call. Its actionClass, door and undo are that Verb's card in /verbs.json, so a plan and a Verb page use one vocabulary.

FieldWhat it holds
verbThe Verb the step calls, such as Order.refund
inputsThe inputs it passes
writesThe Nouns it creates, changes or deletes
moneyThe mechanism money moves by, such as a Stripe refund
sendsThe Messages it sends, by Channel and count
actionClassspend, sign, publish, price or send, or none
doorone-way or two-way
waitsWhat it waits for: an Approval, a delay window or a Worker
undoHow Action.undo or Thing.restore reverses it

The plan ends with the Approvals the request asks for: one for each step whose action class a seat's approval rule names.

Verbs

None.

Interfaces

None.

Example

Dana Okafor asks the Leaseline agent to refund a resident's last month. try returns the refunded Order and a two-step plan: Order.refund (spend, one-way, waiting for Dana above $50), then a Message to the resident. Nothing runs until she says yes.