Skip to content
Development preview · 2.0.0-SNAPSHOT

CompileFlow Configuration

Applications read, convert, and validate external configuration before passing immutable settings to their runtime components. Process execution uses those settings; it does not read them again from environment variables, JVM system properties, or a mutable global resolver.

The engine manages the executors, caches, and extension instances it creates. The application manages objects supplied through configuration, such as a routing source. Engines may share immutable settings, but each creates its own extension instances. Application objects shared through those settings must meet their documented thread-safety requirements.

This page lists the supported property names, types, units, enum values, behavior, and accepted ranges. Undocumented implementation fields and aliases are not supported.

For a first integration, follow the quick start. Use the table below to find settings for an existing component, or see programmatic configuration for plain Java applications.

Component Configuration prefix Scope Configuration type
Java engine compileflow.engine.* Engine and its process-format modules ProcessEngineProperties -> ProcessEngineConfig
Deployment compileflow.deploy.* Control plane and deployment runtime Immutable settings for deployment components
Durable runtime compileflow.durable.* Durable runtime CompileFlowDurableProperties -> DurableProcessEngineConfig
Workbench Server compileflow.workbench.server.* Java application CompileFlowWorkbenchServerProperties
Workbench execution compileflow.workbench.execution.* Java application WorkbenchExecutionProperties
Durable preview compileflow.workbench.preview.* Isolated preview host WorkbenchPreviewProperties
Local development gateway COMPILEFLOW_DEV_GATEWAY_* Local Node.js process Frozen DevGatewayConfig
Web application VITE_COMPILEFLOW_* Vite build Frozen AppBuildConfig

Local deployment templates also use environment variables to configure containers. Compose converts COMPILEFLOW_WORKBENCH_DATABASE_* into PostgreSQL and standard Spring datasource settings. The loopback nginx container uses COMPILEFLOW_WORKBENCH_LOCAL_GATEWAY_UPSTREAM_API_KEY, derived from the same Workbench Server key. These variables do not enter the browser build, and Java and Node application code do not parse them again.

Spring Boot uses its standard property-source precedence and relaxed binding. Omitted values use the defaults below. Invalid values, invalid combinations, and unknown managed Server, Dev Gateway, or Web variables fail startup or the Web build. Unknown fields within a supported prefix are also rejected when they come from an enumerable Spring property source.

Raw system-environment and JVM system-property sources are excluded from this unknown-field scan; their known relaxed-binding names still work. Workbench Server separately checks the names of its COMPILEFLOW_WORKBENCH_SERVER_CONFIG_* aliases against a whitelist. Engine, Deploy, and Durable settings are not refreshed dynamically. Create a new engine or restart the component that uses them to apply a change.

Minimal configuration:

compileflow:
engine:
enabled: true

All engine Duration settings use whole milliseconds and must fit a Java long millisecond value. Positive durations are at least 1ms; settings documented as non-negative may use 0ms. Finer precision or out-of-range values fail configuration validation instead of being truncated or causing an arithmetic error during engine construction.

ProcessExecutionOptions applies to one invocation. Pass the invocation ID through these options to execute(...) or trigger(...). For Alias invocations only, you can also provide a routing key and policy attributes:

ProcessExecutionOptions options = ProcessExecutionOptions.builder()
.invocationId("order-20260716-42")
.aliasRouting(new AliasRoutingOptions("user-7", Map.of("region", "eu-west")))
.build();
engine.execute(
ProcessRef.alias("default", "order.process", "prod"),
variables,
options).orElseThrow();

The engine keeps an immutable copy of these options. Routing attributes are strings and do not become process variables or outputs. Raw routing keys and attributes are excluded from logs, events, results, and persisted records. Workbench Server persists a derived SHA-256 fingerprint for asynchronous request idempotency. Pass the Alias through ProcessRef.Alias, and invocation metadata and routing inputs through ProcessExecutionOptions. Keep them out of environment variables and the process-variable map. The __cf_ prefix is reserved for engine metadata and cannot be used by application routing attributes or root process variables.

The tables group settings into three levels. Essential settings enable and select features. Operational settings control production behavior. Advanced settings tune executors and diagnostics. Start with Essential settings and the defaults, review Operational settings before deployment, and adjust Advanced settings when measurements justify a change.

Level Property Default Constraint / purpose
Essential compileflow.engine.enabled true Creates the default ProcessEngine bean when the application has not supplied one.
Advanced compileflow.engine.runtime-mode COMPILED Selects the runtime mode; both COMPILED and INTERPRETED are publicly supported.
Operational compileflow.engine.call.max-depth 32 Root-inclusive synchronous process-call depth; from 1 through 256. A deeper nested or recursive call fails before its actions run and reports the call path.
Operational compileflow.engine.shutdown.timeout 15s Maximum caller wait for current operations to finish, executors to stop, and resources to close; at least 1ms. Timeout reports failure, but cleanup still waits for tasks to exit.

The enabled flag controls default engine bean creation. Configuration values are still bound and validated when it is false. When the application supplies no ProcessEngineConfig bean, the starter provides a default configuration. It creates immutable settings only when an engine or application requests that bean; the enabled flag does not control this behavior. Extension discovery and construction belong to the engine’s manager, not configuration binding.

Property Default Constraint / purpose
compileflow.engine.executor.runtime-load.max-concurrency min(2, max(1, CPUs / 8)) Maximum concurrent local runtime loads; positive.
compileflow.engine.executor.runtime-load.max-pending 4 Maximum additional runtime loads waiting for a slot; non-negative. 0 rejects immediately when all slots are busy.
compileflow.engine.executor.action-timeout.max-concurrency max(4, CPUs) Maximum concurrent actions requiring timeout enforcement; positive.
compileflow.engine.executor.action-timeout.max-pending 0 Maximum additional timeout-enforced action attempts waiting for a slot; non-negative. Defaults to immediate rejection when no worker is available. An explicitly configured queue consumes the action timeout budget.
compileflow.engine.executor.action-timeout.cancellation-grace-period 2s Maximum time to wait for an action to stop after timeout or cancellation; non-negative. 0ms skips the extra wait. Retry is rejected if the prior attempt has not stopped.
compileflow.engine.executor.parallel.coordinator-max-concurrency min(64, max(4, CPUs)) Maximum concurrent independent parallel groups; positive. Nested groups in the same engine share the outer group’s concurrency slot.
compileflow.engine.executor.parallel.coordinator-max-pending 0 Maximum waiting coordination groups; non-negative. Rejection happens before branch execution.
compileflow.engine.executor.parallel.cancellation-grace-period 2s Maximum time to wait for other branches to respond to cancellation after one branch fails; non-negative. 0ms skips the extra wait. Remaining branches are reported as an execution interruption.

The format-neutral Spring starter and Workbench Server create one engine for all installed process-format modules. Each definition specifies its model type, while executor and cache limits apply to the shared engine. For one format, use compileflow-spring-boot-starter-tbbpm or compileflow-spring-boot-starter-bpmn. For both, use the base starter with both frontend modules. COMPILED is the default runtime mode. Both COMPILED and INTERPRETED require a host with jdk.compiler for definition validation and runtime preparation.

Each parallel branch uses one orchestration thread. Java 21 and later use virtual threads. Java 17 uses a platform-thread executor with no queue and an internal limit of max(8, min(64, CPUs * 4)) threads. At that limit, the submitting flow thread runs the branch itself. This slows the submitting flow and lets nested work proceed while its parent is waiting.

Actions without a timeout run on the invoking flow thread; actions with a timeout use the bounded action-timeout pool. Compilation, action-timeout, and event pools reject excess work rather than run it on the submitting thread. Preflight has a separate pool with min(2, max(1, CPUs / 8)) workers and four pending tasks. Queue wait counts toward the preflight timeout, and a full pool rejects the request. Calling-thread execution is limited to parallel branch orchestration; it also keeps nested branches progressing while their parents wait.

These executor limits do not cap total calls to a downstream service. Virtual threads have no corresponding platform-thread ceiling, and Java 17 can use host request threads in addition to its executor threads. Use connection pools or explicit application concurrency limits to protect shared dependencies, accounting for every engine instance and replica. Pooling virtual threads does not provide this isolation; see OpenJDK’s guidance.

Property Default Constraint / purpose
compileflow.engine.max-resident-runtimes 2048 Maximum combined number of cached runtimes and runtimes retained by load or Deploy in this engine; positive.

When a new runtime needs a slot, the cache can evict runtimes that have no explicit retention owner. If no eligible runtime can be evicted, loading fails with CF_RUNTIME_001 (cause=CAPACITY); increasing the timeout does not free capacity. Release unused retained runtimes or adjust the resident limit after measuring memory use. In-flight invocations can retain evicted runtimes until they finish. This cache limit does not bound all live runtimes or JVM memory.

compileflow-core supports java scripts by default. The wrapper that declares the script’s input and output types is compiled when the process runtime loads. The compiled result remains with that runtime until it is released. The process version stores the original source. Bytecode is not persisted, and there is no execution-time compiler setting.

To use mvel expressions in your application, add com.alibaba.compileflow:compileflow-script-mvel to its runtime classpath. The engine discovers the executor automatically. The packaged Workbench Server includes both MVEL and QLExpress for preflighting, publishing, and executing flows authored in its designer. See the MVEL module guide for input mappings, supported syntax, and trust requirements.

Core provides the java script executor for trusted code by default. QLExpress 4 is optional: add com.alibaba.compileflow:compileflow-script-qlexpress. Its standard service declaration makes QlExpressScriptExecutor available automatically, without a bean or registration call; see Quick Start.

The supplied QL executor copies explicitly mapped inputs into a private data snapshot, blocks host-object method calls, and exposes a fixed set of safe functions. The interpreter uses a one-second cooperative timeout and limits QL array allocations to 10,000 elements per dimension. The input snapshot is created before the timeout starts, so its construction time is not included in that limit. See Security for accepted input types and resource limits. The supplied QL executor has no configuration option to change these rules. Annotate public no-argument executors with @ExtensionRealization and list their implementation class in META-INF/services/com.alibaba.compileflow.common.extension.Extension. For each language(), the unique highest-priority implementation wins; a tie fails assembly. Spring executor beans are not candidates. Use distinct keys when definitions in one engine need different language semantics. The QL executor stores data only in the Java heap and needs no close operation. Each engine creates its own extension instances and closes its AutoCloseable extensions after accepted work and executor tasks have actually exited. Custom executors define their own security, timeout, cache, and ClassLoader behavior.

Property Default Constraint / purpose
compileflow.engine.definition.max-size 4MB Maximum UTF-8/binary size of one inline or classpath definition; from 1B through the hard 100MB safety ceiling.

The loader reads at most max-size + 1 bytes and keeps one immutable copy for both schema validation and model parsing. Both steps therefore use exactly the same content. Classpath locations that resolve to HTTP, HTTPS, FTP, or FTPS are rejected. Retrieve remote artifacts through an authenticated application or deployment resolver.

Schema validation and stream parsing both limit XML nesting to 128 elements. The limit still applies when schema validation is disabled; exceeding it produces a definition-validation error. It does not limit sibling nodes, concurrency, or ProcessCall depth.

Property Default Constraint / purpose
compileflow.engine.runtime-load-timeout 10s Maximum synchronous caller wait for a runtime load; at least 1ms.
compileflow.engine.java-diagnostics.debug.symbols LINES NONE, LINES, or FULL; never writes files by itself.
compileflow.engine.java-diagnostics.debug.output-directory unset Exports an isolated compilation-<id>/ bundle for each compilation.
compileflow.engine.java-diagnostics.debug.bytecode-enabled false Also exports .class files; requires output-directory.

Runtime loading is in-memory by default. Debug output can contain generated source, scripts, expressions, constants, and class files. Treat the directory as sensitive, secure the configured root with OS permissions or ACLs, restrict retention, and do not place it under a served web root. Every compilation gets a unique compilation-<id>/ directory, containing package-relative source/, metadata/, and optional classes/ trees. The ID is included in metadata and logs. A complete marker is written only after compilation and all requested exports finish; incomplete bundles retain source for failed-compilation diagnosis. Concurrent compilations cannot overwrite one another’s artifacts. In IntelliJ IDEA, mark the selected bundle’s source directory as a Sources Root. Remove old bundles according to your diagnostic retention policy. Durable class names include the normalized full process code and a program-digest prefix, while the source header retains the original process code for direct identification.

A shared runtime-load task attempts Java compilation once, without retrying within that task. After correcting the definition or runtime environment, a later call can start a new load attempt. Deployment convergence and Workbench persisted asynchronous invocations use their own bounded retry policies.

runtime-load-timeout limits how long a synchronous caller waits. A caller timing out does not cancel a shared load. The task continues and, if successful, places the runtime in the node-local cache for later calls. The JDK compiler cannot reliably be stopped forcibly. Limit its resource use through definition size, concurrent runtime loads, and the number of pending loads.

compileflow:
engine:
runtime-load-timeout: 20s
executor:
runtime-load:
max-concurrency: 2
max-pending: 4
java-diagnostics:
debug:
symbols: FULL
output-directory: /var/lib/compileflow/debug-runtime
bytecode-enabled: true
Level Property Default Constraint / purpose
Operational compileflow.engine.observability.events.async true Uses bounded, best-effort asynchronous lifecycle-event delivery.
Operational compileflow.engine.observability.events.max-concurrency 2 Maximum concurrent lifecycle-event deliveries; positive.
Operational compileflow.engine.observability.events.max-pending 16 Maximum additional asynchronous event deliveries waiting for a slot; non-negative. 0 rejects saturated delivery.
Operational compileflow.engine.observability.mdc-propagation-enabled false Copies MDC across engine executor boundaries.

When Micrometer is on the classpath and a ProcessEngine bean exists, Spring registers the engine metrics binder. The binder can be created before MeterRegistry; Spring Boot binds it when a registry becomes available. Use management.metrics.enable.* to filter metrics. Programmatic ProcessObservabilityConfig contains only event-dispatch and MDC-propagation behavior.

Declare public no-argument event listeners with @ExtensionRealization and list their class names in the standard Extension service file. The framework creates them and orders them by descending priority, then ascending implementation binary name. The candidate list stays fixed for that engine; support(event) is evaluated for each event. Spring listener beans do not participate.

Lifecycle events are best-effort observations and may be dropped when the asynchronous queue is full or the engine is closing. Do not use them for business correctness, billing, audit, or reliable integration. Use application transactions and an Outbox for ProcessEngine execution, or the Durable Journal and Outbox for Durable execution.

With the PROCESS execution target, Workbench Server records the root-call results returned by published flows and attempts the database write before responding. Engine events.async does not control that write. Internal child calls and direct engine invocations do not add Workbench samples. Persistence RuntimeExceptions are isolated, while Errors propagate; these operational logs do not provide a durable audit guarantee. See Monitoring for sample scope and attribution fields.

TraceIdProvider supplies an identifier that connects logs and events for an invocation. It does not provide distributed tracing or context propagation. Declare a public no-argument implementation with @ExtensionRealization and list its class name in the standard Extension service file. The unique highest-priority implementation is selected; a tie fails assembly. Spring provider beans are not candidates.

A trace ID must contain 1–128 characters with no surrounding whitespace. The engine reuses a valid ID from the current execution context; otherwise it tries the configured provider, then the standard MDC traceId entry. A missing or invalid provider value, or a provider RuntimeException, falls through to MDC. Only when neither source supplies a valid ID does the engine generate a local 32-character hexadecimal ID. Invalid values are skipped, never trimmed or truncated. A provider Error propagates rather than triggering fallback.

Declare a ProcessContextPropagator as described in the extension guide: use a public implementation with a public no-argument constructor, @ExtensionRealization, and a standard service declaration. It captures context for ProcessEngine-owned thread handoffs and restores the worker’s previous context afterward. Durable does not persist or restore this context. The implementation manages its own context-library dependencies; the Starter does not discover propagator beans or create a Micrometer propagation adapter.

Script executors and named execution policies follow the same declaration and priority rules. See the extension guide for discovery, ordering, resource ownership, and failure behavior.

With the Spring Boot integration, a type="bean" action uses the flow’s bean name and class type to obtain a business object from the engine’s ApplicationContext. Register that object as an ordinary Spring bean; ordinary engines and Durable use the same approach. A missing bean or incompatible type fails the call with a configuration error, without constructing the declared class as a substitute.

A plain Java application can call existing objects by supplying ProcessComponentResolver to ProcessEngineFactory.create(config, components). A type="bean" action then uses that resolver to look up objects by name and type, without requiring Spring. The application manages the resolver and returned business objects; they are not engine-created extensions. See Application components and actions for the complete example.

Use type="class" when each invocation should create a business instance. The business class, no-argument constructor, and method must be public; the generated call is new DeclaredClass().method(...).

The reusable starter keeps deployment off until an application opts in. CompileFlow Workbench Server explicitly enables the complete embedded topology in its own application.yml.

Property Default Constraint / purpose
compileflow.deploy.enabled false Master opt-in for deployment repositories, routing, control, runtime, and metrics.
compileflow.deploy.topology EMBEDDED AUTHORITY commits deployment state for direct readers or polling Core workers, without projection delivery; EMBEDDED activates committed Aliases locally and uses the Outbox to recover unfinished delivery; DISTRIBUTED uses a projection store.
compileflow.deploy.control-plane-enabled true Hosts release commands; also Outbox dispatch in EMBEDDED/DISTRIBUTED and projection reconciliation in DISTRIBUTED.
compileflow.deploy.runtime-worker-enabled false In AUTHORITY or DISTRIBUTED, hosts routing polling or projection subscription, demand planning, artifact resolution, and installation. Embedded local convergence is selected by topology, not this switch.
compileflow.deploy.database.provider unset Required only when both official database auto-configuration modules are present; POSTGRESQL or MYSQL. An unavailable selection fails startup.
compileflow.deploy.database.migrate false Apply the selected Deploy migration; otherwise validate Flyway migration history and reject pending migrations.

An enabled deployment must select at least one process role. AUTHORITY requires artifact.mode=SOURCE; control and runtime roles may be separate or combined. Only a runtime worker installs Core runtimes, and no routing Outbox is created. EMBEDDED requires control-plane-enabled=true and runtime-worker-enabled=false. AUTHORITY and DISTRIBUTED support control-only, worker-only, and explicitly configured combined processes. A database-backed worker-only process should set control-plane-enabled=false; a DataSource alone does not start release or outbox workers.

Auto-configuration creates a DeployStore when deployment is enabled, the selected database provider is available, and a DataSource exists. It never falls back to an in-memory store. The Store commits Alias changes, rollout state, and audit records in one transaction; EMBEDDED and DISTRIBUTED also write the required routing event in that transaction. Startup fails if the selected topology lacks a required component.

Property Default Constraint / purpose
compileflow.deploy.artifact.mode SOURCE SOURCE or PROJECTION_STORE; shared by publisher and runtime resolver.
compileflow.deploy.artifact.max-definition-bytes 4194304 (4 MiB) Maximum UTF-8 source size accepted for one published process definition; must be positive.
compileflow.deploy.artifact.key-prefix compileflow.process. Portable projection store prefix of at most 128 ASCII letters, digits, ., _, :, or -.
compileflow.deploy.artifact.operation-timeout 5s Deadline for each projection store artifact read or atomic compare-and-set; at least 1ms.
compileflow.deploy.runtime.failure-backoff 5m Positive whole-millisecond delay before retrying a failed installation in any Core runtime topology; it must also fit a Java long nanosecond interval because the runtime uses a monotonic deadline.
compileflow.deploy.runtime.convergence-timeout 30s Maximum embedded caller wait, including alias lookup, artifact resolution, runtime loading, and local-ready publication; authority-backed and distributed runtime workers do not use this value.
compileflow.deploy.runtime.installation-concurrency 1 Maximum concurrent authority-backed or distributed worker artifact installations, or admitted embedded convergence operations; 1..256.

The publication source limit is independent of each engine’s limit for loading definitions. Publication validators and serialized artifact payloads also have separate limits. Raising this setting does not change them.

Embedded convergence runs on a runtime-owned bounded executor. Timed-out or interrupted callers do not cancel shared work or release its admission slot; background completion releases the slot. Full capacity fails immediately with CONVERGENCE_FAILED. The runtime.convergence-timeout setting limits the caller’s wait, not the duration of provider I/O or compilation: a stuck provider retains capacity until it returns. Configure provider I/O timeouts separately. Executor shutdown stops new admission and lets submitted work finish.

Every deployment Duration property is consumed with millisecond precision and must therefore be an exact whole-millisecond value representable as a Java long. runtime.failure-backoff additionally has to fit a long nanosecond interval for its monotonic deadline. Positive values are at least 1ms; only properties explicitly documented as non-negative, such as outbox retention, accept 0ms. Finer or excessive values fail binding instead of being truncated or reaching runtime arithmetic.

The embedded topology requires SOURCE artifact mode and recovers alias, version, and source content from the shared repository after memory loss. Both AUTHORITY and DISTRIBUTED runtime workers require a non-empty set of exact Alias identities derived from namespaces × codes × aliases (at most 10,000 per runtime). There is no separate explicit-key property. Authority-backed workers read the committed Alias records in batches and install artifacts from the authority; distributed workers subscribe through a DeploymentProjectionStore and also require an artifact repository in SOURCE mode. Missing dependencies fail startup.

Publishing creates an immutable record for (namespace, code, version). It stores the exact UTF-8 source, model type, SHA-256 digest, metadata, actor, and database timestamp. The record itself marks a published version; there is no mutable publication status or preparation lease. Retrying with the same identity and content returns the original record without changing its audit fields. Different content for the same identity is a conflict.

Before the first write, publication parses the source and checks its format schema and model structure. It does not generate, cache, or install a node-local runtime. To check the selected COMPILED or INTERPRETED backend as well, call ProcessTooling.preflight(...) with ProcessPreflightOptions.strict(). Its RUNTIME_CHECK stage may reuse an exact cached runtime. If there is no cache entry, the check does not install the result or retain runtime ownership. These checks do not establish readiness on other nodes with different classpaths or application components. Publishing does not change any route.

Every version and artifact must include a digest. Artifact parsing, database resolution, and runtime loading verify both identity and content integrity. Each runtime node must successfully install the artifact before reporting local readiness or activating its route.

Spring starts the components selected by topology and process role through SmartLifecycle after context refresh. Where configured, the deploy runtime starts before the control-plane background tasks; shutdown runs in reverse so routing delivery stops before subscriptions and installers are closed. AUTHORITY creates a Core Deploy runtime only when the runtime worker role is enabled, and never creates a routing Outbox dispatcher or projection reconciler. Bean construction never starts worker threads.

Property Default Constraint / purpose
compileflow.deploy.routing.key-prefix compileflow.deployment. Portable alias-route prefix of at most 128 ASCII letters, digits, ., _, :, or -.
compileflow.deploy.routing.namespaces [default] Non-empty unique canonical namespace list used to derive keys.
compileflow.deploy.routing.codes [] Unique canonical process codes used to derive keys.
compileflow.deploy.routing.aliases [production] Unique canonical aliases used to derive route keys; runtime workers require at least one alias.
compileflow.deploy.routing.operation-timeout 5s Deadline for each routing projection-store read, atomic compare-and-set, or subscription setup; at least 1ms. Does not set JDBC timeouts.
compileflow.deploy.routing.poll-interval 5s Positive whole-millisecond delay after each completed AUTHORITY worker poll; JDBC I/O deadlines are configured in the pool/driver.
compileflow.deploy.outbox.dispatch-interval 1s At least 1ms.
compileflow.deploy.outbox.dispatch-batch-size 50 Maximum records per delivery batch, 1..1000; after a full batch, processing briefly yields before continuing with the next batch. This does not limit sustained throughput.
compileflow.deploy.outbox.retention 24h Non-negative; 0ms disables bounded cleanup.
compileflow.deploy.outbox.lease-duration 1m Lease duration for one claimed delivery attempt, as recorded in the Store; at least 1ms, longer than runtime.convergence-timeout in EMBEDDED, and longer than routing.operation-timeout in DISTRIBUTED. Distributed delivery remains idempotent and lease-token fenced; size this lease above observed end-to-end projection store latency.
compileflow.deploy.outbox.retry.initial-delay 5s Positive first-retry ceiling. Delivery uses capped exponential backoff with runtime-owned full jitter.
compileflow.deploy.outbox.retry.max-delay 5m Positive jitter-window cap; at least the initial delay.
compileflow.deploy.outbox.retry.max-attempts 10 Positive failed-delivery attempts before dead-lettering.
compileflow.deploy.reconciliation.mode REPAIR DISABLED, DETECT, or REPAIR; only derived routing/artifact projections are reconciled.
compileflow.deploy.reconciliation.interval 1m At least 1ms.

To stop routing delivery for maintenance or an incident, stop the whole control-plane process. EMBEDDED and DISTRIBUTED do not provide a separate Outbox dispatch switch: Alias changes and routing events commit together, and accepting changes without delivering them would leave execution nodes using stale routes.

In EMBEDDED, dispatch applies committed events to LocalRoutingState. In DISTRIBUTED, it updates DeploymentProjectionStore through atomic comparison of exact content. Duplicate deliveries of the same routing state and late lower revisions succeed without changing the stored projection. Conflicting states at the same revision fail delivery. Consumers also check revisions because notifications may arrive out of order. Custom projection stores must perform compare-and-set atomically on the server; a client-side read followed by a write is insufficient.

Dispatchers coordinate through persisted PROCESSING leases and fencing tokens. They do not hold database locks during network delivery. Delivery is at least once, and health reports pending, processing, expired-claim, and dead-letter counts separately. AUTHORITY has no Outbox delivery pipeline or Outbox health endpoint.

Projection reconciliation reads Aliases in pages of 200 through ProcessAliasStore.scanAfter, ordered by the provider’s (namespace, code, alias) collation. Each call starts a fresh full scan; pages are not a database snapshot, so concurrent inserts behind the cursor are observed on the next scan. It retains at most 100 routing-mismatch details while counting every visited mismatch. Retired Aliases are reconciled as retired routing state; they have no artifact closure to traverse. Artifact traversal deduplicates versions before enqueueing and bounds each Alias’s combined stable/candidate closure to 8194 versions and 8192 call sites. These working-set limits are configured through DeploymentProjectionReconciler.Limits for programmatic composition; they do not change Engine graph validity.

ReconciliationResult.isComplete() reports whether scanning and artifact traversal finished without read, repair, or capacity failures; it does not assert that all detected drift has been repaired. isAliasScanComplete() distinguishes an interrupted or failed scan, and isMismatchDetailsTruncated() distinguishes bounded details from the full counters. An artifact capacity excess leaves that Alias’s traversal incomplete and allows other Aliases to proceed. The scan checks interruption between operations. It has no hard wall-clock bound; adapters must enforce I/O timeouts.

CompileFlow does not select a remote transport through compileflow.deploy.*. A distributed process must provide exactly one DeploymentProjectionStore bean; provider-specific connection, authentication, namespace, and capacity settings belong to that adapter’s own configuration prefix.

An adapter is valid only when its backend provides exact reads, atomic exact-content CAS including create-if-absent, and eventual update notifications. Unsupported transport properties are rejected instead of being silently ignored.

Set compileflow.durable.enabled=true to opt in to Durable. Add compileflow-durable-spring-boot-starter and provide a DurableStore. For the built-in database providers, use compileflow-durable-spring-boot-starter-postgresql or compileflow-durable-spring-boot-starter-mysql. The Durable starter does not create a ProcessEngine; DurableProcessEngineConfig configures its capabilities and resources separately.

An explicit process definition includes its model type. Starting a new Run by Version or Alias instead reads a typed inline definition from DurableVersionDefinitionSource, even if a copy is already stored. Recovery uses the stored definition and does not call this source. Alias starts also require a DurableAliasStateSource backed by committed Deploy state. For a route with a candidate version, CompileFlow first evaluates its named ProcessAliasTargetingPolicy, if configured. When no policy is configured or the policy returns an empty result, it uses the default deterministic selector based on the routing key and configured weights. An absent or empty routing key defaults to the Run ID. A configured policy that is unavailable fails admission; a policy that throws a RuntimeException or LinkageError, or returns null instead of an Optional, selects the stable version with reason TARGETING_ERROR. A retired Alias cannot admit a new Run. Durable does not define another admission-policy SPI. Application components and script executors do not form part of the definition’s processId. PostgreSQL extended admission can separately persist an exact execution requirement on a Run without changing the definition’s identity.

The application supplies version-definition and Alias-state sources explicitly: use beans of those types in Spring, or the configuration builder’s versionDefinitionSource(...) and aliasStateSource(...) methods in plain Java. The application manages their lifecycle. Declare DurableOutboxSink, DurableWaitDescriptionProvider, DurableTurnEmissionSource, and targeting policies with @ExtensionRealization and the standard Extension service file; the engine creates and manages these implementations. See the Durable guide for setup steps.

With workers enabled, a DurableOutboxSink enables this node to publish the built-in integration events. The Store creates these notifications even when the node has no sink. Another publisher sharing the Store can deliver them. If delivery is no longer required, an authorized operator can abandon eligible non-Wait events through an audited ABANDON command. WAIT_COMMITTED cannot be abandoned this way. Undelivered notifications that have not been abandoned prevent terminal Run cleanup, even when retention is enabled. A sink must return normally only after the downstream system has durably accepted the event; an empty implementation must not acknowledge delivery. See Outbox operations.

A Wait completion payload must contain exactly the source keys declared by that Wait’s outputs. Missing or undeclared fields are rejected; a Wait without outputs accepts only {}. Values are checked against the mapped process-variable target types before commit. A worker copies accepted business values to those targets when it resumes the process. To add descriptive attributes to WAIT_COMMITTED, implement DurableWaitDescriptionProvider. It may use only the process code, semantic digest, Wait node, a separate snapshot of process state, and variable bindings from the current scope, as supplied by DurableWaitDescriptionContext, and must produce deterministic, read-only attributes. The default adds none.

Property Default Contract
compileflow.durable.enabled false Explicitly enables the Durable composition
compileflow.durable.database.provider unset Required only when both official database auto-configuration modules are present; POSTGRESQL or MYSQL
compileflow.durable.runtime-mode COMPILED Selects COMPILED or INTERPRETED execution for the same Durable state machine; persisted behavior and identity are unchanged
compileflow.durable.call.max-depth 32 Maximum root-inclusive ProcessCall depth (1 to 256).
compileflow.durable.shutdown.timeout 15s Maximum time for stop or close to wait for active worker tasks; positive whole milliseconds, at most 1 day. Excludes the wait for accepted application operations and subsequent resource cleanup.
compileflow.durable.definition.max-size 4MB Admission size limit, from 1B to 4MB (4 MiB), bounded by the portable Store contract; recovery does not reapply a smaller admission limit.
compileflow.durable.java-diagnostics.debug.symbols LINES Generated-class debug symbols: NONE, LINES, or FULL.
compileflow.durable.java-diagnostics.debug.output-directory unset Optional generated-source export directory.
compileflow.durable.java-diagnostics.debug.bytecode-enabled false Export generated bytecode; requires an output directory.
compileflow.durable.database.migrate false Applies the selected Durable migration when true; otherwise validates the externally migrated schema
Property Default Contract
compileflow.durable.worker.enabled true Starts workers for Turns, Effects, maintenance, and optional Outbox delivery; idle polling adapts automatically
compileflow.durable.worker.id generated Optional runtime identity shared by every worker kind; at most 96 Unicode scalar values, with no surrounding whitespace
compileflow.durable.worker.lease-duration 30s Task lease duration in whole milliseconds, from 2ms through 1 hour; renewal behavior is described below
compileflow.durable.worker.idle-poll-delay 100ms Positive initial idle acquisition delay, at least 1ms and at most 1 minute; runtime applies exponential backoff and jitter
compileflow.durable.worker.turn-fault-backoff 1s Positive delay before retrying an unexpected Turn fault, at least 1ms and at most 1 hour
compileflow.durable.worker.turn-max-steps 10000 Maximum process-node steps per claimed Run, shared across execution paths and child-process calls, range 1..1000000; at the limit, the runtime saves its progress and yields instead of failing the Run
compileflow.durable.worker.max-active-iterations 32 Maximum iterations active at the same time in each Durable parallel collection scope, range 1..64; Runtime policy, not persisted Process identity
compileflow.durable.worker.turn-concurrency 2 Maximum concurrent Turn executions, range 1..256; not a database poller count
compileflow.durable.worker.effect-dispatch-concurrency 8 Maximum concurrent Effect dispatch calls, range 1..256; capacity is isolated from recovery
compileflow.durable.worker.effect-recovery-concurrency 1 Reserved concurrent UNKNOWN Effect recovery operations, including policy decisions and reconciliation, range 1..256

The Spring-bound Worker settings select untagged work by default. For PostgreSQL integration, programmatic composition can use DurableProcessEngineConfig.Worker.withClaimSelector(ClaimSelector.registered(requirements)) to claim Turn, Effect, and Outbox work only for explicitly registered execution requirements. The set allows at most 1,024 entries; an empty set claims none of that work. It does not also match untagged work or filter by namespace. Spring properties do not bind this selector or the Run stop policy; supply an application-built DurableProcessEngineConfig when those capabilities are needed. See PostgreSQL application transactions.

When an application supplies its own DurableProcessEngineConfig or DurableProcessEngine, the properties do not override that engine’s worker capability. The compileflow.durable.worker.enabled property still controls whether Spring auto-starts workers. Both the engine capability and Spring auto-start must be enabled for automatic acquisition. An application may explicitly start an enabled engine with startWorkers() when Spring auto-start is disabled.

Property Default Contract
compileflow.durable.outbox.concurrency 2 Maximum concurrent Outbox deliveries, range 1..256; not a database poller count
compileflow.durable.outbox.retry.initial-delay 1s First retry-window ceiling, from 1ms through 1 hour; delivery uses capped exponential full jitter
compileflow.durable.outbox.retry.max-delay 1m Retry-window cap; at least the initial delay and at most 1 hour
compileflow.durable.outbox.retry.max-attempts 100 Range 1..10000; required WAIT_COMMITTED notification delivery is never automatically abandoned
Property Default Contract
compileflow.durable.maintenance.interval 1s Positive interval between bounded maintenance and scheduling scans, at most 1 hour; each runtime starts its first scan at a different offset
compileflow.durable.maintenance.batch-size 100 Range 1..1000
compileflow.durable.retention.terminal-run disabled Optional minimum terminal-Run retention, positive and at most 3650 days; active Runs and Runs with PENDING or DELIVERING Outbox obligations are preserved. DELIVERED or ABANDONED events do not block cleanup; unresolved Effects and required but unacknowledged emissions also prevent cleanup
compileflow.durable.retention.unused-process disabled Optional positive retention for exact Process Definitions with no Run reference, at most 3650 days; Start protects the complete recovery set transactionally
compileflow.durable.retention.consumed-occurrence disabled Optional positive retention for consumed Wait/Effect rows, at most 3650 days; unresolved work and occurrences with pending Outbox are preserved
compileflow.durable.retention.interval 1h Positive interval between bounded retention sweeps, at most 1 day
compileflow.durable.cache.runtime-max-size 256 Entry ceiling for each node-local cache: executable runtimes, complete value schemas, and result-only readers; range 1..10000

Effect dispatch and UNKNOWN recovery have separate capacity limits and cannot borrow each other’s slots. The total Effect capacity is their sum: the defaults allow eight dispatch operations plus one recovery operation, for nine operations. A full dispatch lane therefore leaves recovery capacity available. This does not guarantee that a blocked reconciler will terminate or that recovery can progress after every recovery slot is occupied; adapters must provide bounded I/O and cooperative cancellation.

Concurrency limits control active work, not how often an idle worker polls the Store. A work type with a backlog can use its configured concurrency; an idle type reduces polling to one adaptive probe with jitter. Suppression while a required capability is unavailable is automatic and has no public setting. Outbox retries persist a positive random delay within an exponentially growing, capped window.

Run, Effect, and Outbox renewals use independent channels with bounded batches. The renewal interval is derived from one third of the lease duration, with a minimum of 1ms; there is no separate renewal-interval setting. Size the lease above observed JVM pause plus tail Store latency. Connection acquisition, network, lock, and statement timeouts should make a failed renewal return within the derived one-third cadence, preserving another attempt before expiry.

Worker shutdown stops claims and delayed probes, then waits up to shutdown.timeout for active work. At expiry it requests interruption and reports unfinished workers; restart is prohibited until they terminate. Engine close first drains admitted application operations and then stops workers. Cleanup is deferred until workers actually exit; lease renewal and runtime resources remain available during that interval. A timed-out close remains closing, and repeated close waits for the same cleanup completion. Store calls, including lease renewal, must have their own I/O timeouts: shutdown.timeout does not bound the entire close call or forcibly terminate application code. Align these budgets with the host lifecycle and container termination grace period; a Spring lifecycle timeout does not forcibly interrupt a blocking bean cleanup method.

For the built-in Durable engine, Micrometer auto-configuration registers compileflow.durable.operations with resource.domain, operation, and outcome tags, and the node-local compileflow.durable.loaded.runtimes gauge with resource.domain. When Spring Boot Health is available, the built-in engine’s contributor probes the selected Store’s database time. Whether this read succeeds determines the top-level UP/DOWN status. Three consecutive unexpected machinery faults in an enabled Worker lane set workerMachinery=degraded and degraded=true. An active lease-renewal lane sets leaseRenewal=degraded after two failed cycles or two derived intervals without a successful cycle.

Health includes bounded sanitized counters, timestamps, staleness, and failure types. Worker faults are logged with rate limiting; renewal faults remain visible through metrics and Health. Missing process-scoped Action/Effect capabilities and an unconfigured optional Outbox sink are reported as details rather than making the entire Engine unhealthy.

The workerOperations health details report capacity, inFlight, available, and saturated separately for turn, effect_dispatch, effect_reconcile, and an enabled outbox lane. Saturation describes occupied capacity; it does not itself mark worker machinery degraded or change Store health to DOWN.

Configuration validation and database migrations

Section titled “Configuration validation and database migrations”

Unknown fields under compileflow.durable are rejected in enumerable property sources, subject to the environment and system-property exceptions described above. Duration values must have whole-millisecond precision. A missing or mismatched required Provider-owned physical structure fails startup. Initialization validates Flyway history and checks required tables, column types/nullability, keys, indexes, named enforced checks, and immutable-definition triggers. This is not a proof of arbitrary hand-edited CHECK expressions or trigger bodies; schema changes must still be managed through migrations. MySQL verifies immutable triggers through the restricted cf_durable_schema_triggers read-only procedure; runtime users need EXECUTE on that specific procedure, not TRIGGER or DDL privileges. Its definer is the migration identity and must retain metadata visibility; preserve or recreate that identity and grants during restore.

Retention is the earliest time cleanup may begin, not a guaranteed deletion time. Outstanding obligations, bounded batches, and foreign keys can delay it. Once Run cleanup starts, queries hide the Run before its physical rows are removed in batches.

Embedded queries use typed keyset cursors and require no Kernel page-token keyring. Wait tokens are random capabilities. The Wait records persist only token digests, while active Outbox records may temporarily retain raw tokens for crash-safe delivery and must be protected as credential storage. Process snapshots use the Kernel’s fixed portable-value envelope and have no application codec or payload-encryption Provider SPI. Transport authentication, authorization, request deduplication, and opaque page-token protection are configured by the outer adapter.

Workbench Server accepts the COMPILEFLOW_WORKBENCH_SERVER_CONFIG_* environment variables listed below. The CONFIG_ segment keeps them distinct from service variables such as COMPILEFLOW_WORKBENCH_SERVER_SERVICE_HOST. At startup, an adapter rejects unknown names under this prefix and maps known names to Spring properties with the same precedence as operating-system environment variables.

Spring Boot does not scan raw environment variables for unknown fields, but it does validate the adapter’s mapped properties through strict binding. Defaults and validation rules come from CompileFlowWorkbenchServerProperties; the adapter adds no defaults.

Property Default Environment variable
compileflow.workbench.server.authentication.mode API_KEY COMPILEFLOW_WORKBENCH_SERVER_CONFIG_AUTHENTICATION_MODE; API_KEY or DISABLED
compileflow.workbench.server.authentication.api-key required in API_KEY mode COMPILEFLOW_WORKBENCH_SERVER_CONFIG_AUTHENTICATION_API_KEY; 32..256 URL-safe ASCII characters (A-Z, a-z, 0-9, ., _, ~, -) when set
compileflow.workbench.server.authentication.service-principal required COMPILEFLOW_WORKBENCH_SERVER_CONFIG_AUTHENTICATION_SERVICE_PRINCIPAL; stable service actor represented by the credential; 1..128 visible ASCII characters without whitespace
compileflow.workbench.server.http.max-request-size 10MB COMPILEFLOW_WORKBENCH_SERVER_CONFIG_HTTP_MAX_REQUEST_SIZE; valid range 1B..100MB
compileflow.workbench.server.database.provider POSTGRESQL COMPILEFLOW_WORKBENCH_SERVER_CONFIG_DATABASE_PROVIDER; selects the matching POSTGRESQL or MYSQL persistence Provider in the same executable artifact
compileflow.workbench.server.database.migrate false COMPILEFLOW_WORKBENCH_SERVER_CONFIG_DATABASE_MIGRATE; explicitly grant this process authority to apply the Workbench Provider migration
compileflow.workbench.server.preview-execution.enabled false COMPILEFLOW_WORKBENCH_SERVER_CONFIG_PREVIEW_EXECUTION_ENABLED; exposes trusted draft execution when true
compileflow.workbench.server.execution-log.max-query-rows 10000 COMPILEFLOW_WORKBENCH_SERVER_CONFIG_EXECUTION_LOG_MAX_QUERY_ROWS; valid range 1..100000
compileflow.workbench.server.execution-log.purge-batch-size 1000 COMPILEFLOW_WORKBENCH_SERVER_CONFIG_EXECUTION_LOG_PURGE_BATCH_SIZE; stable-order rows removed by one purge request, range 1..10000
compileflow.workbench.server.async-invocation.concurrency 4 COMPILEFLOW_WORKBENCH_SERVER_CONFIG_ASYNC_INVOCATION_CONCURRENCY
compileflow.workbench.server.async-invocation.dispatch-interval 1s COMPILEFLOW_WORKBENCH_SERVER_CONFIG_ASYNC_INVOCATION_DISPATCH_INTERVAL
compileflow.workbench.server.async-invocation.lease-duration 30s COMPILEFLOW_WORKBENCH_SERVER_CONFIG_ASYNC_INVOCATION_LEASE_DURATION; renewal runs at a derived one-third cadence.
compileflow.workbench.server.async-invocation.lease-recovery-interval 5s COMPILEFLOW_WORKBENCH_SERVER_CONFIG_ASYNC_INVOCATION_LEASE_RECOVERY_INTERVAL

Workbench uses one product namespace, default. Published execution requests therefore accept a version or Alias but no caller-selected namespace; responses and logs retain the effective namespace as attribution. Supporting multiple namespaces requires namespace-aware draft identity, URLs, authorization, persistence, and UI selection together, not a standalone configuration switch.

Draft preview executes submitted definitions as trusted server-side code. It is not a sandbox or validation endpoint, and remains unavailable unless preview-execution.enabled=true. The dev profile enables it explicitly for local development; production deployments should leave it disabled unless their gateway grants this capability only to trusted flow authors and the Server runs with appropriately restricted host, network, bean, and database privileges.

Asynchronous invocation, retries, and shutdown

Section titled “Asynchronous invocation, retries, and shutdown”

Locally admitted attempts are limited by concurrency in 1..256; there is no separate public queue or dispatch-batch capacity setting. Dispatch, lease renewal, and lease recovery use three independent scheduler threads so a delayed scan cannot starve lease renewal. The deploy runtime, control plane, reconciler, async scheduler, and worker start in dependency order inside Spring Boot’s web lifecycle window. Scheduled cycles remain gated until the worker is running. On ContextClosedEvent, the worker immediately stops dispatch and expired-lease recovery. During normal drain, the scheduler remains available to renew already-owned attempts. Spring Boot then closes HTTP admission and waits for the worker under the standard spring.lifecycle.timeout-per-shutdown-phase budget. Renewal stops when worker shutdown returns, and bean destruction closes the scheduler.

Worker shutdown requests interruption if tasks do not drain promptly, but may return at the end of its budget while tasks remain active. A shutdown timeout does not prove that those tasks exited or produced no side effects. After renewal stops and the lease expires, another worker may recover the invocation; another attempt requires an explicitly configured retry and remaining attempts. Such a retry can overlap a former attempt that has not exited, so side-effecting actions still require business idempotency.

The asynchronous invocation queue uses the state recorded in the database. Dispatch considers only rows whose stored available_at time has arrived. Every running attempt has a unique fencing token and renewable lease; completion requires the current token and an unexpired lease, so a recovered task cannot be overwritten by a late former worker. Retry delay is persisted and never implemented by sleeping a worker thread. Queue timestamps use the database clock across Server nodes. Request-level maxAttempts is limited to 1..100, and retryDelayMs to 0..604800000 milliseconds. maxAttempts defaults to 1; retries are opt-in because a timeout or lost response does not prove that process side effects were absent.

When more than one attempt is configured, a request may execute more than once; external operations are not guaranteed to happen only once. Side-effecting actions must be idempotent using a stable business key in process parameters. The HTTP fields and bounds are defined by the Workbench Server OpenAPI contract.

Async invocation backlog stays in the database. async-invocation.concurrency bounds all locally admitted attempts; dispatch queries are sized from free execution slots and stop while full. The executor’s bounded handoff buffer adds no extra admission capacity. Distributed Deploy similarly keeps waiting demand in VersionRuntimeManager, with admission bounded by runtime.installation-concurrency, not an independently configured executor queue.

All duration properties under compileflow.workbench.server.async-invocation.* are positive whole-millisecond values that must also fit a Java long when expressed in nanoseconds. The lease duration is at least 2ms; renewal uses max(1ms, floor(leaseMillis / 3) ms) and has no separate configuration key.

Authentication, connections, and credentials

Section titled “Authentication, connections, and credentials”

The default API_KEY mode requires a valid key. DISABLED requires the key to be absent and is accepted only when an explicit dev or test profile is active. The prod profile cannot be combined with either local profile, regardless of authentication mode. The dev profile disables built-in authentication by default; bind the local Server to loopback (--server.address=127.0.0.1) rather than exposing it to the network. The dev profile uses PostgreSQL; production can select PostgreSQL or MySQL through the documented Provider property. The dev profile supplies local URL and username defaults but requires a non-empty effective spring.datasource.password. Startup validates that property before creating the connection pool. It can come from any standard Spring property source; SPRING_DATASOURCE_PASSWORD is the recommended environment-variable form. H2 is test-scoped and is not packaged in the executable Server JAR, so the unprofiled application has no embedded database fallback.

Workbench does not expose a Server CORS configuration. Production uses one browser origin through an authentication-capable gateway; direct cross-origin browser access is not a supported topology. Production database settings have no password default and use Spring’s standard SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, and SPRING_DATASOURCE_PASSWORD variables. Where the platform supports mounted secrets, prefer a secret manager plus Spring Boot’s spring.config.import=configtree:/run/secrets/ over long-lived credentials in environment variables. Files named spring.datasource.password and compileflow.workbench.server.authentication.api-key bind directly to the canonical properties. Environment variables remain suitable for local evaluation and platforms that inject them securely.

The Server rejects request bodies larger than compileflow.workbench.server.http.max-request-size before message conversion. The same canonical limit configures the Servlet multipart parser for both the complete request and each uploaded file, so XML import does not have a second independent size policy. The limit applies both to requests with Content-Length and to chunked or otherwise unknown-length bodies; oversized requests receive HTTP 413. Tomcat’s maxPostSize is not used for this contract because it limits form parameter parsing, not arbitrary JSON request bodies.

CSV export and canary health evaluation require a complete in-memory execution-log sample. Each query loads at most compileflow.workbench.server.execution-log.max-query-rows; when another matching row exists, the request fails with an RFC 9457 HTTP 422 Problem Detail whose code is EXECUTION_LOG_QUERY_LIMIT_EXCEEDED, instead of returning a truncated or misleading result. Narrow the time range or filters before raising the bound. The hard maximum prevents one synchronous request from turning the Server into an unbounded in-memory analysis or export job. Workbench monitoring aggregates are computed by bounded database grouping over an explicit time range and do not use this row-materialization limit.

Execution-log retention purge is also bounded. One POST /api/execution-logs/purge request removes at most compileflow.workbench.server.execution-log.purge-batch-size oldest matching rows in stable (logged_at, id) order. Repeat the request while it reports hasMore=true; monitor WAL, dead tuples, locks, and autovacuum instead of issuing an unbounded catch-up delete.

Flyway is the server application’s only schema migration tool. With the default compileflow.workbench.server.database.migrate=false, the runtime account does not need DDL privileges. Production applies the packaged Deploy and Workbench migrations through a separately authorized deployment identity. On MySQL with binary logging, use a DDL administrator authorized to create the packaged triggers; schema-scoped DDL grants alone may be insufficient. Do not relax global log_bin_trust_function_creators. Local development and the bundled Compose topology explicitly opt in to database.migrate=true. The default mode still validates Flyway checksums and rejects every pending migration before the application becomes ready; spring.flyway.enabled must remain enabled. The runtime DML role therefore needs read access to cf_deploy_schema_history and cf_workbench_schema_history, but no schema-creation or migration DDL privileges. Flyway’s destructive clean operation is disabled, and Hibernate uses ddl-auto=validate to fail startup on schema drift. The default service configuration also enables graceful shutdown with a 30-second shutdown phase and exposes only Actuator health. Exactly /actuator/health, /actuator/health/liveness, and /actuator/health/readiness are anonymous; health components, details, and any other health group remain hidden or authenticated. Database pool, HTTP server, Actuator, and logging tuning continue to use standard spring.datasource.hikari.*, server.*, management.*, and logging.* properties rather than duplicate compileflow.workbench.server.* aliases. Container and pod termination grace periods must exceed the effective Spring lifecycle and engine-executor shutdown budgets; the local Compose topologies reserve 75 seconds for the provided defaults.

Workbench execution binding and Durable preview

Section titled “Workbench execution binding and Durable preview”

Use Spring relaxed environment names (for example, COMPILEFLOW_WORKBENCH_EXECUTION_TARGET). The packaged Workbench PROCESS composition requires EMBEDDED or DISTRIBUTED with routing Outbox administration. The DURABLE composition uses AUTHORITY with the Core runtime worker role disabled. See Durable Workbench for physical isolation, gates and recovery semantics.

Property Default Meaning
compileflow.workbench.execution.target PROCESS Explicit host execution target: PROCESS or DURABLE.
compileflow.workbench.execution.environment PRODUCTION PRODUCTION or physically isolated PREVIEW environment.
compileflow.workbench.execution.admission-enabled true Allow new Durable Run admission; existing Runs continue.
compileflow.workbench.execution.results-enabled false Allow explicit Durable result payload reads.
compileflow.workbench.execution.operator-enabled false Allow native Durable control and reconciliation commands.
compileflow.workbench.execution.admission-concurrency 4 Maximum concurrent Durable admissions, 1 through 256; no queue.
compileflow.workbench.execution.preflight-concurrency 2 Maximum concurrent Durable graph preparations, 1 through 256.
compileflow.workbench.execution.query-concurrency 16 Maximum concurrent Durable reads, 1 through 256.
compileflow.workbench.execution.operator-concurrency 4 Maximum concurrent Durable operations, 1 through 256.
compileflow.workbench.preview.max-run-age 1h Run age before cooperative cancellation on isolated Durable PREVIEW hosts; from 1 second through 30 days.
compileflow.workbench.preview.sweep-interval 30s Interval between bounded preview expiry sweeps; from 1 second through 30 days.
compileflow.workbench.preview.page-size 100 Maximum Runs inspected per preview expiry sweep, 1 through 200.

The Node development gateway is intended only for local development. It parses its configuration once, rejects unknown variables under its prefix, always binds 127.0.0.1, and refuses NODE_ENV=production. It has no upstream URL, authentication, proxy, queue, or production image.

Variable Default Purpose
COMPILEFLOW_DEV_GATEWAY_PORT 3001 Loopback TCP port, 1..65535.
COMPILEFLOW_DEV_GATEWAY_LOG_LEVEL info Structured log threshold: error, warn, info, or debug.
COMPILEFLOW_DEV_GATEWAY_MAX_REQUEST_BYTES 10485760 Preview JSON body limit, 1..10485760 bytes; the default matches Workbench Server’s default request limit.

When the port is overridden, pass the same COMPILEFLOW_DEV_GATEWAY_PORT value to both the development-gateway and Vite processes. Vite consumes it only in its Node.js development-proxy configuration; the value is not exposed to browser code.

Web VITE_COMPILEFLOW_* values are public build-time inputs embedded in the JavaScript bundle. They cannot hold secrets, unknown variables in that application-owned namespace fail the build, and changing a value requires rebuilding the image. Other tools remain free to own unrelated VITE_* names. Connected browser requests use same-origin /api and /health paths; endpoint routing is a gateway, local nginx, or Vite development-proxy responsibility, not Web config.

Variable Default Purpose
VITE_COMPILEFLOW_WORKBENCH_MODE connected connected or standalone; standalone has no Server-backed features.
VITE_COMPILEFLOW_BASE_PATH / Static asset directory path, including the leading and trailing slash. Connected mode requires /.
VITE_COMPILEFLOW_OPERATE_MODE mock in development, otherwise real in connected mode Connected-only: mock or real; connected production requires real. Do not set in standalone.
VITE_COMPILEFLOW_DEBUG false Strict boolean; enables sanitized diagnostic logging.
VITE_COMPILEFLOW_USE_BUILT_IN_EXAMPLES true in standalone and mock mode, otherwise false Strict boolean selecting the bundled Learn catalog instead of the Server catalog. Must be true in standalone and mock mode.

The displayed Workbench version is injected from compileflow-workbench/web/package.json during the Vite build. It is artifact identity, not a deployment setting, and therefore has no VITE_* override.

Web build modes are development, production, and test. Every deployable environment, including staging, runs the same production build policy. Connected mode uses the real API; standalone makes no Server requests. Both use same-origin-only connect-src, production-strength script policy, and no emitted source maps. Development and test modes retain local proxy and diagnostic allowances. staging identifies a deployment environment, not a Web build mode.

JavaDiagnosticsConfig diagnostics = JavaDiagnosticsConfig.builder()
.debugSymbols(JavaDiagnosticsConfig.DebugSymbols.LINES)
.build();
ProcessEngineConfig config = ProcessEngineConfig.builder()
.maxResidentRuntimes(4096)
.runtimeLoadTimeout(Duration.ofSeconds(20))
.javaDiagnostics(diagnostics)
.build();
try (ProcessEngine engine = ProcessEngineFactory.create(config)) {
// Reuse this engine for process calls.
}

Reuse each engine across requests and close it during application shutdown. Multiple engines in the same JVM may use different snapshots without sharing mutable configuration.

Spring auto-configuration accepts the following engine, configuration, storage, and data-source beans. Extension implementations use the standard Extension service file and public no-argument construction; they are not Spring integration beans:

Area Supported bean types
Process execution ProcessEngineConfig, ProcessEngine, ProcessAliasRouteSource
Deploy ProcessDeploymentService, DeployStore, DeploymentProjectionStore, ProcessArtifactSource
Durable execution DurableProcessEngine, DurableProcessEngineConfig, DurableStore, DurableVersionDefinitionSource, DurableAliasStateSource

Deploy’s embedded topology and hosts with the Core runtime worker role enabled also supply an injectable ProcessVersionRuntime for installing and retaining an exact published version independently of an Alias. This is a consumer API, not an auto-configuration replacement hook for VersionRuntimeManager. See execute an exact published version.

Obtain runtime management and tooling from ProcessEngine.runtime() and ProcessEngine.tooling(), or Durable operations and tooling from DurableProcessEngine.operator() and DurableProcessEngine.tooling(). Defining a separate bean of the same type does not replace the object returned by the engine. To replace these together, provide a replacement engine bean.

A custom bean supplies or replaces only its documented role. Other @ConditionalOnMissingBean checks, bean method names, implementation classes, executors, schedulers, coordinators, repositories, and lifecycle adapters are internal details. Use the API/SPI types listed above when customizing auto-configuration.

RetryPolicy.name() and FailureHandler.name() return their business keys; ScriptExecutor.language() returns its language key. @ExtensionRealization only has priority: default 500, higher values first. Fixed single and named selection reject ties at the highest priority; explicit ordered traversal breaks ties by binary class name. List public no-argument implementations in the root Extension service file. Each engine owns its instances. @Bean, @Primary, and @Order do not register or select extensions. See Extension Guide for context matching, invocation, and lifecycle rules.