Workflow
54 pages.
Any call that leaves the platform — an outbound client call, an external service — is made a durable step by the compiler. In a workflow, a…
`Osysharp.WorkQueues.Notifications` joins `Osysharp.WorkQueues` to `Osysharp.Notifications`: the person an item is offered to, the cover it is handed…
A process asks a person by putting a request from its workflow and awaiting the answer. With Osysharp.HumanRequests and Osysharp.Processes in an app…
Osysharp.Processes makes the runs of an app's workflows followable by the people who answer for them. The app names which workflows are processes — a…
In a workflow body, a call started as a task may wait — on a child workflow run that takes days, a person's answer — and `await`, `Task.WhenAll` and…
`Osysharp.WorkQueues` puts any item an app derives from `WorkItem` — a ticket, an approval, a lead — into queues with holders and a promise. The app…
A run that is waiting on child runs — one it awaits, several joined, tasks that wait — and is ended from somewhere else (an event sends it to a…
A `workflow` is a run that survives the process it started in — it parks, waits days for a person or a timer, and resumes in a later deployment. The…
A workflow run can be waiting for days while you deploy past it a dozen times. This is how the platform decides where such a run IS in terms the new…
Answer a queued slot from the row itself. The event is named at the call site because a queue's rows are heterogeneous — which slot a row is, and so…
A row that moves through states, like an order going from placed to paid to shipped, has two good shapes. A workflow with `Tracks = Order.Status`…
Give a slot to somebody else. Claiming takes work for yourself and releasing puts it back in the pool; assigning is the third move — a hand-over. It…
A milestone puts an SLA on a slot's progress — Assigned (someone must PICK IT UP within Within) and Finished (it must be SATISFIED within Within)…
A retry policy as a value: how long to wait before the next attempt. Three shapes say how the wait GROWS — `Fixed` (the same wait every time)…
Mint a single-use link that completes exactly one waiting slot, for a third party who has no account and cannot sign in. The link is the permission:…
Declares WHO may hold or satisfy a `subscribe` slot. `Candidates` is one expression surface that dispatches on its return type: a `principal => bool`…
Let an inbound event find its run by a key the sender already knows — a tracking number, an invoice reference, an external id — when the sender has…
Wall-clock lead time for a run, split into the part somebody was working it and the part it sat waiting — plus where that time went, state by state…
Reads a running instance's lifecycle timeline — every transition, claim, deposit, reminder and refusal as an WorkflowAuditEntry you can filter and…
A kit can give an entity the app has not written yet a whole lifecycle: an Extensible base the app's own type derives from, a kit workflow that…
The whole shape of a workflow — every state (with its label, and whether it starts or ends a run) and every transition the declaration makes possible…
For an item whose history began before its run did — a ticket moved from another helpdesk, a seeded month of work — `StartedAt = <DateTime over…
A deploy that renames or removes a workflow state leaves runs parked in it with nowhere to stand. A workflow migration says, per state, what happens…
Start several pieces of work at once, each with its own compensation, and wait for them together. Writing `saga.Run("step", ...)` WITHOUT `await`…
Raise a typed event on the run bound to an entity, from anywhere — an ordinary server function, a webhook handler, a signup step. Two spellings do…
A reminder scheduled off a milestone. Its SCHEDULE is config in the header parens — `After` is the first fire (once, at `enter + After`), and the…
Named conditions that must hold before something may happen, declared on a state or on a slot — and readable as a live checklist so a screen can show…
A schedule the SLA clock accrues within — the platform WALKS its weekly windows (and holiday exceptions) to advance ticks and compute deadlines. The…
Ask a schedule the questions people and queues are asked — is it open now ("on shift"), when does it next open, how much working time lies between…
Every child workflow you AWAIT carries a label — a literal string you choose, naming that step. Awaiting parks the run, sometimes for days, which is…
Names the enum field a workflow owns and the state a run starts in. No application code may write that field, and when the workflow autostarts it…
One row per move this instance can make right now, with each arm's guard evaluated against it. A board offers only the lanes a card may actually…
A timer that measures REAL time instead of SLA time. Written as a block on any clock-declaring setting — `Expire`, `Deadline`, a milestone's…
A workflow body runs on a system data context, so its writes are NOT gated by the app's `security {}` blocks. The person who raised the event is…
A workflow you waited for can end badly — cancelled, or failed. `catch` is how you handle it; not catching it is how you let it travel onward, and…
Open a saga scope that couples each forward step with its compensation. `await saga.Run("step", step, () => Undo(…))` runs a child-workflow step and…
`Workflow.Current` is the workflow run this code is executing in — one value saying its id, the workflow's declared name, the state whose body is…
`Workflow.InRun` is true in a workflow's body and in everything that body calls — where `await Workflow.Run(…)` may wait for days — and false…
The current principal's queue: every slot they can act on, across every run of every workflow that tracks T. Rows carry the tracked entity typed, so…
Run something at most once per execution of its body, however many times a crash, a retry or a resume makes that execution run again. The first…
Re-evaluates every SLA clock's budget on the current run against the now-updated entity, so a mid-run change to the SLA terms (e.g. re-grading a…
Start the workflow bound to an entity's type, on that entity. Bare — `Workflow.Run(order)` — is fire-and-forget: start it and carry on. Awaited —…
Every live slot of every run tracking T, whoever holds it — the unfiltered sibling of Workflow.Inbox. Rows carry Budget, Elapsed and Remaining for…
One row per tracked ENTITY, where `Workflow.Work<T>()` is one per SLOT. A board, a queue and a "my work" screen are all per item: an item with three…
The platform raises an event when a workflow run starts, when it leaves one state for another, and when it ends — completed, failed or cancelled. Any…
Gates WHO may raise a workflow event. `[Authorize]` on an event is a `principal => bool` predicate over the acting principal and `this.Item`; a…
Inside any workflow body, `actor` is the principal whose action drove this dispatch — who deposited the event, who raised it, whose write started the…
Declare, once on a state, the condition under which that state is finished and where the run goes next. It is re-checked after anything happens in…
A `subscribe … foreach` over a RUNTIME entity collection expands into one wait slot per element of the collection, resolved at state entry. Each…
Run code when a run arrives in a state, and when it leaves. enter may redirect the run somewhere else; exit may not, because by the time it runs the…
One `subscribe` declaration that expands into MANY parallel wait slots — one per element of a collection. A fan-out over a literal enum list makes…
An `on` route is what a state does when an event arrives: a flat body, or guarded `when` arms tried top to bottom with a `default`. Inside an arm, a…
Per-slot ordering and conditioning. `After = [A, B]` holds a slot CLOSED (status `Pending`, no clock) until every named sibling slot is satisfied…
Declares that a workflow state waits on an event, and configures the wait — who may hold it, who may hand it on, whether it is armed at all, and what…