CompileFlow Module Map
Use this page when reading or changing the implementation to find the responsible module and source entry point. For application setup and dependencies, start with Quick Start. See Supported surfaces and the API reference for public interfaces and their behavior.
Modules
Section titled “Modules”Engine and process formats
Section titled “Engine and process formats”| Module | Responsibility |
|---|---|
compileflow-bom |
Maven dependency management for CompileFlow artifacts. |
compileflow-common |
Extension framework and shared utilities for text and field encoding, digest calculation, operation and shutdown coordination, failure summaries, and duration validation. |
compileflow-api |
Public ProcessEngine, ProcessRef, ProcessDefinition, result, configuration, and SPI contracts. |
compileflow-core |
Format-neutral resolution, semantic compilation, runtime caching, execution, and local routing. |
compileflow-tbbpm |
TBBPM parsing, validation, semantic frontend, and semantic-compiler provider. |
compileflow-bpmn |
BPMN parsing, validation, semantic frontend, and semantic-compiler provider. |
Script implementations
Section titled “Script implementations”| Module | Responsibility |
|---|---|
compileflow-script-qlexpress |
QLExpress 4 implementation; adding the dependency discovers its declared executor automatically. |
compileflow-script-mvel |
Optional MVEL 2 expression executor for trusted script actions. |
Script implementations live under compileflow-scripts/. Applications depend on the implementations they use;
ScriptExecutor and the prepared-program contracts are defined in compileflow-api.
Spring Boot
Section titled “Spring Boot”| Module | Responsibility |
|---|---|
compileflow-spring-boot-autoconfigure |
Spring Boot auto-configuration for the core engine and compileflow.engine.*, independent of process format. |
compileflow-spring-boot-starter |
Common Spring Boot and engine dependencies, without selecting a process format. |
compileflow-spring-boot-starter-tbbpm |
Dependencies and configuration for ProcessEngine with TBBPM. |
compileflow-spring-boot-starter-bpmn |
Dependencies and configuration for ProcessEngine with BPMN. |
These four modules live in compileflow-spring-boot/ and inherit directly from the root POM.
Deployment and persisted execution
Section titled “Deployment and persisted execution”| Module | Responsibility |
|---|---|
compileflow-deploy |
Parent module for deployment: API, wire protocol, control plane, runtime deployment, database stores, and Spring Boot integration. |
compileflow-deploy-jdbc |
Shared JDBC persistence implementation, released together with its database providers. |
compileflow-durable |
Parent module for persisted execution: Turns with step limits, Effects, Outbox work, and first-party stores. |
compileflow-durable-runtime |
Preparing and recovering Durable Runs, managing leases, and running Workers. |
compileflow-durable-jdbc |
Internal JDBC connection handling and rules for stored value types and structure, shared by first-party Providers of the same product version. |
For deployment commands, start in compileflow-deploy-api; for projection transport and persistence contracts, see compileflow-deploy-protocol and compileflow-deploy-spi. The control plane and execution-node implementations live in compileflow-deploy-control-plane and compileflow-deploy-runtime, respectively. For persisted execution, start in compileflow-durable-api for Run operations or compileflow-durable-spi for provider and host extension contracts.
Deploy and Durable each group their shared JDBC implementation and database providers in a storage directory, and their auto-configuration modules and starters in a Spring Boot directory. All of these modules inherit directly from the corresponding product POM. See the complete module lists in Deploy and Durable.
| Product | Storage | Spring Boot |
|---|---|---|
| Deploy | storage | spring-boot |
| Durable | storage | spring-boot |
Workbench and integration tests
Section titled “Workbench and integration tests”| Module | Responsibility |
|---|---|
compileflow-workbench-server |
Workbench REST API, persistence, async invocation, deployment operations, and diagnostics. |
compileflow-workbench |
Workbench product: browser application, Java Server, and shared deployment assets. |
compileflow-integration-tests |
Cross-module behavior tests. |
Maven builds the Java Server in compileflow-workbench/server. The Workbench pnpm workspace builds web and the
dev-gateway used for local development. Docker, Compose, and delivery scripts live at the product root. Web and Server
build independently and can be packaged together. The examples profile builds the four Spring Boot examples.
The standalone Java example imports the published BOM and builds independently
of the reactor. Use the benchmarks profile for the JMH module.
Execution entry points
Section titled “Execution entry points”ProcessEngine and DurableProcessEngine are sibling engines, each with its own API and lifecycle.
Use ProcessEngine to execute one invocation from a definition, Version, or Alias. Use DurableProcessEngine to create a
persistent Run that can be resumed. Each Durable engine manages its own node-local resources and optional Workers.
ProcessRuntimeResolver finds an executable runtime for each invocation. When needed, it loads the definition, validates
and compiles it, and installs the runtime in the local cache. Applications can also use ProcessRuntimeManager to warm a
definition, bind a local Version, or unload a runtime.
Deploy publishes versions and changes routes. It also needs to track which deployment still uses a runtime and to prepare
child processes. The internal ProcessRuntimeOwnership, ProcessCallInspector, and ProcessExecutionGraphPreparer
capabilities provide those operations. The public ProcessRuntimeManager exposes the local operations applications need.
LocalRoutingState records the routes a node can serve, and AliasAdmission accepts a published route.
When the route has a candidate, AliasTargetSelector first tries the named targeting policy. With no policy, or if the policy returns Optional.empty(),
it calls DeterministicAliasSelector to select stable or candidate by weight. If the policy throws a runtime exception or linkage error, selection falls back to stable; an unavailable named policy is an error. DeploymentRuntime loads the runtimes
needed by the desired route and makes that route locally ready, without changing the core execution contract.
Dependencies and responsibilities
Section titled “Dependencies and responsibilities”- Process contracts live in
compileflow-apior the product’s API module. The general extension framework and shared utilities live incompileflow-common. compileflow-apidepends oncompileflow-common. Common has only JDK runtime dependencies, without a dependency on process APIs or engines. Process identities, digest formats, and domain errors remain in their owning modules. Callers own digest fields, order, character encoding, and domain identifiers; Common provides digest calculations and field-encoding utilities. Duration constraints check precision and numeric range; defaults, field errors, and business limits remain in their owning modules.- Each format module parses its files and provides a semantic compiler; Core depends on that provider interface.
- Engines and storage providers do not depend on one process format. Starters select the needed components without a separate module for every format, engine, and store combination.
- The control plane commits deployment changes before execution nodes install runtimes and begin serving the new route.
- Durable persistence is separate from the Workbench queue for asynchronous invocations.
- An implementation type can be public in Java for use across packages or modules without being a supported application API. Use the public contracts listed in Supported surfaces.
- Common groups its extension framework and shared utilities by responsibility. Format parsing, process semantics, script execution, and business policies remain in their owning modules.
The following source packages each handle a specific part of the implementation:
- Definition loading in
core.sourceaccepts a definition and an optional Version binding; runtime orchestration supplies these values without making the source layer depend on runtime requests or engine assembly. TbbpmXmlParserandBpmnXmlParserare the format parser entry points. Their fragment parsers stay package-private.durable.runtime.processowns loaded process runtimes, their identities, caches, and lifecycle;durable.runtime.programowns executable programs, compilation, and program execution contexts.- Workbench route definitions and designer navigation live together in
web/src/shared/navigation.
Source Navigation
Section titled “Source Navigation”| Need | Start here |
|---|---|
| Public execution | compileflow-api ProcessEngine |
| Extension discovery and lifecycle | ExtensionManager |
| Runtime resolution | compileflow-core ProcessRuntimeResolver |
| Spring auto-configuration | CompileFlowEngineAutoConfiguration |
| Alias routing | AliasAdmission, AliasTargetSelector, DeterministicAliasSelector |
| Deployment data plane | DeploymentRuntime in compileflow-deploy-runtime |
| Durable runtime | DurableProcessRuntimeManager and the Durable runtime module |
| Browser draft storage | compileflow-workbench/web/src/authoring/designer/api |
| Workbench Server persistence | compileflow-workbench/server/src/main/java/com/alibaba/compileflow/workbench/server |