Osy#betaRun it on Osyrin: osyrin.com

Reference

Workflow

54 pages.

Automatic durability (steps you do not have to write)

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…

Inbox.Notifications — the people the inbox names, told in their bell

`Osysharp.WorkQueues.Notifications` joins `Osysharp.WorkQueues` to `Osysharp.Notifications`: the person an item is offered to, the cover it is handed…

People in business processes — what a run asks of people, told on the run (HumanRequests.Processes kit)

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…

Processes — every run of a business process, listed and read from start to now (Processes kit)

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…

Tasks that wait (Task.WhenAll across days)

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…

The WorkQueues kit — queues, who holds what, and the service levels promised on any item

`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…

What happens to work a run stops waiting for

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…

Workflows (the run that outlives the request)

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…

Workflows that outlive the code that started them

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…

Acting on an inbox row (deposit, claim, release)

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…

An entity's lifecycle — a workflow that tracks its status, or one function per move

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`…

Assign — handing a slot to a named colleague

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…

Assigned / Finished (milestones)

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)…

Backoff (retry policy)

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)…

Callback URLs — letting an outsider complete one slot

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:…

Candidates (slot)

Declares WHO may hold or satisfy a `subscribe` slot. `Candidates` is one expression surface that dispatches on its return type: a `principal => bool`…

Correlation — finding a run by a business key

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…

Flow metrics — how long an item took, and how much was waiting

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…

For(entity).Audit

Reads a running instance's lifecycle timeline — every transition, claim, deposit, reminder and refusal as an WorkflowAuditEntry you can filter and…

Give any entity a lifecycle from a kit

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…

Graph — every state and every transition of a workflow

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…

Imported history — StartedAt, and raising an event at the time it happened

For an item whose history began before its run did — a ticket moved from another helpdesk, a seeded month of work — `StartedAt = <DateTime over…

Migrating runs that are still in flight

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…

Parallel legs (start several, then wait for them)

Start several pieces of work at once, each with its own compensation, and wait for them together. Writing `saga.Run("step", ...)` WITHOUT `await`…

Raising a workflow event

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…

Remind (milestone reminders)

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…

Requires — named preconditions, and the live checklist

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…

ServiceHours (SLA-accrual windows)

A schedule the SLA clock accrues within — the platform WALKS its weekly windows (and holiday exceptions) to advance ticks and compute deadlines. The…

ServiceHours.IsOpen, NextOpen, BusinessTime, After

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…

Step labels (naming a child run so it survives a new version)

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…

Tracks and Initial (the field a workflow drives)

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…

Transitions — where this item may go next

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…

Wall-time clocks (Accrues = false)

A timer that measures REAL time instead of SLA time. Written as a block on any clock-declaring setting — `Expire`, `Deadline`, a milestone's…

What a workflow body may write

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…

When a child is cancelled or fails

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…

Workflow.BeginSaga (a compensating saga scope)

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 (which run is this code in?)

`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 (can this code wait?)

`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…

Workflow.Inbox&lt;T&gt; (what is waiting for me)

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…

Workflow.Once (run a step at most once)

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…

Workflow.Retarget (re-base the SLA clocks)

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…

Workflow.Run (start a workflow)

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 —…

Workflow.Work&lt;T&gt; (everything outstanding) and its SLA numbers

Every live slot of every run tracking T, whoever holds it — the unfiltered sibling of Workflow.Inbox. Rows carry Budget, Elapsed and Remaining for…

Workflow.WorkByItem&lt;T&gt; (one row per item — the board read)

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…

WorkflowRunStarted, WorkflowRunMoved, WorkflowRunEnded — hear a run start, move and end

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…

[Authorize] (event)

Gates WHO may raise a workflow event. `[Authorize]` on an event is a `principal => bool` predicate over the acting principal and `this.Item`; a…

actor — who just did this

Inside any workflow body, `actor` is the principal whose action drove this dispatch — who deposited the event, who raised it, whose write started the…

complete when (a state's own completion condition)

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…

dynamic fan-out (foreach over a runtime collection)

A `subscribe … foreach` over a RUNTIME entity collection expands into one wait slot per element of the collection, resolved at state entry. Each…

enter and exit (a state's arrival and departure hooks)

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…

fan-out (foreach subscribe)

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…

on — a route and its arms

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…

slot dependencies (After / When / Pending)

Per-slot ordering and conditioning. `After = [A, B]` holds a slot CLOSED (status `Pending`, no clock) until every named sibling slot is satisfied…

subscribe

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…