@DBOS.workflow() / DBOS.registerWorkflow(fn) / dbos.RegisterWorkflow(ctx, fn) | a registered function (@resonate.register, resonate.register("name", fn), #[resonate::function], resonate.Register(r, "name", fn)) |
@DBOS.step() / DBOS.runStep(fn) / dbos.RunAsStep(ctx, fn) | a plain function invoked via ctx.run(fn, args) |
DBOS.start_workflow(fn, ...) / DBOS.startWorkflow(fn)(...) / dbos.RunWorkflow(ctx, fn, args) (child workflow) | ctx.rpc("name", args) or ctx.run(fn, args) — invoke by registered name; recursion is trivial |
durable queue: DBOS.register_queue + DBOS.enqueue_workflow(...) then handle.get_result() (fan-out) | start each non-blocking (ctx.beginRun / ctx.rfi / .spawn() / ctx.RPC), then await each |
DBOS.recv(topic, timeout) (block for a message) | one latent durable promise: p = ctx.promise() then await p |
DBOS.send(destId, msg, topic) (deliver from outside) | resonate.promises.resolve(id, value) (HTTP-addressable from anywhere) |
DBOS.set_event(key, value) / DBOS.get_event(wfId, key) (publish/read status) | the promise's own resolved value is the status; read it by id |
DBOS.sleep(...) | ctx.sleep(duration) |
@DBOS.scheduled(cron) / DBOS.create_schedule(...) / dbos.WithSchedule(cron) | resonate.schedule(id, cron, fn) (ts/rust) or resonate.schedules.create(...) (py) |
| try/except + explicit undo step (no saga DSL) | inline ctx.run(undo, …) in the error branch, guarded by what completed |
systemDatabaseUrl Postgres (or Python SQLite default) | nothing — the Worker runs in-memory until you connect a Resonate Server |