Skip to content

Example flows

Thirteen working flows to start from, for the plant, for the business and for both: pick one in the editor, answer a few questions and it joins your draft as new tabs.

Updated View as Markdown

A blank canvas is the slowest way to learn a flow editor. Examples is a gallery of complete flows that ship inside the connector: every one compiles with no deploy error, and the ones that call an outside system bring a mock service so they run the moment they are deployed.

Open it from the Examples button at the foot of the palette, Flows > New tab from example…, the Start from an example button on an empty canvas, or Ctrl/Cmd+K (Examples…, or Example: followed by the name).

Using an example

  1. Pick a card. Cards are grouped like the palette: Plant, Business and Both. The switch at the top (Plant, Business, All) works like the palette’s, and the search matches names, nodes and sources. A card shows the nodes the flow uses, a small picture of the canvas and what it needs: sources, secrets and mock services.
  2. Answer the questions. The form asks only what the example cannot guess: a device id, a printer, the name of a secret, a host. Secrets are never typed into a flow: the flow gets ${secret:name} and nothing else. An admin can store the value (write-only) from the same form; anyone else asks an admin to create it under Secrets before deploying.
  3. Use example. The flow is added as new tab(s) of the shared draft. Every node, wire and tab gets a prefix of its own (biz-webhook-erp-…, then …-2-… the second time), so inserting an example twice never clashes. A source key that is already on the canvas is added disabled and reported, because a key may exist once.
  4. Look, test, deploy. The source node is selected; Test runs the flow on the sample record shown in the example. Nothing is deployed until you press Deploy, and Undo removes the tabs again.

Mock services

An example that calls an ERP, Teams or a PLC gateway sets Where it calls out to Bundled mock. The nodes then carry mock: true and answer from a mock service such as ex-erp or ex-shop, so the flow runs with no outside system. Switch to My system to call the real host: the form then asks for its URL, key or fingerprint.

Also install what it ships saves, on this instance and before the flow is staged, the mock service (PUT /api/mocks/{name}), a lookup table and, for the app example, the app as an unpublished draft. These are runtime settings, not part of the flow, and an existing table or app is left as it is. A protected environment serves no mocks: the gallery then defaults to My system.

Some systems have no mock. The card says so (Needs setup, or Test on a sample): Postgres, an SMTP relay, a Modbus or OPC-UA device, a Zebra printer. Test on the source node still runs the whole flow on the sample record and shows each step and the mail, query or print it would produce, without touching those systems.

The examples

Example For Runs What it shows
Modbus to dashboard with deadband Plant Test on a sample A Modbus source, an over-limit flag, the live hub and the push sink thinned by preprocess.deadband
OPC-UA alarm to Teams or email Plant Test on a sample (Teams answers from mock ex-teams) Filter on alarm state, dedupe per alarm, a Teams webhook call, an email branch that switches on with an SMTP host
CNC state to history (FOCAS simulator) Plant Runs as is (simulator) A FOCAS source (the built-in simulator needs no machine), a cutting flag, local history and the live view
Order to coding printer by line Plant Test on a sample The packaging-line pattern: order to print fields, a branch per line, a printer node per line, an unknown line refused with a 422
Zebra label print with scanner verification Plant Test on a sample (line stop answers from mock ex-line-stop) Serial label to a Zebra, a verify node matching the scan, a reject source that stops the line
Signed webhook to ERP Business Runs as is (mock ex-erp) HMAC-signed webhook, dedupe per delivery, validate against payment.confirmed, HTTP post
Nightly SQL report by email Business Needs setup A schedule, a read-only SQL query with bound parameters, CSV, an email attachment, ${secret:} for the SMTP password
SFTP CSV import to Postgres Business Runs as is (mock SFTP directory) An SFTP source, once per file and row, a lookup node, a SQL upsert, failed rows in the dead-letter queue
Payment reconciliation with exception cases Business Runs as is Two ledger sides on two tabs, a nightly reconcile, a case per exception in the workbench
Approval before posting Business Runs as is (mock ex-erp-journals) The approve node with a threshold, a rejection on the error port, then the ERP post
Link nodes across tabs Both Runs as is (mock ex-orders) Two intakes ending in Link out nodes that share one tail on a third tab
Error branch with compensation Both Runs as is (mock ex-shop) An error wire for a declined card; reserve and charge each name their undo when shipping fails
App form to flow to answer Both Runs as is An example app (saved as a draft) whose form fires app:<app>/quote and shows the flow’s answer

Each example’s card lists its sources, the config.yaml it needs (a device, a printer, the postgres: section, a host on the egress allowlist) and the secrets it reads. The deploy checks that ship with the connector validate every example in every shape: with its defaults, with its optional nodes switched on and with the mock switched off.

REST and MCP

Route Role What it does
GET /api/examples viewer Every example: audience, purpose, node types, needs, inputs, mock services, the flow document
GET /api/examples/{id} viewer One example
POST /api/examples/{id}/render {values?, mock?, prefix?} viewer The flow for your answers: placeholders replaced, ids prefixed, mock flags applied, plus the mock services, lookup tables and app to install. Deploys and stores nothing

The MCP tools list_examples (filter by audience) and get_example (with render: true, values, mock, prefix) give agents the same set: render one, then add its flow to a draft with the draft tools and install mocks, lookups and app with the matching tools or routes.

Writing your own

An example is one JSON file in apps/connector/examples/: the flow document with {{KEY}} placeholders, its inputs, what it needs, the mock services its nodes use, an optional lookups and app, a sample record under try and a one-line purpose. The file list in apps/connector/src/examples/mod.rs and the tests there keep it honest: they render it in every shape and deploy-validate the result. Save a flow you built as a snippet or export to start one.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close