An approval waits a week for a manager, a claim waits for a document, an order waits for a carrier. With Osy#, that work keeps its place through restarts and releases, reaches the right person or AI agent under your rules, and moves onto your improved process the day you ship it.
Each of these is in the language today. The code beside it is real, from the Osy# reference and demos, so you can see how little of it there is.
The process lives on the record it moves. An invoice's status is the approval's own state, so a list, a dashboard or a report always agrees with what is actually happening. There is no second system to ask and nothing to keep in step.
enum InvoiceStatus { Submitted, Approved, Escalated } entity Invoice { [Required, MaxLength(60)] string Reference; decimal Amount; InvoiceStatus Status = InvoiceStatus.Submitted; } workflow Approval { Tracks = Invoice.Status; Initial = Submitted; event Approve(); state Submitted { Expire = TimeSpan.FromDays(2); // nobody acted → the clock acts subscribe Approve(); // a person acts → a transition on Approve { goto Approved; } on Expire { goto Escalated; } } terminal success Approved { } terminal cancel Escalated { } }
Real processes wait for days, and the business does not stop changing while they wait. Most engines leave you two choices: hold the change until old work drains, or keep old code alive until the last case is done. With Osy# you ship the better process today, and the work already under way moves onto it, every case in its right place.
Old and new versions run side by side, and each case can finish on the version it started on.
Move it later, in a window you choose. Nothing is lost by waiting.
Say, step by step, what each one means in the new version: stay, move to a renamed step, or close with a reason that goes on the record.
The same move can update the case's own data, all or nothing.
The release moves the running work as its last act. Who holds each task, every deadline and every link already sent out move with it.
A case several releases behind catches up one release at a time, in order.
migration OrderFlow v2 -> v3 { on Submitted { keep; } on AwaitingPayment { goto Reviewing; } on Abandoned { terminate cancel "no route"; } on Fulfilling { keep; reenter; } on Escalated { this.Item.Priority = 3; goto Reviewing; } on AwaitingApproval { keep; rename slot Payer -> Payee; drop slot LegacyApprover; carry clock Finished on Payee; } map event Submit(amount) -> Submit(amount, source = "callback"); }
Before a change ships, osy migrate prove parks one case on every step of the old version, applies your change, and checks that each one waits, keeps its deadlines and reacts to its next timer exactly like a case started fresh on the new version. It covers the steps nobody happens to be waiting in today.
When Osyrin moves your app to a newer platform release, the move can be rehearsed on a copy of your data with the tests you shipped, and a backup is taken before anything is written.
Compiling the old version (main)…
Parked 7 run(s) on app.
Migration proof app → app_v2
OrderFlow, 6/7 state(s) passed
✓ AwaitingPayment: moved
✓ Review: moved → Reviewing (Expire: the new handler ran)
✗ Hold: refused
refused: state 'Hold' has no match in 'app_v2'
6 of 7 state(s) passed; 1 failed.
Say who may take a piece of work, what it waits on and how late is too late. The engine runs the queue, the reminders and the escalation, so a request never quietly stalls on someone's desk.
workflow ExpenseApproval { Tracks = Expense.Status; Autostart = true; Initial = Approvals; RunsAs = ExpenseApprovalRouter; event Approve(Decision decision); state Approvals { subscribe Approve(Decision decision) as Manager { Assignee = this.Item.Employee.Manager; Finished { Within = TimeSpan.FromDays(2); Unfinished { goto Rejected; } } } subscribe Approve(Decision decision) as Finance { Candidates = u => u.Department == Dept.Finance; Assigned { Within = TimeSpan.FromHours(4); } Finished { Within = TimeSpan.FromDays(2); Unfinished { goto Rejected; } } } subscribe Approve(Decision decision) as Cfo { When = this.Item.Amount > 10000; After = [Manager, Finance]; Candidates = u => RoleGrant.Any(g => g.Grantee == u && g.Level == AppRole.Cfo) && u != Manager.Assignee; Finished { Within = TimeSpan.FromDays(3); Unfinished { goto Rejected; } } } on Approve(Decision decision, Slot slot) { when (decision == Decision.Reject) { this.Item.RejectedBy = slot.Assignee; goto Rejected; } default { new Approval { Expense = this.Item, By = slot.Assignee, At = DurableClock.Now }; } } on Complete { goto Approved; } // every slot that EXISTS is satisfied } terminal success Approved { } terminal error Rejected { Message = "expense rejected"; } }
Hand the routine checks to an AI agent and keep control of the outcome. If the agent finishes, fails, is stopped or runs out of budget, your process decides what happens next, and a person can take over.
Read more in the agents guide on osysharp.com.
workflow Qualification { Tracks = Supplier.Stage; Initial = Screening; state Screening { enter { var check = await Agents.Of<Screener>().For(this.Item).Do(new CheckDocuments(), this.Item); if (check.Done && !check.Result.Complete) { goto Incomplete; } // the typed result decides goto Assessing; } } state Assessing { enter { var risk = await Agents.Of<Assessor>().For(this.Item).Do(new AssessRisk(), this.Item); if (!risk.Done) { Processes.Problem("The assessor could not finish, so the risk officer assesses this supplier by hand."); goto ByHand; } goto Deciding; } } }
[Actor(Roles = [ShopRole.Helper])] public class Estimator : Agent { public override Permits May => new Permits { Alone = [Actions.Of(NoteRepair)], // it writes its note by itself Never = [Actions.Of(ScrapRepair)], // and it never scraps a repair }; // everything else that changes anything is PROPOSED }
A process can wait on a person, a timer or another process for days, and pick up exactly where it was, even in a release that did not exist when it began.
await using var saga = Workflow.BeginSaga(); try { var reservation = Workflow.Once("make-reservation", () => new Reservation { Fulfillment = this.Item }); await saga.Run("reservation", reservation, () => ReleaseStock(reservation, trace)); var charge = Workflow.Once("make-charge", () => new Charge { Fulfillment = this.Item }); await saga.Run("charge", charge, () => RefundCharge(charge, trace)); saga.OnUnwind(() => ReleaseHold(trace)); …
on Expire { var hold = Http.Post(Stock + "/holds", body, "application/json"); // 200: read back on the retry, not held twice var r = Http.Post(Carrier + "/send", mail, "application/json"); // 503: asked again on the retry if (!r.IsSuccess) { throw new ExternalServiceException("the carrier answered " + r.StatusCode); } goto Sent; }
Access rules are part of the process, so they hold on every way into it: a page, an API call, an AI tool, a webhook or a test. An auditor's question has an answer on the record.
Coming Every case will record who asked for it, and the process will reach no further than that person could.
[Actor] public class OrderDesk { public static Staff Principal => new Staff { Name = "Order desk", Email = "[email protected]" }; } workflow OrderLifecycle { Tracks = Order.Status; Autostart = true; Initial = Placed; RunsAs = OrderDesk; [Authorize(u => RoleGrant.Any(g => g.Grantee == u && g.Level == AppRole.Manager))] event Cancel(); state Paid { subscribe Ship(string tracking) as Fulfil { Candidates = u => RoleGrant.Any(g => g.Grantee == u && g.Level == AppRole.Fulfillment); } on Fulfil(string tracking) { this.Item.Tracking = tracking; goto Shipped; } } … }
You don't build an inbox, an audit trail or a dashboard for each new process. They come from the same few lines that describe it.
Queues, work boards and next steps appear live in your app's pages. Act on a task and it leaves the queue.
Let another system or an AI assistant move a case through an API or a tool, under the same rules as a person.
Every step, hand-over, reminder, missed deadline and refusal is on the record, ready to filter and count.
Lead time split into working time and waiting time, step by step, even for cases that finished before anyone asked.
One command names what a case waits for, who may act on it and when its next deadline falls.
Open a finished case at the line that failed, with the values it saw. Breakpoints work in your editor.
Tests in the same language, with a clock you move forward, so deadlines fire on demand and outside calls are stubbed.
Send one task to a list of reviewers and move on when enough of them have answered.
Clocks count only within the opening hours and holidays you set.
Camunda 8, Temporal, n8n and AWS Step Functions can all do these jobs. What differs is the effort: how many systems you run, how much glue your team writes and keeps working, and what still holds when the process changes. Here is that effort, job by job.
A customer files a claim. An AI agent checks it against the order. Finance approves it, and if nobody picks it up within four hours it goes to the team lead. The refund is paid through the payment provider, exactly once. Customers see only their own claims, and every step records who acted.
| You run | You write by hand | Who may act, who sees what | |
|---|---|---|---|
| Camunda 8 | Zeebe, Operate, Tasklist and Identity, beside your app and its database. | Job workers for the agent call and the payment, an idempotency key for the charge, and code that copies process status onto your row. | Candidate groups in Tasklist; which claims each person may read is enforced again in your own API. |
| Temporal | Temporal Service or Cloud and your worker services, beside your app and its database. | Activities for the agent and the payment, signal handlers, your own task table, inbox and assignment logic, and status sync to your row. | Checked in your API before it sends a signal; row access is your application's job. |
| n8n | An n8n instance, beside your app and its database. | HTTP nodes for the agent and the payment, a wait with a timeout branch for the escalation, a form or chat message for the approval, and a write-back to your database. | Whoever receives the form or message can answer; data access is your app's job. |
| Step Functions | The state machine, Lambda functions, a database, Cognito and API Gateway, plus your UI. | Lambdas for the agent and the payment, storing task tokens and calling back from your approval UI, a timeout path for the escalation. | IAM for the AWS calls; who may approve and which rows each user sees live in your Lambdas and API. |
// who sees which rows: once, on the entity security { allow read where Owner == user; } // the AI check: a typed step, charged to the run var check = await Agents.Of<Screener>().For(this.Item).Do(new CheckDocuments(), this.Item); // the approval, its pool and its escalation subscribe Approve(Decision decision) as Finance { Candidates = u => u.Department == Dept.Finance; Assigned { Within = TimeSpan.FromHours(4); Unassigned(Slot approver) { var lead = Person.Single(u => approver.Candidates(u) && u.IsLead); approver.Assign(lead); } } } // an outbound call: recorded, never made twice var r = Http.Post(Carrier + "/send", mail, "application/json");
Workflow.Inbox<Claim>() is each person's queue, live.You rename a state, add a second approver and cut an SLA from four hours to two. Hundreds of claims are waiting at different steps, some with a person, some on a timer, some with a supplier holding a callback link.
| What happens | You write by hand | What can still break | |
|---|---|---|---|
| Camunda 8 | The new version deploys beside the old; running instances stay on the old one. | A migration plan with mapping instructions per element, run as a batch in Operate or through the API, while workers and your status copy serve both versions. | Some changes cannot be mapped, and problems surface when the batch runs. |
| Temporal | Running workflows must still replay against the new code. | patched or GetVersion branches kept until old runs finish, or old workers kept alive under worker versioning, plus replay tests against saved histories. | There is no mapping of where a run stands; a missed branch is a non-determinism error at run time. |
| n8n | Waiting executions are not moved onto the edited workflow. | Let them finish on the old logic, or cancel and re-run them, and repair your data by hand. | Nothing checks the change against the runs in flight. |
| Step Functions | A new version publishes; running executions finish on theirs. | To move work: stop executions and start new ones with hand-built input, with Lambdas compatible with both. | Nothing maps an execution's position or its timers. |
migration OrderFlow v2 -> v3 { on Draft { keep; } on AwaitingPayment { goto AwaitingSettlement; } on AwaitingApproval { keep; carry clock Finished on Payee; } }
osy compile --generate-migration osy migrate prove --from main osy deploy --migration <file>
Months later, someone asks who approved claim 4711 and on whose behalf. Today, the operator asks why 30 claims have waited three days, and who could move them.
| What you get | What you add yourself | |
|---|---|---|
| Camunda 8 | Instance history and incidents in Operate; durations in Optimize. | Joining task history to your business rows and your own users; a status view for customers. |
| Temporal | A full event history of every signal, timer and activity. | Who sent a signal is known only if you put it in the payload; queues, SLAs and "waiting on whom" are yours to model and show. |
| n8n | An execution log per run. | Approver identity is whatever the form captured; SLA reporting is yours. |
| Step Functions | Execution history, CloudWatch and X-Ray. | Who approved is known only if your approval API records it; SLA tracking is yours. |
ExpenseApproval.For(expense).Audit // every transition, claim, reminder, refusal Workflow.Work<Expense>() // open slots: budget, elapsed, remaining osy workflow-run <id> # why it waits, and who may act
| Osy# | Camunda 8 | Temporal | n8n | AWS Step Functions | |
|---|---|---|---|---|---|
| Modelling | Declarative state machine in a typed language, next to the entities it moves. | BPMN 2.0 diagrams (plus DMN), executed by Zeebe; logic in job workers. | Workflows as ordinary code in an SDK, made durable by deterministic replay. | Visual node graph, with JavaScript or Python code nodes. | Amazon States Language (JSON or YAML), with a visual editor. |
| Where state lives | On the business row (Tracks), in the app's database and the same transaction. |
In the engine's partitioned log, exported for Operate; your business data lives elsewhere. | In the Temporal service's event history; your database is kept in step by activities. | Execution data in n8n's own database. | In the execution's JSON state inside AWS, with a payload size limit. |
| Typing and compile checks | Compiled. States are enum members, events and guards are typed, SLAs and migrations are checked, writes to the state field are refused. | Model linting in the Modeler; process variables are untyped JSON. | Your SDK language's types; non-determinism shows up at replay. | Checked at run time; expressions are untyped. | Definition validated on save; data paths resolved at run time. |
| Human in the loop | Built in: slots, Candidates, claim and hand-over, ordering, quorums, SLAs with breach arms, reminders, typed inboxes, links for people without accounts. | BPMN user tasks, Tasklist, forms, candidate users and groups. | Signals and updates; task lists, assignment and UI are yours to build. | Wait node, forms, and send-and-wait steps on chat and email nodes. | Task tokens for callbacks; the inbox and UI are yours to build. |
| AI agents | Agents as declared actors with their own account, permits, propose-before-acting approvals, typed results and cost charged to the run. | AI agent connector for agentic steps inside BPMN. | A popular base for durable agent loops written in code; governance is yours. | AI Agent nodes with a wide choice of model and tool nodes. | Direct calls to Amazon Bedrock and other services. |
| Versioning and live migration | Per-state migrations, exhaustive and compiler-checked; slots, clocks and callback links carried; proven on every state before deploy; stay, by-state or move-all. | Running instances stay on their version unless moved with process instance migration and mapping instructions. | No state mapping: code changes are guarded with patching (patched / GetVersion) or worker versioning, so old histories still replay. |
No migration of waiting executions to a new workflow version. | Versions and aliases; a running execution finishes on its version. |
| Security model | In the declaration: RunsAs actors, fail-closed [Authorize] doors, Candidates per slot, row-level rules in bodies, every change stamped. |
Identity with OIDC and resource authorizations; data rules in workers are yours. | mTLS, namespaces, a pluggable authorizer and payload encryption; row rules are yours. | Users, projects and roles; a credentials store. | IAM roles and policies per state machine and task. |
| Multi-tenancy and policy | Organizations on Osyrin; the organization's policy applies on top and can only narrow. | Tenant ids across engine and tools. | Namespaces. | Projects; separate instances for hard isolation. | AWS accounts and IAM. |
| UI | Your app's own pages, live, from Inbox, Work and Transitions; a run drawn on a canvas (preview). |
Modeler, Tasklist, Operate and Optimize. | Web UI for operators; end-user UI is yours. | Editor canvas and execution log. | AWS console and Workflow Studio. |
| API surface | Typed raise from any function; REST endpoints and MCP tools by declaration; callback links; correlation keys for webhooks. | REST and gRPC APIs, client SDKs, message correlation, connectors. | gRPC API and SDK clients: signals, queries, updates. | Webhook triggers, a REST API and a large integration catalogue. | AWS APIs and SDKs; direct integrations with many AWS services. |
| Observability | Run timeline, flow metrics per state, traces to the source line, and a command that says why a run waits. | Operate for instances, Optimize for analytics, exporters. | Full event history per execution, metrics and tracing. | Execution log per run. | Execution history, CloudWatch and X-Ray. |
| Testing | Tests in the same language, a test clock, timers fired on demand, stubbed calls, a debugger, and osy migrate prove. |
Process test libraries with an embedded engine. | Test environments with time skipping, and replay tests against saved histories. | Manual runs with pinned data; evaluations for AI workflows. | The TestState API for single states. |
| Hosting and ops | Osyrin Cloud, and a full local platform for development; one database, no separate engine cluster. Self-hosted production is coming. | SaaS, or self-managed on Kubernetes with brokers, gateway and a search store. | Temporal Cloud, or a self-hosted cluster of services plus its database. | n8n Cloud, or self-hosted under its fair-code licence. | Fully managed, on AWS only. |
Competitor details come from their public documentation. Features and editions change, so check the current release when you evaluate.
Osy# is built for the process at the heart of a business application, where people and agents do the work, the status lives on your data, the rules hold on every path, and the process keeps improving while work is in flight. Also looking at Inngest or Airflow? They run durable functions and data pipelines; the human work, the status on your records and moving waiting work to a new version are still yours to build.
With a separate engine, every process needs a database, an access layer and screens around it, plus the code that keeps them agreeing. In Osy# they are one description, so your team maintains one thing.
Nothing to keep in sync, because there is only one copy of each fact.
Install the CLI from osysharp.com/install. Everything below runs against a local platform with no account.
# a new project, and a local platform osy init --agent claude osyrin dev # the workflow reference, in your terminal osy docs workflow # tests, with a test clock osy test # what is in flight, and why one run waits osy workflow-runs osy workflow-run <id> --raise Approve # change a state, then prove the migration osy compile --generate-migration osy migrate prove --from main osy migrate --dry-run
Bring the workflow that hurts most today. Write to [email protected] and we will build it with you.
Osy# is the language. Osyrin is the application operating system it runs on, and Osyrin Cloud runs it for you.