/Sequence

A policy as a sequence diagram: the agents, the monitor and the happy path between them.

Sequence diagram

The policy's happy path as a sequence diagramMonitorComplierGuard(Policy)AgentControllableCHAOSPolicy = Draftattempt.draftallow.draftresult.draft?v : {done, failed}call runsRecreateattempt.recreateallow.recreateresult.recreate?v : {done, failed}call runs↺ Draft

Reading it

  • Lifelines. They come from the spec's own System: its Agent (ControllableCHAOS, one per role if there are roles) against the monitor, ComplierGuard(Policy). A spec without both doesn't draw.
  • One bar per allowed call. On the left of the monitor's bar, attempt comes in, allow goes out, and the call's result comes back in. The agent's bar is the call running.
  • [] external choice. The monitor offers every operand at once; the agent's attempt picks one. The operands aren't steps in a row.
  • result of x. The call's value decides where the policy goes. Neither the agent nor the monitor picks it.
  • Pills are the monitor's named states; ↺ Name goes back to an earlier one.

Not drawn

  • Only happy paths are drawn. The policy still does everything below, and complier still enforces it.
  • deny.other in Recreate
  • deny.other in Draft
  • Refusals: an attempt the current state doesn't offer is refused, and the policy stays where it was.