Configuration Reference

WOML has two different configuration layers. <config> defines how one workflow is admitted and timed. woml.runtime.json defines how the host process stores state, listens, logs, and exposes operations. Keeping them separate prevents deployment details from leaking into the workflow language.

Workflow config

WOML
<config concurrency="4" rate-limit="100/1m" timeout="10m" queue="orders" />
AttributeContract
concurrencyPositive maximum active runs, up to 1,000,000.
rate-limitPositive count and duration such as 100/1m.
timeoutTotal execution deadline from 1ms through 365d.
queueLowercase scheduling lane, maximum 128 characters.

Example interpretation:

WOML
<config concurrency="4" rate-limit="100/1m" timeout="10m" queue="orders" />

At most four runs of this workflow execute concurrently. No more than 100 are admitted per rolling minute according to the frozen policy contract. A run cannot execute beyond ten minutes. Eligible work uses the orders scheduling lane.

These policies are durable. Restarting the host does not intentionally erase the queue or reset the truth of admitted runs. See Runtime Policies for behavior under pressure.

Runtime config

woml.runtime.json uses schemaVersion: 1. Supported fields include deploymentName, statePath, public and admin host/port, logging format/level/directory, workers, shutdownTimeoutMs, health/metrics switches, retention policy, and backup directory.

JSON
{
  "schemaVersion": 1,
  "deploymentName": "order-automation",
  "statePath": "./data/workflow-history.sqlite",
  "public": { "host": "127.0.0.1", "port": 3000 },
  "admin": { "host": "127.0.0.1", "port": 3001 },
  "logging": {
    "format": "json",
    "level": "info",
    "directory": "./logs"
  },
  "workers": 4,
  "shutdownTimeoutMs": 30000,
  "observability": { "health": true, "metrics": true },
  "retention": {
    "enabled": true,
    "succeededAfterDays": 30,
    "failedAfterDays": 90,
    "cancelledAfterDays": 30,
    "maintenanceHourUtc": 3
  },
  "backup": { "directory": "./backups" }
}
FieldMeaning
schemaVersionRequired runtime configuration contract; exactly 1.
deploymentNameStable lowercase segmented identity, up to 128 characters.
statePathDurable SQLite authority. Relative paths resolve from the config file.
publicListener for public triggers such as webhooks and events.
adminLocal operations listener; production remains loopback-only.
logging.formattext for people or json for collectors.
logging.levelerror, warn, info, or debug.
logging.directoryRuntime log destination.
workersBun worker capacity from 1 through 256.
shutdownTimeoutMsGraceful drain window from 1,000 through 300,000 ms.
observabilityEnables local health and Prometheus metrics endpoints.
retentionAutomatic terminal-run retention by outcome, 1–3,650 days.
backup.directoryDefault location for operational backups.

Workers range from 1–256 and shutdown timeout from 1,000–300,000 ms. Admin remains loopback-only in production. Precedence is explicit CLI option, reviewed WOML_RUNTIME_* variable, config file, then safe default.

Configuration precedence

When the same reviewed setting appears in multiple places, WOML uses:

  1. Explicit CLI option.
  2. Supported WOML_RUNTIME_* environment variable.
  3. woml.runtime.json value.
  4. Safe built-in default.

Use CLI overrides for temporary operational changes, not as an undocumented permanent deployment configuration.

Validate before deployment

Terminal
woml check workflows/ --config woml.runtime.json

This verifies configuration shape, relevant paths and listeners, workflow contracts, and referenced production secrets without activating triggers.