Supported surfaces
Use the APIs, configuration, and deployment options listed here when integrating CompileFlow. Unlisted types are
internal, even if declared public in Java.
See Versions and data integrity for component version requirements and persisted-data validation.
Browse by integration task: platforms, Common APIs, Java API, deployment API, Durable integration, Spring configuration, or Workbench REST.
Support Categories
Section titled “Support Categories”| Tier | Meaning |
|---|---|
| Supported | Documented public contracts for application and integrator code |
| Supported by deployment | Supported when running the documented Workbench/Server topology |
| Provider Preview | Provider integration contract; each implementation must be independently verified against it |
| Internal | Implementation detail; do not depend on it from application code |
Target Platform Baseline
Section titled “Target Platform Baseline”| Boundary | Target baseline |
|---|---|
| Java artifacts and generated flows | Java 17 source/API/bytecode; all supported LTS JDKs build it, Java 17 runs the full suite, and Java 21/25 run focused concurrency and dynamic-code runtime contracts |
| Spring integration | Spring Boot 4.1.3 |
| Engine API/Core/TBBPM/BPMN | No CompileFlow-owned deployment database |
| Deploy first-party stores | PostgreSQL 16.16/17.12/18.7 and MySQL 8.4.13 contract matrices; Providers share the version-coupled JDBC state machine and own their dialect selection and migrations |
| Workbench production persistence | The same executable supports PostgreSQL 16.16/17.12/18.7 and MySQL 8.4.13; Compose recommends PostgreSQL 18.7 |
| Durable first-party implementations | PostgreSQL 16.16/17.12/18.7 and MySQL 8.4.13 contract matrices; H2 remains test-scoped |
| Workbench build | Node.js 26 LTS and pnpm 11.11.0; the exact Node patch is pinned in release-baselines.json |
| Workbench Java runtime | Pinned Java 17 JDK container image; the full image tag and OCI index digest are recorded in release-baselines.json |
This table defines the supported platform baseline and required release-test matrix. Other platforms may work, but are outside that support boundary. A release must pass its required checks on the pinned versions; listing a platform here does not certify a particular source checkout or snapshot build.
The root release-baselines.json pins build-tool versions and immutable container-image digests.
The Maven Wrapper pins Maven 3.10.0. Ordinary builds and runtime tests retain the Java 17 baseline.
Checkstyle and the release-artifacts profile require JDK 21 or later; full pnpm verify:delivery uses the same quality toolchain.
The compiler still emits Java 17 bytecode. CI runs the complete behavior suite on Java 17 and quality analysis on Java 21.
Workbench web and gateway images use the immutable Nginx stable-channel baseline; online checks verify the exact tag digest and every runnable platform against the current stable channel.
The Workbench Java image pins the official Temurin channel by its immutable OCI index. workbenchJava.releaseImages lists one or more exact versioned images, including when architecture updates are staggered. The release check verifies that every runnable platform in the pinned index matches a manifest from those images.
Dynamic preparation requires the JDK’s jdk.compiler module. CompileFlow publishes one set of Java artifacts for all supported JDKs.
Common Extension And Text APIs
Section titled “Common Extension And Text APIs”compileflow-common depends only on the JDK. These public types support standalone extension frameworks and process SPI implementations:
| Package / type | Role |
|---|---|
com.alibaba.compileflow.common.extension.* |
Extension<C>, ExtensionContext, method-level ExtensionPoint, ExtensionRealization, ExtensionManager, ExtensionInvoker, ExtensionCallback, and ExtensionException |
com.alibaba.compileflow.common.text.UnicodeText |
Unicode validation and strict UTF-8 encoding and decoding |
Publish extension implementations in META-INF/services/com.alibaba.compileflow.common.extension.Extension, one class per line.
No build processor is required. See the Extension Guide for discovery, ordering, applicability, and ownership.
Common’s utilities for coordinating operations and shutdown, summarizing failures, encoding fields, calculating digests, and checking duration precision and range are internal to the project.
Java API And SPI (compileflow-api)
Section titled “Java API And SPI (compileflow-api)”Supported types are in com.alibaba.compileflow.engine and the subpackages listed below.
Process API and SPI types share one artifact: engine configuration refers to SPI types, and SPI callbacks refer to API
values. It depends on compileflow-common and has no third-party production dependencies. Packages distinguish the API
and SPI roles. Core supplies the engine implementation, format modules supply semantic compilers, and integration modules
supply framework adapters.
| Package / type | Role |
|---|---|
ProcessEngine, ProcessEngineFactory |
Engine lifecycle and execution entry |
ProcessRef, ProcessDefinition |
References to existing versions or Aliases, and explicit definition sources |
ProcessResult, ProcessError, ProcessExecution, ProcessExecutionOptions |
Typed execution outcomes, execution details, and request options |
ProcessAliasTarget, AliasRoutingOptions, ProcessTrigger, ProcessDataMapper, ProcessExecutionException |
Supporting execution values, routing controls, typed mapping, and failure propagation |
ProcessDefinitionDigest, ProcessIdentifiers |
Stable process-definition digests and identifier validation |
ProcessRuntimeManager, ProcessTooling |
Local runtime management, definition checks, and generated-source inspection without execution |
CompileFlowException, ErrorCode, ProcessModelType |
Error classification and process model types |
config.* |
Immutable ProcessEngineConfig tree and validators |
preflight.* |
ProcessPreflightOptions, ProcessPreflightReport |
spi.* |
ProcessComponentResolver: look up business objects used by actions, by name and type |
spi.event.* |
Sealed typed ProcessEvent lifecycle records and ProcessEventListener |
spi.execution.* |
Retry policies, terminal failure handlers, application-context propagation, and bounded execution values |
spi.observability.TraceIdProvider |
Provide a Trace ID for correlating logs and events |
spi.routing.* |
Source of Alias routes and named targeting policies bound to a route |
spi.script.* |
ScriptExecutor, script programs, program specifications, and provider-independent script failures |
ProcessEngineFactory.create(config, components) accepts a host-owned ProcessComponentResolver for
bean actions in a plain Java application. It borrows the exact resolver and returned objects;
the host keeps them usable until engine execution stops. create() and create(config) use a disabled lookup.
Business objects are separate from framework-owned extensions discovered through Common’s service declarations.
engine.bootstrap.ProcessEngineProvider connects matching versions of API and Core during bootstrap; it is not an application SPI.
Format modules register semantic compilers rather than creating separate engines for each format.
Ordinary preflight checks the supplied root definition. ProcessPreflightOptions.strict() enables LINT and
RUNTIME_CHECK. The runtime check uses the selected COMPILED or INTERPRETED backend and may reuse an exact cached
runtime, but it neither installs a new runtime nor retains ownership.
Use warmUp to prepare exact runtimes in the cache without binding a process code or Version.
Use load(ProcessRef.Version, ProcessDefinition) to create an immutable local Version binding and retain its runtime.
Do not depend on com.alibaba.compileflow.engine.core, parser ASTs, deploy admin/runtime/integration implementation
packages, Spring auto-configuration internals, or server controllers from application code.
compileflow-core registers java as a built-in script language. Java scripts run inside the application process, so use them only
with trusted definitions. The executor implementation is internal to Core.
The optional MVEL module registers
mvel for expressions in trusted definitions. TBBPM and BPMN use the same input and output mapping contract.
The optional compileflow-script-qlexpress module supplies
com.alibaba.compileflow.script.qlexpress.QlExpressScriptExecutor.
Adding the dependency enables the language through the JAR’s standard service declaration.
Custom public no-argument executors use @ExtensionRealization and list their class in the root Extension service file.
ProcessEngine and Durable engines use these same discovery rules.
The unique highest-priority executor for each language wins; a tie fails assembly. Spring executor beans are not candidates.
The QL executor holds only heap state and needs no close operation.
Deployment API And SPI (compileflow-deploy-api)
Section titled “Deployment API And SPI (compileflow-deploy-api)”Supported deployment contracts live under com.alibaba.compileflow.deploy.api:
| Package / type | Role |
|---|---|
ProcessDeploymentService |
Immutable publication and revision-checked rollout facade |
runtime.ProcessVersionRuntime, runtime.VersionRuntimeLease |
Acquire and retain an exact published version for local execution |
command.* |
Validated publish, rollout, canary, promote, abort, rollback and retire commands |
artifact.*, release.* |
Executable artifact values and Control Plane release audit/metadata values |
routing.*, rollout.*, version.* |
Immutable routing and rollout state, constraints, queries, and pages |
error.* |
Predefined deployment error codes and structured exception details |
spi.ProcessArtifactSource |
Lookup of immutable artifacts |
compileflow-deploy-spi contains Provider contracts that must match the CompileFlow version.
DeployStore specifies the atomic publication, rollout, route, and routing-Outbox changes a Provider must support,
without exposing JDBC or SQL. The PostgreSQL and MySQL Providers share a version-coupled JDBC state machine,
but each selects its dialect, supplies migrations, and verifies the contract against a real database.
This shared implementation does not add support for other JDBC databases.
projection.DeploymentProjectionStore is Provider Preview, not an application API.
A remote implementation must support linearizable compare-and-set for each key and eventually bring subscribers up to
date. It must handle subscription setup, reconnects, lost history, concurrent writers, and network partitions.
Passing the in-memory testkit alone is not sufficient.
Deployment Wire Protocol (compileflow-deploy-protocol)
Section titled “Deployment Wire Protocol (compileflow-deploy-protocol)”The supported wire helpers are in com.alibaba.compileflow.deploy.protocol. They define versioned artifact and routing
payloads, parsers, canonical JSON with size limits, and projection keys. This module depends on the deployment domain
API; the domain API does not depend on wire formats.
Deployment admin, runtime, integration, repository, Spring composition, and server-adapter implementations are internal.
The Maven tests classifiers contain deterministic in-memory fixtures for CompileFlow’s test suite, not production
adapters or fallback implementations.
Release metadata contains descriptive information only. To require a known executable-artifact digest at publication, supply the optional expectedArtifactDigest when constructing PublishProcessVersionCommand. For a new version, publication computes the digest from the validated definition and exact child call bindings. On an identical republication, it compares the expected digest with the stored digest instead. A mismatch returns ARTIFACT_DIGEST_MISMATCH. getExpectedArtifactDigest() reads the requested precondition; it does not verify content. Read the published digest from PublishedProcessVersion.getArtifactDigest(). The compileflow. metadata prefix is reserved for keys in
ReleaseMetadataKeys; applications must use their own prefix. Executable artifact payloads do not contain release metadata.
Durable API, SPI, And Integration Entry Points
Section titled “Durable API, SPI, And Integration Entry Points”Public APIs and engine views
Section titled “Public APIs and engine views”The following documented types under compileflow-durable-api are the Supported application contract for Durable execution:
| Package / type | Role |
|---|---|
DurableProcessEngine |
Application execution entry point and node-local lifecycle owner for optional Workers, runtime cache, and compilation |
DurableOperatorService |
Run diagnostics, persisted source, Timeline, Pause/Resume, Effect resolution, and Outbox administration |
DurableProcessTooling |
Non-executing preparation of the complete dependency graph, without Store writes or warming the runtime cache used for recovery |
command.* |
Audited Pause/Resume, Effect-resolution, and Outbox-resolution operator commands |
control.* |
Execution holds managed by a trusted host authority, with typed commands and stored original operation results; separate from operator Pause/Resume; engines or Stores without hold support reject this capability |
run.* |
Run identity, lifecycle, stop policy, status, result, active-work summary, and queries |
work.* |
Active Wait, Timer, and Effect occurrences and query results |
wait.* |
Wait completion token and outcome |
timeline.* |
Ordered Run lifecycle events and queries |
outbox.* |
Outbox events, status, and queries |
audit.* |
Audited actor identity shared by operator and host controls |
effect.* |
Effect status, readiness, recovery plans, and reconciliation outcomes |
error.* |
Stable Durable error classification |
validation.* |
Shared validation contracts used by immutable Durable API values |
Each engine owns its resources. The methods below return dedicated objects for related operations; these objects are also called views:
| Engine returned by the factory | Application operations | Views obtained from the engine |
|---|---|---|
ProcessEngine |
Synchronous execute; trigger starts a new execution from the specified node |
runtime() manages local bindings and caches; tooling() checks definitions and generates source |
DurableProcessEngine |
Persistent start, Wait completion, cancellation, and Run queries |
operator() provides diagnostics and audited control; tooling() prepares the complete dependency graph without execution |
Close the engine to release resources; its views cannot be closed independently. The views share the engine’s rules for accepting work and shutting down. Keeping a view reference does not let you use resources after the engine closes. Default Spring configuration publishes the engine bean, not separate view beans.
Views group related operations; they do not authorize access. The host must authorize each operation and resource. In particular, permission to read source is separate from permission to query status without business payloads.
Both APIs use ProcessRef to reference a process and ProcessDefinition to supply its source.
Their execution results, worker lifecycles, trigger and Wait-completion behavior, and preflight scope differ.
Use the relevant engine API directly rather than treating them as interchangeable base-engine implementations.
Storage and host integrations
Section titled “Storage and host integrations”compileflow-durable-spi provides Provider Preview contracts for storage and application integration.
Although DurableStore is database-neutral, each supported Provider must independently verify all transaction,
concurrency, crash-recovery, migration, and retention requirements.
The module also provides DurableWaitDescriptionProvider, DurableWaitDescriptionContext, DurableOutboxSink,
DurableAliasStateSource, DurableVersionDefinitionSource, and
com.alibaba.compileflow.durable.spi.emission.DurableTurnEmissionSource. The emission source is a host extension:
it extracts candidate records outside the Store transaction, and the Store commits accepted records atomically with the Turn.
Implementations depend on API/SPI types and do not require runtime implementation types.
DurableAdmissionSupport is a separate Provider Preview capability that an engine may implement for transactional
Run creation. It uses that engine’s Store, immutable preparation results, and lifecycle rules.
It exposes no JDBC resources or Runtime implementation types. Each Provider still owns transaction participation
and commit-outcome determination. The capability does not imply feature parity across Providers.
PostgreSQL and MySQL SQL, schemas, indexes, and transactions are Provider internals, not a general JDBC or dialect SPI.
compileflow-durable-jdbc shares version-coupled implementation code for connection cleanup, transaction outcomes, and
persisted-value rules. It is not an application API or third-party dialect SPI. Each Provider still owns its SQL,
lock ordering, database clock, and atomic operations.
Definition sources and publication
Section titled “Definition sources and publication”Every new Run started through a Version or Alias reads the exact version definition from
DurableVersionDefinitionSource, even if a copy is already stored. Recovery uses the saved definition and never calls
this source. A named ProcessAliasTargetingPolicy can choose only the route’s stable or candidate target.
It cannot replace CompileFlow’s protocol-defined percentage selector.
The published definition source returns VersionDefinition, containing an inline definition with its model type and
callBindings that specify exact child-process versions. At start, these bindings verify that the source agrees with the specified child versions; they do not
form another mutable execution graph. Each definition specifies its model type. Calls to exact Versions may cross
formats, while classpath calls use the caller’s format.
Durable supports the documented strict TBBPM and BPMN profiles through one semantic backend, and recovers using stored
processId values.
PostgreSQL can stop publishing new emissions before the Run terminates, preserving the records already accepted.
This does not complete or cancel the Run. The Run’s terminal state still determines the final cursor, acknowledgement, and retention conditions.
MySQL supports publication closure and acknowledgement at termination. It rejects a proposed early sealEmissions
inside the fenced Turn transaction, after verifying the Run lease and giving committed termination intent precedence.
The unsupported proposal is not committed. See the Durable operations runbook for initialization,
recovery, and retention requirements.
Choose a composition entry point
Section titled “Choose a composition entry point”Choose according to how the application creates and runs its engine:
- To configure and create an engine in plain Java, use
DurableProcessEngineConfigandDurableProcessEngineFactoryfromcompileflow-durable-runtime. - To use a first-party Store in plain Java, create
PostgresDurableStore(DataSource)fromcompileflow-durable-postgresqlorMySqlDurableStore(DataSource)fromcompileflow-durable-mysql, then pass it toDurableProcessEngineConfig.builder(store). - To supply a Store in Spring Boot, add
compileflow-durable-spring-boot-starterand provide one completeDurableStorefor application execution and background maintenance. - To use the first-party PostgreSQL Store in Spring Boot, add
compileflow-durable-spring-boot-starter-postgresql. - To use the first-party MySQL Store in Spring Boot, add
compileflow-durable-spring-boot-starter-mysql. - To implement storage or application integration contracts, depend on
compileflow-durable-spi.
These Store constructors are supported composition entry points; the selected Provider must use the same release version
as the engine. The host owns the supplied DataSource and must migrate the Provider schema before using the Store.
Other Provider implementation types and methods remain internal unless separately documented.
To create a Run and write application data in the same PostgreSQL transaction, use PostgresDurableAdmission and
its nested type PostgresDurableAdmission.Prepared from compileflow-durable-postgresql.
The companion types PgAdmissionWork, PgAdmissionResult, PgAdmissionFailure, PgAdmissionPhase,
PgConnectionCleanup, and PgConnectionDisposition are top-level types in the same package.
PgAdmissionResult contains the nested result types Committed, RolledBack, and OutcomeUnknown.
These documented integration types must match the engine and Store version; they do not expose the rest of the PostgreSQL
implementation as an extension surface. See Durable Process for transaction ownership and outcome handling.
Queries and data encoding
Section titled “Queries and data encoding”Embedded queries return typed keyset cursors. Transport or application adapters handle authentication, authorization, request deduplication, approval, and encoding or signing opaque page tokens. Portable process payloads use the Kernel’s fixed encoding; there is no application codec or payload-protector SPI.
The fixed value codec accepts standard JSON trees. Their BigDecimal and BigInteger values must use those exact
classes. A native byte[] is the only permitted embedded Java object. Custom serialization is supported if it produces
an accepted standard tree; arbitrary custom nodes, raw JSON nodes, and other embedded objects fail before persistence.
Read-only Effect invocation observations
Section titled “Read-only Effect invocation observations”First-party Effect adapters may read
com.alibaba.compileflow.durable.runtime.worker.EffectInvocation.current() and the returned immutable observation
accessors using the same version as the runtime. The worker alone publishes and removes the current-thread scope,
after its lease and invocation checks succeed. Capturing or retaining an observation does not enter that scope,
renew a lease, authorize a target, or grant another invocation. Its token fingerprint and captured times are
observations, not current ownership proofs. Hosts authorize their own operations. This named read-only bridge does
not make other worker internals or scope-writing methods an integration surface, and is not a general provider SPI.
Workbench JSON integration
Section titled “Workbench JSON integration”Workbench JSON commands use one integration type:
com.alibaba.compileflow.durable.runtime.json.DurableJsonCommands.
This bridge ships in compileflow-durable-runtime and must match its version. It is for framework integration, not an
application API, codec SPI, or access to other runtime internals.
The host validates HTTP metadata, permissions, and request-body limits. The bridge converts the original params JSON
using the definition selected for that start, and result JSON using the actual Effect occurrence’s output contract,
including Effects in child processes. It selects an Alias once and uses the command metadata as supplied.
It adds no schema-query API, application callback, or reusable start ticket.
DurableProcessEngineFactory.createJsonCommands(engine) binds the bridge to the default engine and its own operator
view. It rejects custom implementations and decorators. Spring creates this bridge only for its default engine;
a custom engine must supply its own required framework integration. A separate DurableOperatorService bean does not
replace engine.operator().
If a primary custom engine and a default delegate are both present, the default JSON integration rejects the selected custom engine unless the application supplies its own integration. The default metrics binder and health indicator do the same when their dependencies are present. None of these integrations silently binds to the delegate.
Internal implementation boundaries
Section titled “Internal implementation boundaries”Apart from the documented composition and integration entry points above, runtime packages, PostgreSQL/MySQL implementation
classes, compileflow-durable-testkit, Spring auto-configuration beans, and Durable database tables are internal.
A public class used to connect first-party modules does not become a Store extension point.
The documented Durable API is Supported; production deployments must also meet its database, migration, and operational
requirements. See Durable Architecture for execution and maintenance details.
Spring Configuration
Section titled “Spring Configuration”| Prefix | Owner | Notes |
|---|---|---|
compileflow.engine.* |
Engine instance | Strict binding (ignoreUnknownFields=false) |
compileflow.deploy.* |
Deploy control/runtime | Topology and role flags are explicit |
compileflow.durable.* |
Durable application/maintenance runtime | Default-off; role, migration, Worker, and retention are explicit |
compileflow.workbench.server.* |
compileflow-workbench-server |
Auth, HTTP limits, async invocation |
compileflow.workbench.execution.*, compileflow.workbench.preview.* |
Workbench execution binding | Host execution target, admission and operation gates, and Durable preview limits |
Property names, defaults, and configuration examples are in the configuration guide.
Deploy Behavior
Section titled “Deploy Behavior”Integrate Deploy through Spring Boot auto-configuration and ProcessDeploymentService.
The Deploy protocol defines the following rules:
- Deployment commands publish versions and change routes; execution nodes load and execute the selected versions.
- Published
ProcessArtifactvalues and their exact Process Versions are immutable. - Select PostgreSQL or MySQL once when assembling the application. They share a JDBC state machine but retain separate schemas, migrations, runtime selection, and database-specific verification.
compileflow-deploy-spring-boot-autoconfigureconfigures only database-independent Deploy components.- Use
compileflow-deploy-spring-boot-starterwhen the host supplies a completeDeployStore; it selects neither a process format nor a Provider. compileflow-deploy-spring-boot-starter-postgresqlandcompileflow-deploy-spring-boot-starter-mysqlselect a Store Provider only. Add the required format modules explicitly.DeployStorespecifies Provider behavior. SQL, migrations, schemas, and physical transaction strategies are internal.- H2 is a test double, not a production Deploy database. Production does not silently fall back to in-memory storage.
- Spring lifecycle starts
DeploymentRuntime; it has no public bootstrap API. - Protocol parsers accept only the documented schema version and reject unknown versions.
Server REST And Workbench Operate
Section titled “Server REST And Workbench Operate”Set compileflow.workbench.execution.target to PROCESS (the default) or DURABLE for each Server. The built-in PROCESS host requires EMBEDDED or DISTRIBUTED deployment topology and routing Outbox administration. The DURABLE host requires AUTHORITY, artifact.mode=SOURCE, and runtime-worker-enabled=false. Standalone Core workers can also use AUTHORITY polling; this does not make it a supported PROCESS Workbench Server topology.
For Durable publication, Workbench checks the process through Durable tooling. A completed Alias operation means the
route has been committed to the deployment Store and can be queried. Execution uses Run APIs and returns 202 Accepted.
Inline Durable previews require an isolated PREVIEW host.
See the Durable Workbench guide.
| Contract | Definition |
|---|---|
| Workbench REST format | The committed Workbench Server OpenAPI description for the matching frontend and server release |
| Server implementation | compileflow-workbench-server controllers and transport records generate that description |
| Web contracts | Generated OpenAPI types, refined domain types, runtime validation, and compile-time parity checks |
| Development gateway and Web environment | COMPILEFLOW_DEV_GATEWAY_* is development-only; VITE_COMPILEFLOW_* is public build-time configuration |
Keep shared API keys out of browsers. An authentication-capable gateway adds the private Server service credential only on its protected upstream connection. Do not deploy the Node development gateway in production. The official local full-stack setup is documented in DEPLOYMENT.md.
Workbench /api/** endpoints connect the official frontend to its matching Server release. OpenAPI defines that exact
same-release contract; these endpoints are not a third-party integration API.
Unsupported Surfaces
Section titled “Unsupported Surfaces”- Process-global mutable configuration or extension registries
- Public parser/model AST types in the API artifact
- Full-classpath annotation scanning for extension discovery
- Runtime extension installation, replacement, or unloading
- Obtaining Durable semantics through a
ProcessEngineconfiguration switch - Application table-level access to Durable state or dependencies on Durable runtime implementation packages
- Treating exact-version demand observations as infrastructure mutation commands
- Treating Workbench companion
/api/**endpoints as a public third-party integration API