Workbench Server OpenAPI
Workbench Web and Workbench Server must use the same CompileFlow release. Their HTTP interface is defined in
compileflow-workbench-server.openapi.json,
including paths, methods, data structures, required fields, and enum values. These endpoints serve the Workbench client;
they are not a stable API for third-party engine integrations.
For authentication and trust requirements, idempotency, optimistic concurrency, routing, and retry behavior, see the Operate API contract. OpenAPI does not describe all of these rules.
Every /api/** response uses Cache-Control: no-store, including process source, asynchronous results,
management responses, and authentication or capability failures. This applies to both execution targets.
Static web assets retain their own cache policy. Cache control does not replace authorization.
Envelope constraints
Section titled “Envelope constraints”Typed request envelopes reject unknown fields; business maps such as params retain their declared dynamic keys.
An omitted or explicit null parameter map means an empty map. Routing requires exactly one nonblank version
or alias; a routing key or nonempty targeting attributes require an Alias. Active-work responses contain exactly
the occurrence selected by kind: WAIT has waitOccurrence, TIMER has timer, and EFFECT has effect.
Batch asynchronous redrive additionally requires unique invocationId values, even when their expected counts differ;
JSON Schema’s uniqueItems catches identical entries, while the Server enforces uniqueness by ID.
For process creation, the Server also enforces limits after stripping surrounding whitespace: the name is at most 256 Unicode code points, the description at most 1,024, and each tag at most 64. Blank tags are discarded, duplicate tags are collapsed in encounter order, and at most 32 distinct tags remain. Nonblank XML is preserved rather than trimmed. These checks apply in addition to the schema’s required fields.
Updating a draft applies the same name, description, and tag limits. The update is a complete replacement, not a patch: supply the current draft revision, name, tags, and XML. XML may be empty for an unfinished draft; preflight requires nonblank source. Publication requires the observed draft revision, and its optional changelog is limited to 2,048 Unicode code points after stripping surrounding whitespace.
For ordinary execution and preview, an omitted or null invocationId is allowed. A supplied ID must be
1–128 ASCII characters, begin with a letter or digit, and contain only letters, digits, periods, underscores,
colons, at signs, or hyphens. It is validated without trimming; an empty string is not an omitted ID.
A failed ProcessExecutionResponse contains errorCode and error, not result; a successful response
omits both failure fields. The optional reachedTrigger identifies a trigger entry reached by this ordinary
invocation, not a persisted wait or a resumable continuation.
For deployment creation, a canary requires a weight from 1 to 9,999 basis points, and nonempty
targetingParameters require a targetingPolicy. Revision strings must fit the Java signed 64-bit range;
matching the schema’s decimal pattern alone is not sufficient.
Canary health evaluation requires positive lookbackMs and minCanarySamples, a finite
maxCanaryErrorRate between 0 and 1 inclusive, and a nonnegative maxCanaryP95Ms.
The defaults are 600,000 milliseconds, 20 samples, an error rate of 0.05, and 0 respectively.
A zero latency limit disables the latency check. Evaluation reports insufficient data before checking error rate
or latency; it does not change the rollout.
Durable result responses use outcome to distinguish NOT_COMPLETED, SUCCEEDED, FAILED, and
CANCELLED. Only a successful result contains output; a failed result carries failure metadata.
A missing Run is an HTTP 404, not a NOT_COMPLETED result. Active-work and Outbox list responses
omit business payloads and lease authority. Treat pagination cursors as opaque values; a null
nextCursor means there is no next page.
For Alias routing, the Server applies the same routing input limits as the engine: at most 512 Unicode code points for the key, 32 attributes, 128 code points per attribute name, 2,048 per value, and 32 KiB of UTF-8 data in total. An empty routing key is treated as absent; a nonempty key is not trimmed. Attribute values must be non-null, and reserved names are rejected.
Monitoring and execution logs
Section titled “Monitoring and execution logs”Monitoring metrics have scope workbench_server: they summarize retained execution logs, not all engine executions
in the deployment. processesWithAliases counts processes with Aliases in the default namespace. Monitoring time
ranges are 1h, 6h, 24h (the default), 7d, and 30d. Trend intervals are 1m, 5m, 1h, and 1d;
the Server coarsens the interval when necessary to limit the number of buckets to 720.
Execution log list and export filters accept success, failed, or all for status. Nonblank startTime and
endTime must be ISO-8601 instants, with start no later than end. List pages are one-based and limited to 100 rows
per page. CSV export returns raw UTF-8 bytes, not Base64. If the matching rows exceed the configured
compileflow.workbench.server.execution-log.max-query-rows, the export fails instead of returning a truncated file;
narrow the filters and retry.
Numeric values
Section titled “Numeric values”The Server preserves exact JSON integers and decimals, including decimal scale and signed zero, when receiving requests,
persisting asynchronous invocations, and returning responses. Duplicate asynchronous requests are compared after the
async payload codec round trip. Decimal scale and signed zero remain part of request identity because they can affect
execution: 1.0 and 1.00 are distinct, while 1 and 1e0 have the same persisted representation.
Distinct precise values stay distinct. Object key order does not matter; array order does.
Learn and Designer previews, along with Durable start, preview, and Effect resolution forms, send the original JSON
text. Preview and Durable result viewers display the original response text. The browser validates input syntax and
object structure, but does not use JavaScript Number values to regenerate the request or result text.
Deployment dead-letter redrive
Section titled “Deployment dead-letter redrive”Deployment dead-letter redrive applies globally. Send an empty request body: even {} or whitespace is rejected before
redrive starts. The endpoint does not accept filters.
Contract availability
Section titled “Contract availability”The checked-in document is a combined PROCESS and DURABLE contract generated in a test-only Spring application context. Each production Server selects one execution target. Production Server artifacts expose neither Swagger UI nor an OpenAPI endpoint.
Asynchronous invocation reads
Section titled “Asynchronous invocation reads”GET /api/async-invocations returns operational summaries without business input or result documents.
Its rows use AsyncInvocationSummaryResponse and omit response. Read the invocation by ID to obtain its
latest execution result. List payloadErrors covers routing metadata only; detail reads also diagnose result JSON.
Asynchronous invocation redrive
Section titled “Asynchronous invocation redrive”Single redrive requires the observed expectedRedriveCount. Batch redrive requires an explicit bounded invocations list containing each ID and its observed count. A database compare-and-set prevents an old request from redriving a later failure. Batches return successful and conflicted IDs separately; they never select fresh members by filter during a retry. See the Operate API contract.