Part 5 — Integration Hub
5.1 Flow model and step types#
A Flow is a trigger plus a graph of steps over declared variables. Variables are typed; flag a
variable sensitive or it will be recorded in run history if declared as a scalar (a sensitive variable and an
undeclared one are masked as ***).
A Flow starts at its trigger, runs its steps over the declared variables, and (for an exposed route) answers its caller.
The same Flow artifact is compiled twice, once for each runtime. Neither output is derived from the other.
| Step | Notes |
|---|---|
rest |
Own headers (rest.headers) are sent by both runtimes. Credentials, Host, Content-Type, Camel* and {{ are refused by name. rest.contentType/accept are not sent by either runtime. |
database |
Bound values only; the Hub scrubs result headers. |
file |
{connectionRef (object store), key XOR keyFrom, bodyFrom (write)}. |
soap |
Envelope is built from fields (io.mappings), reply read by xpath over local names. Hub only. wsSecurity refused by name. An effect for replay. |
decision, render |
Hub reaches them through the generated app's sidecar, so there is one FEEL/template implementation. |
notify |
Sends through an SMTP Connection; with no Connection it is a labelled stub. |
publish |
RabbitMQ queue or Kafka topic; Hub only. |
subFlow |
In-app only; the target needs expose, and a target with a policy must name callers in expose.subFlowCallers. |
| script / map | A script reads and writes variables.x. |
5.2 Triggers#
| Trigger | Runs on | Key rules |
|---|---|---|
webhook / expose |
App and Hub | Route comes from expose; a webhook without expose is refused. trigger.webhook is deprecated. |
schedule |
Hub | An app has no scheduler. |
queue |
Hub | RabbitMQ (amqp Connection) only. At-least-once. Failures land in <q>.dlq. |
event |
Hub | Kafka only; topic, consumer group and a filter compiled through the one expression parser. Auto-commit gives a named at-least-once gap. |
file |
Hub | MinIO or SFTP. Inbox/done/failed folders; content never recorded; read up to 1 MiB into a variable only when mapped. |
fileBasket |
Hub | A correlated group of files, one run per group; key pattern with exactly one capture group; completeness by count or timeout. |
flow-trigger.js holds every rule once; the tools read it when you write a trigger and the compilers
read it when they compile.
On an object store (MinIO) a file trigger moves each object itself in route-level hooks, because the S3 consumer
cannot be trusted to move files; on SFTP the consumer's own move does it. Either way, a file that finishes goes to
the done folder and one that fails goes to failedFolder.
A file run is not replayed: the refusal says to move the file from failed/ back to the inbox.
5.3 Connections per runtime#
A Connection is runtime-neutral; its resolved value is not (postgres:// vs jdbc:postgresql://,
split vs joined credentials, driver flags). Translation happens in one place:
connection-env.jsnames the environment variables per runtime (nextjs,camel-quarkus).hub-config.jsderives values from the Workspace Environment (services per network view, Connection bindings, identity) plus secrets from the vault.generate-hub-env.jswrites the worker'shub.env;verify-hub-config.jschecks every runtime.
Never type a Connection or issuer value into a worker's compose file; change the Connection or the Environment and regenerate.
To change a value, change the Connection or the Environment and regenerate.
One kind of value cannot travel as an environment variable at all.
5.4 Resilience#
resilience.circuitBreaker is compiled by both runtimes. failureThreshold is a 0–1 rate;
minimumCalls is required and is both window and minimum sample. On the Hub it uses MicroProfile
Fault Tolerance; on the app it is hand-rolled with per-process state. An open circuit with no
onFallback still fails the route. fallbackStep (jump to another node) is refused on both. No
designer authors a breaker yet; tools and seeds only.
5.5 Hub deploy, apply and rollback#
Hub deployment is desired state, not a command with a flow list.
hub_deploy/hub_undeploy/hub_rollbackwrite the runtime's flow list on the Workspace Environment, pinned to a reviewed sequence with Policies/Connections locked. Same approval gate and residency check as other deploys.npm run hub:applymakes the worker match: staged build, swap, restart, wait for exactly the desired routes. Every attempt, failures included, is recorded as ahub_appliedevent.- A failed start reverts to the last good state only when that state is provably on disk
(
hub.env.last-ok,secrets.last-ok/, jar build stamp). hub_deploymentsshows desired vs last applied. The pom's extension list is generated between markers.
Shared generated config is a fail-open surface: generate-camel.js refuses a leftover route it did
not generate.
5.6 Run history and replay#
- A run is one OpenTelemetry trace in Jaeger, found by
oneweb.flow.*/oneweb.step.*attributes.flow_runs/flow_runread it; a store that does not answer is refused, never "no runs". - Values recorded follow
recordRule(***for sensitive or undeclared). - Replay is a new run from the first step with the recorded inputs, against what is deployed now.
flow_replay_planlists hidden inputs and effect steps;flow_replayrefuses until each is supplied and acknowledged. It is never a resume. A cron flow and a file run cannot be replayed. - Error text is recorded as the runtime wrote it; the reader scrubs credentials on display.
5.7 Failed items#
failed_items lists dead letters (<q>.dlq) and failed files (a trigger's failedFolder). Replay and
delete (permanent, needs a reason) are confirmed actions in the Operations console, each recorded as
failed_item_handled. Gaps: files are read with the Connection's own credential; listing a DLQ sets
redelivered; one place lists its first 100.
5.8 Secrets and the vault#
| Action | How |
|---|---|
| Mint an apiKey for a Policy | policy_generate_key; written to the vault, never shown |
| Paste a partner's key | secret_set (write-only) |
| Check what is set | secret_status |
| Rotate with overlap | npm run key:rotate -- <start, deploy, finish or abort> |
OpenBao holds values at kv/oneweb/<workspace>/<env>/<KEY>. The Hub reads through the read-only
hub-apply AppRole; the Workbench writes through kernel-secrets, which cannot read a value back.
There is no silent fallback to a secrets file.
Values are written through the Workbench, not typed into artifacts.
Rotation is done with the key:rotate phases, never by hand.
5.9 Known limits#
- Hub flows cannot call
subFlow; app flows cannotpublish, useevent/schedule, or SOAP. - File triggers: at-least-once, SFTP is password or key auth with a pinned host key.
- An unreachable SFTP consumer does not fail readiness; verify with
verify:file-trigger. - Replay of a flow with effects needs every effect acknowledged.
- TLS to the broker is not set up.