Migrating from Temporal
FluidGrids durable functions follow Temporal's programming model: deterministic workflow functions replayed from an event history, activities for side effects, signals, timers and child workflows. FluidGrids runs that model as a managed service, on the same engine as its visual builder, so there is no server or worker fleet to operate for managed runs. Existing Temporal code does not run unchanged, because the SDKs differ, but porting is mostly mechanical.
Concept map
| Temporal | FluidGrids |
|---|---|
Workflow definition (async function in the TypeScript SDK) | workflow(name, options, async (ctx, input) => …) |
proxyActivities and an activity call | ctx.run(nodeOperation, options) for a FluidGrids node, or ctx.activity(declaration, options) for your own code on a self-hosted worker |
Activity implementations, Worker.create | implementActivity, Worker.create from @fluidgrids/workflows/worker, or fluidgrids worker run |
| Task queues | Task queues: managed, or self-hosted queues your workers serve |
defineQuery, defineUpdate, setHandler | defineQuery, defineUpdate, ctx.handleQuery, ctx.handleUpdate |
| Workflow reset | fluidgrids runs reset, or Reset on the run page |
Search attributes, upsertSearchAttributes | Search attributes, ctx.upsertSearchAttributes |
| Schedules (overlap policies, catch-up window, backfill) | A Schedule Trigger with a schedule policy |
| Asynchronous activity completion | completeAsync() and fluidgrids activities complete |
| Batch operations | Batch in the Runs list, fluidgrids runs batch |
sleep, condition | ctx.sleep, ctx.condition |
defineSignal, setHandler, condition | defineSignal, ctx.onSignal or ctx.signalReceived |
executeChild, startChild, ParentClosePolicy | ctx.child, ctx.startChild, parentClosePolicy |
patched, deprecatePatch | ctx.patched, ctx.deprecatePatch |
CancellationScope, isCancellation | ctx.cancellationScope, ctx.nonCancellable, ctx.isCancellation |
continueAsNew | ctx.continueAsNew |
ApplicationFailure | ApplicationError with a FluidGrids error type |
uuid4, deterministic Date and Math.random | ctx.uuid(), ctx.now(), ctx.random() |
TestWorkflowEnvironment, Worker.runReplayHistory | TestWorkflowEnvironment, replay, fluidgrids replay |
| Namespace | Workspace |
| Worker build ids | The build id of the version's code bundle |
| Temporal UI event history | The run's History tab |
temporal CLI | fluidgrids CLI |
Porting a workflow
- Create a project with
fluidgrids init --lang tsand runfluidgrids codegen. - Move the workflow function into
workflows/<key>.ts, wrapped inworkflow(). Replace the module-level SDK functions with thectxmethods above. - For each activity, check whether a FluidGrids node already does the job (HTTP Request, Data Table, Slack, Stripe and the rest of the Node Store). Call it with
ctx.run; credentials then live in FluidGrids connections, not in your code. Keep the rest as user activities: declare them withdeclareActivity, call them withctx.activity, and serve them from a self-hosted worker on a task queue of your own. - Write tests with
@fluidgrids/workflows/testing, thenfluidgrids push.
Differences to plan for
- Workflow code is sandboxed. Managed workflow code has no network, clock or filesystem, and may import only pure-JavaScript ES modules.
- Each version keeps its own code. A run always continues on the bundle it started with, so you rarely need
patched(); use it for hotfixes of in-flight runs. - Retries use FluidGrids error types. Retry policies take
maxRetries,retryDelay,backoffMultiplier,maxDelayand the error types to retry or not. - No separate schedule objects. Schedules are triggers on the workflow and are versioned with it, with the same overlap and catch-up policies.
- TypeScript and Python. Durable functions are written in TypeScript or Python; there are no Go, Java or .NET SDKs.
- No self-hosted server. FluidGrids is the service. Workers are the only part that runs on your infrastructure, and they connect outbound only.
Workflow ids are unique per workflow key within a workspace, not per namespace.