Cloudflare - v1.3.0
    Preparing search index...

    Interface WorkflowSettings

    Settings for a Workflows binding.

    The binding name, plus how long a finished instance's state is kept. Nothing else about a Workflow is configurable from this side: its steps, retries and timeouts are written into the WorkflowEntrypoint class itself, and the workflow's own name and script live in wrangler.json. An accessor starts instances and reads them back; it does not shape what they do.

    Retention is here for the same reason KV's expirationTtl is — it is a deployment policy rather than a per-call decision, and a Worker that forgets it should still get a bounded answer rather than the maximum the account allows.

    1.3.0

    interface WorkflowSettings {
        binding: string;
        errorRetention?: WorkflowSleepDuration;
        successRetention?: WorkflowSleepDuration;
    }

    Hierarchy (View Summary)

    Index
    binding: string

    Name of the binding as declared in wrangler.json.

    errorRetention?: WorkflowSleepDuration

    How long the state of an instance that errored is retained.

    Usually the longer of the two: a failed run is the one someone comes back to read.

    successRetention?: WorkflowSleepDuration

    How long the state of an instance that completed successfully is retained.

    Unset leaves Cloudflare's own default in force, which is the longest period the account allows.