Skip to content
Development preview · 2.0.0-SNAPSHOT

Troubleshooting

Record the error code and requested process code or Version, then find the matching symptom below. Use engine or deployment diagnostics to narrow the failure before enabling DEBUG logging. Keep variables and process source out of logs.

This page covers startup, loading, compilation, and invocation failures. For a Durable Run that was created but has stopped progressing, use the Durable operations runbook.

Spring binds CompileFlow properties strictly. In configuration sources that can enumerate their keys, unknown fields under compileflow.engine.*, compileflow.deploy.*, compileflow.durable.*, and compileflow.workbench.server.* prevent startup.

Environment variables have separate rules. Workbench’s explicit CONFIG_* aliases use an allowlist; other names follow Spring’s relaxed binding. Strict property binding therefore cannot detect every misspelled OS environment variable. See Configuration for the rules for each source.

  1. Find the property path in the error.
  2. Compare its name and value with Configuration.
  3. Remove invalid aliases and avoid repeating the same setting under different prefixes.
  4. Use Spring’s standard prefixes for datasource, HTTP server, Actuator, and logging settings.

CF_CONFIG_001 means a value is invalid. CF_CONFIG_005 usually means a matching semantic compiler is missing or multiple implementations are registered for the same ProcessModelType. Check that each required compileflow-tbbpm or compileflow-bpmn format module is present exactly once.

An extension is missing or cannot be created

Section titled “An extension is missing or cannot be created”

If a custom script executor, event listener, or Durable sink is not used, check its extension declaration. Creating a Spring bean alone does not register it with the engine:

  1. Check that the packaged META-INF/services/com.alibaba.compileflow.common.extension.Extension lists the implementation’s full class name and that the engine’s class loader can read both the file and the class.
  2. The implementation must be public, concrete, annotated with @ExtensionRealization, and have a public no-argument constructor.
  3. For an instance-creation failure, inspect the named implementation’s constructor and initialization method. Fixed single selection constructs only its winner. Named selection for script languages or retry policies, and full candidate-list lookups, construct all corresponding candidates. In those cases, lowering a broken implementation’s priority does not avoid its initialization failure.
  4. Recreate the engine after the repair and verify the corresponding script execution, event receipt, or delivery.

See the extension guide for complete declarations. Version and Alias data sources are still supplied explicitly through configuration or Spring beans; they do not use the Extension service file.

Compiling Java code generated from flows or Java scripts requires the standard jdk.compiler module at runtime. Use a full JDK or include that module in a custom runtime image. A JRE-only or over-trimmed image cannot perform those compilations.

Code Meaning Checks
CF_RESOURCE_001 definition not found Check process code and classpath resource name
CF_RESOURCE_002 read or UTF-8 decoding failed Check readability and strict UTF-8
CF_RESOURCE_003 size, location, or ambiguous resource Check size limits, local-only URLs, and duplicate resource names

For a process file packaged with the application, specify its resource path explicitly:

ProcessDefinition definition =
ProcessDefinition.classpath(ProcessModelType.TBBPM, "order.process", "flows/order.bpm");

Use the exact packaged resource path and its declared model type. For a BPMN source, supply ProcessModelType.BPMN and the path to that source.

Network-backed classpath URLs are rejected. Remote artifacts must be fetched and verified outside the Engine. If multiple JARs or directories supply the same resource name, their bytes must match. Remove conflicting copies or use distinct resource names; changing classpath order is not a supported fix.

3. Compilation Fails Or Runtime Does Not Become Ready

Section titled “3. Compilation Fails Or Runtime Does Not Become Ready”

CF_COMPILE_001 and CF_COMPILE_002 identify process compilation failure and generated-Java compilation failure. CF_RUNTIME_001 means runtime loading or warm-up did not become ready because it timed out, was interrupted, or was cancelled.

  1. Run strict preflight on the exact definition:
ProcessPreflightReport report = engine.tooling()
.preflight(definition, ProcessPreflightOptions.strict());
  1. Inspect structured compiler diagnostics and the failing process code.
  2. Verify action classes and methods are visible through the configured class loader.
  3. Increase compileflow.engine.runtime-load-timeout only after measuring a first load that needs more time than the caller is currently allowed to wait.

Requests loading the same definition can share one loading task. That task uses a fixed source snapshot and class-loader scope; the engine does not repeatedly retry parsing, generation, or javac within it. After fixing the definition or environment, the next request can start a fresh load.

A caller timeout does not cancel this shared task. Loading can succeed after the request has returned and populate the node’s cache. Before retrying, inspect loading diagnostics and logs to distinguish a failed load from a caller that stopped waiting too soon.

To export source for local diagnosis, set compileflow.engine.java-diagnostics.debug.output-directory. Enable compileflow.engine.java-diagnostics.debug.bytecode-enabled=true only when class files are needed. Protect exported code as sensitive data and delete it when the investigation is complete.

Check execution failure through ProcessResult:

ProcessResult<Map<String, Object>> result =
engine.execute(definition, variables);
if (result.isFailure()) {
ProcessError error = result.getError();
log.warn("Flow failed: code={}", error.getCode());
}

Use isFailure() to identify failure, then handle it by getError().getCode(). A successful output may be null, so getOutput() == null does not by itself indicate failure. If the caller needs an exception, orElseThrow() converts a failed result to ProcessExecutionException.

Common codes:

Code Meaning Next step
CF_EXEC_001 Process action/execution failure Inspect action diagnostics by invocation ID and check which business operations already occurred.
CF_EXEC_003 Script failure Check the script language, mapped inputs, and executor diagnostics.
CF_EXEC_004 Action or process timeout Measure duration and check the external outcome; a timeout response does not establish that an external operation stopped.
CF_EXEC_005 Executor capacity is full or the executor is closing Check executor lifecycle and capacity.
CF_EXEC_007 Operation interrupted, or a cancelled Action did not stop within its grace period Check cancellation and shutdown diagnostics. The Action may still be running; confirm its external outcome before retrying.
CF_EXEC_008 Execution validation failure Use the diagnostics to check the definition and execution requirements.
CF_EXEC_009 Output conversion failed after the invocation reached End or an ordinary Wait Fix output mapping; do not replay business actions merely because result conversion failed.
CF_EXEC_010 Input conversion failed before process start Check input types, fields, and value conversion rules.
CF_EXEC_011 Alias route missing, target selection failed, or the route does not authorize the selected target Inspect Alias and local-ready state.
CF_EXEC_012 This node cannot execute the selected Version when accepting the invocation Inspect version installation and artifacts.
CF_EXEC_013 Nested process call exceeded the configured depth Inspect the call graph and decide whether deeper nesting is intentional.
CF_EXEC_014 Resolved call graph is invalid before action execution Fix the target, reference, or cycle, then verify the complete graph in an integration test or deployment preparation; root preflight alone does not check child dependencies.

Failure to map the caller’s input object to the root variables (CF_EXEC_010) occurs before process execution. Failure to convert the invocation’s output to the requested Java type (CF_EXEC_009) does not roll back its side effects. Action-level input and output failures have their own execution contract.

For ProcessEngine execution through Deploy, the exact Version must be installed on the current node. An Alias selects the stable or candidate Version from the locally ready route; it does not automatically substitute another Version.

Check:

  1. the control-plane Alias revision and stable/candidate versions;
  2. routing Outbox status and dead letters for EMBEDDED or DISTRIBUTED; assigned Aliases and database polling for AUTHORITY workers;
  3. node-local desired, in-flight, installed, and backed-off versions, using the runtime diagnostics;
  4. artifact namespace, process code, version, model type, and digest;
  5. local-ready revision and the bounded installation failure reason.

Control-plane COMPLETED means the route transaction committed. Nodes may still be preparing the new Version. After a repair, read the snapshot again. Confirm that the target Alias’s local-ready revision matches its desired revision, then run a controlled request and check the effective Version.

If the Alias was intentionally retired, a missing executable route is expected after local convergence. Check its retained revision and retirement status before diagnosing an installation failure. Do not retry against the retired Alias to restore service; an authorized operator must reactivate it. See retire and reactivate an Alias.

CF_EXEC_011 means that no serving Alias route is available, target selection failed, or the route does not authorize the selected target. CF_EXEC_012 means that the selected root Version or a required exact child runtime is not installed or ready on this node. When these errors originate from runtime admission, no Action in that affected invocation has run. Earlier business actions may have finished before a later Action calls the engine dynamically and receives the error. Replaying the whole request can repeat those earlier side effects.

Workbench does not automatically resubmit a failed synchronous request. Persisted asynchronous calls follow their configured retry policy. If root or child runtime acquisition reports CF_EXEC_012 before business execution, Core retries selection and complete call-graph acquisition once only when the Alias route has changed. A fixed Version or an already fixed Alias selection does not reroute. Caller-managed replay requires business idempotency and an attempt limit. An invalid Alias or missing or unavailable artifact needs repair; waiting alone does not fix it.

CF_EXEC_013 means the call exceeds compileflow.engine.call.max-depth. Inspect the call graph first. Increase the limit only if deeper nesting is intentional and its resource cost is acceptable; otherwise the same request will fail again.

CF_EXEC_014 means the call graph is invalid: for example, it contains a cycle, an exact-Version or published graph includes a classpath target, or a target’s process code differs from its declaration. A Direct graph may call classpath or exact version targets. Fix the definition or publish and install the correct graph. The engine does not guess an Alias, latest Version, or caller-relative classpath.

Reuse an engine for the same configuration and resources, and close it with the application. Creating one per request repeats loading and compilation work.

If compilation repeats, check:

  1. The definition bytes are unchanged.
  2. Requests use the same effective class-loader scope.
  3. A reused runtime is not being released too soon.
  4. compileflow.engine.max-resident-runtimes fits the workload.
  5. Known root and classpath child definitions are preflighted and explicitly warmed at startup; referenced exact Versions are loaded separately. warmUp does not traverse child calls, and its cache entries remain evictable.

Use the same explicit Version for repeated calls instead of generating random version IDs. Changed published content needs a new version identity.

If compilation frequency is normal but memory keeps growing, use heap and thread diagnostics to distinguish retained runtimes, business objects, and unfinished tasks. Check ownership and shutdown as described in Resource management before increasing the cache limit.

CF_EXEC_005 or RejectedExecutionException can mean capacity is full or the executor is closing. Check engine lifecycle and the rejection reason first. If the executor has stopped, fix the lifecycle problem; a larger queue will not help.

  • Runtime-load capacity: compileflow.engine.executor.runtime-load.max-concurrency and max-pending.
  • Timeout-enforced action capacity: compileflow.engine.executor.action-timeout.max-concurrency and max-pending.
  • Parallel coordination capacity: compileflow.engine.executor.parallel.coordinator-max-concurrency and coordinator-max-pending.
  • Event capacity: compileflow.engine.observability.events.max-concurrency and max-pending.
  • Deploy installation capacity: compileflow.deploy.runtime.installation-concurrency bounds artifact installation in authority-backed and distributed runtime workers, and admitted convergence work in the embedded topology. Compilation and runtime loading are also bounded by the Engine runtime-load capacity.

Measure queue wait, processing time, rejection rate, and upstream concurrency before increasing limits. If requests keep arriving faster than they can be processed, reduce caller concurrency or slow submissions instead of letting the queue grow.

For a failed or dead-lettered async request:

  1. Read the invocation through GET /api/async-invocations/{invocationId} and its attempts through GET /api/async-invocations/{invocationId}/attempts.
  2. Use the same invocation ID to inspect execution logs. Establish whether the failure occurred while loading the version, running an action, or saving the result.
  3. Verify that the caller supplied exactly one selector, a Version or an Alias, and that retries use the originally selected exact Version.
  4. If the root process could not load, check artifact availability, digest integrity, and node-local installation errors.
  5. Fix the cause and confirm that replay is safe before requeuing that invocation. Inspect the new attempt and final state to verify the repair.

These endpoints apply to Workbench Server’s PROCESS execution mode. See Async invocation health for diagnosing the queue as a whole.

Workbench selects an exact Version through Alias routing before saving an asynchronous request. The record keeps that Version and the necessary routing attribution, without routing keys or attributes. If no key is supplied, the persisted invocation ID is used as the routing key.

The response includes the effective Version, Alias, route revision, and target. Execution logs correlate the call through its effective Version, Alias, and route revision. Routing keys and lease tokens remain internal.

Before executing any process code, each attempt loads the main process Version saved with the request. This remains true after an Alias change or after that runtime has been removed from the local cache.

Repeated Async invocation runtime could not be loaded errors call for checks of artifact availability, digest integrity, compilation capacity, and local installation. The request is not switched to the Alias’s current Version.

Use ProcessExecution trace and invocation IDs, namespace, process code, optional exact Version, and timing to correlate a failure. Terminal ProcessEvent.ExecutionAttribution can also supply parent invocation, call depth, model type, source digest, and the Alias revision and target used at admission. Stable error codes are also suitable for diagnostics.

Never log routing keys, source content, full local paths, credentials, raw variables, arbitrary application objects, or unredacted compiler output in shared production logs.

Include:

  • CompileFlow commit/version and Java runtime;
  • model type;
  • stable error code and redacted message;
  • minimal definition if it contains no confidential logic;
  • exact configuration keys relevant to the failure;
  • reliable steps to reproduce the problem.

See Testing, Monitoring, and Operations Playbook.