Build and test in the workflow builder
Find your way around the builder's Graph and Steps views, configure each step, run tests with nothing delivered, ask the Agent for drafts, and save through Review & save. PHI stays masked throughout.
On this page
- Before you start
- The toolbar
- A blank workflow
- The Graph view
- Overlays
- The step editor
- Configure
- Data
- Errors & retries
- Test cases
- Data maps
- Choose the test input
- Run a test
- The Steps view
- The Agent in the builder
- Review and save
- PHI in the builder
- Viewers
- Keyboard and the command bar
- Links into the builder
- Troubleshooting
- Reference
The builder is a workflow's Build tab. You add and configure steps, run the workflow on a test message with your unsaved edits and nothing delivered, and save a new version through Review & save. This guide walks through each part of the screen. To build a whole channel from start to finish, follow Build a channel with several destinations.
flowchart LR
Edit["Edit steps (Graph or Steps)"] --> Input["Choose the test input"]
Input --> Run["Run test: nothing delivered"]
Run --> Edit
Run --> Review["Review & save: changes, note, test cases"]
Review --> Draft["Save as draft"]
Review --> Approval["Save and deploy: a second admin approves"]Before you start
- A workflow to open. See Start a workflow.
- The
operatorrole to edit, run tests and save a draft, andadminto send a version for deployment. A viewer can open the builder and look at everything. See Viewers.
The toolbar

| Control | What it does |
|---|---|
| Setup pill | 2 to set up counts the steps that still need settings, and opens the first one. A step that needs setup blocks deploying. |
| ⌘K | The builder's command bar. See Keyboard and the command bar. |
| Version | The workflow's id and version. v4 · v5 draft means a saved draft waits behind the deployed v4. It links to the workflow's details. |
| Undo, Redo | Up to 60 whole-workflow steps. A typing burst is one step. Undoing back to the saved state clears Unsaved changes. |
| Graph | Steps | Graph edits on the canvas. Steps edits a step list with the data inline. Your browser remembers the last one you used. |
| Input | The message the next test run uses. See Choose the test input. |
| Run test | Runs the input through every step with your unsaved edits. Nothing is delivered. Its dot shows how the last run went. |
| Agent | Opens the Agent. See The Agent in the builder. |
| ··· | Take the builder tour, Templates, Save as template, Export to Mirth, Workflow retries & queues, Version history, Run now (manual workflows) and Reset to an empty workflow. |
| Save | Opens Review & save. A dot shows while there are unsaved changes. |
Save's title says where the workflow stands: Unsaved changes · Review & save (⌘S), Draft saved · … while production keeps running an older version, or Deployed · … once the version you saved is the one deployed. The builder checks again when you come back to its window, so a deploy that a second admin approves elsewhere shows up without a reload.
A blank workflow
A blank workflow opens on How do messages arrive?:
- Describe the interface and choose Generate with Agent. The Agent drafts the steps into the builder as unsaved edits and says Drafted steps as v. Run a test to see the data at every step. Nothing is saved or turned on: Drafts only. Nothing goes live until you save and enable it. With AI off, the engine says AI is off on this engine.
- Or, under Or pick a trigger, choose MLLP listener, Webhook, SFTP pickup, FHIR subscription, Schedule or Database poll. The tile adds that trigger and opens its settings.
- Start from a template and Import a Mirth channel open the Templates gallery and Migration › Import.
··· › Reset to an empty workflow asks first, then clears every step in the draft. The deployed version doesn't change, and ⌘Z brings the steps back until you leave the page.
The Graph view
Every connection on the canvas has a +. It opens the step palette: Logic, Transform, Flow and Deliver, with a search and a line on what each step does. A step the workflow can't hold at that point is greyed out and says why, for example A channel can't run a Loop step. Use a workflow retry or a scheduled trigger instead. The + on a branch's label adds a step at the start of that branch, and the dashed + under the branches adds a new branch.
A new step is called New , such as New data map, and reads Not configured yet. It shows SET UP with an amber border until it has settings, and it counts in the setup pill.
Each step's card shows its status as text:
| Status | Meaning |
|---|---|
| OK 6 ms | The step passed in the last test run, with its time. |
| FAILED | The step failed. Its border is red and it shakes once. |
| SKIPPED, NOT RUN | A branch the message didn't take, or a step after a failure. Drawn at half opacity. |
| SET UP | The step still needs settings. |
The Outline column on the left lists the steps by number, with a header per branch (└ Admit · MSH.9.2 in A01, A04) and + Add step at the end of each branch. A selected step's number is accent, and a failed one is red. For an MLLP trigger, the outline ends with Listening on: the listener's address and via tunnel · Up (or Down), read from the tunnel's live status.
Tidy layout puts dragged steps back. The footer reads {n} nodes · {e} edges · valid, or needs setup.
Overlays
The switch in the canvas footer picks what the cards show.
- Test run (the default): the last test run's statuses.
- Live · 24 h: each step's production runs and p95 time over the last 24 hours, such as
1,284 · 2 ms, or its failures, such as3 ERR · 1,191, with an amber border. Each branch label shows its volume, such as412 / 24 h. Counts and times only, no message content. - Changes: the workflow on screen, unsaved edits included, against the deployed version. Added steps say NEW, changed ones EDITED, and unchanged ones fade. The footer reads, for example,
since v4 · 2 changed · 1 removed. Moving a step is layout, not a change.
Picking Live · 24 h or Changes clears the test run on screen. A new test run switches back to Test run.
The step editor
Click a step to open its editor over the canvas, with the outline still in view. The header shows the step's number, its kind and where it runs (the source, a branch or every message), its name, which you can edit in place, and its status. ↑ and ↓ move to the step before or after. Esc closes the top layer first: the palette, a menu, the command bar or Review & save, then the editor.
The editor has four tabs. Run to here, Run step and Ask Agent sit on the right.
Configure
Configure holds the step's settings in titled sections, each with a short hint. What you see depends on the kind:
- MLLP trigger: Listener (the trigger type, the listener, the tunnel with its live status, the ACK, encoding and duplicate deliveries) and Ordering (Messages from one sender run in arrival order.).
- Filter: Rules, a Field / Operator / Value table with + Add rule and + Add group (All must match. Dropped messages are ACKed and logged as filtered.), then When dropped.
- Router: its branches (Branch, When, Steps) with + Add branch, and its mode.
- Code table: Lookup (the table, with its row count, the key, Write to and On miss, amber while an unknown code fails the step) and Table (its first rows, how many other workflows share it, and Open table).
- Data map: Output and Fields, with Suggest fields. See Data maps.
- SQL lookup, Template and Script: the query, template or code as an editable code block, with Write with Agent.
- Destination: sections that follow its adapter: FHIR (action, auth, success and the queue), HTTP (method, path, success and Headers, edited row by row), storage (bucket, path and format), or any other adapter. A header whose name looks like a credential is write-only: it reads Bearer · secret NAME or hidden · a literal secret, and left empty it keeps its value.
A field that holds an HL7 or JSON path shows what it reads from the current input: = 4W, = (empty), or not in this input in amber. Focusing it lists up to 7 of the input's fields under From the step before · current input, filtered as you type. A Write to field reads new field on the message.
Remove step sits under the sections, for every step but the trigger and the router. It removes the step at once and logs Removed “”. ⌘Z brings it back. Removing a branch's send step asks first, because the whole branch goes.
Data
Data runs this step (Run step) or every step up to it (Run to here) and shows the input and output side by side, with added and changed fields tagged. Nothing is sent. The input comes from Upstream, Bundled, Recent · PHI (the last real message that reached this step), Pinned case or Paste.
Errors & retries
The tab opens with the step's error policy in plain words. A destination shows On error (for example retry, then dead-letter), Max retries, Backoff (exponential · 2 s → 30 min), Timeout and Alert. Other steps show On error, Retries, Timeout, Error branch and Alert.
Errors · last 24 h lists the step's failures, each as {time} and {message control id} · {reason}. Use as input picks that message as the Data tab's input. Replay asks first.
Test cases
The workflow's saved test cases, checked when the tab opens, so each shows Passing or Failing. Each row reads {message type} · pinned {day} · expects …. A case's Run runs every step up to this one with that case as the input. See Save test cases.
Data maps
A data map's input column is headed Input · HL7 fields (or Input · JSON fields). The target column is headed by what the targets write, for example FHIR R4 · Patient, Encounter, or Output fields for plain JSON keys. Click an input field, then a target, to connect them. × unmaps.

Each mapped target's value line shows the value the run writes, through the mapping's own lookups, default, transform and value ops. A code-table lookup reads, for example, F · code table {name}. A value an op can't handle reads the op's message, never the value.
The cog on a row opens its rules. Recent values there lists the values the field took in recent runs, masked. Loading them is audited.
Applying a data map's changes adds lines such as Data map: PID.5.1 → name.family to Review & save's change list.
Choose the test input
The Input picker in the toolbar offers:
| Group | What it holds |
|---|---|
| Bundled samples | Synthetic Demo Health messages with no PHI: ADT^A01 admit and ADT^A08 update, or SIU^S12 appointment for a scheduling workflow. |
| Recent messages · PHI, each view audited | The workflow's recent messages, listed by time, message type and control id only. Running one writes one message.viewed audit entry. |
| Executions · replay the recorded trace | Recent runs. Picking one shows that run's recorded trace, read-only. |
| Pinned test cases | The workflow's test cases. |
| Other | Saved sample and Paste or upload a message…, a message for a test run that isn't saved. |
Choosing any input clears the last test run. Once picked, a bundled sample reads, for example, ADT^A08 update · bundled.
Run a test
Choose Run test (⌘↵). In the Graph view, the test drawer along the bottom opens with a pill, Running, Passed · n steps or Failed at step n, and the line {input} · n steps · unsaved edits included · nothing delivered. The running step glows and the connections it went through show moving dots. Under reduced motion, nothing moves.

The drawer has a chip per step with its status and time. Select one to see its input and output, with a note that says what the step did, for example:
- Parsed 4 segments · ACK AA returned for the trigger.
- 2 fields mapped · 0 empty for a data map.
- Matched for the router.
- No entry for “X” in . On miss: fail step, NACK AE. for a code table with no entry.
- Pass-through · configure this step to change the message for a step you haven't configured.
A destination shows what it would send: the request, a validation row such as HL7 v2 · 0 issues or FHIR R4 · 0 issues, its header names (never their values) and Dry run · not sent (for storage, Dry run · not written). A step after a failed step says it never received the message. A full run marks the steps on branches the message didn't take as SKIPPED.
Beside the data: Open step, Run this step only, Pin as test case, and Fix with Agent after a failure or Explain with Agent after a run that passed. ··· holds Run steps with sample, Save steps as component and Replay a batch. Clear removes the run.
To see a production run, open the workflow with ?replay={execution id}, or pick it under Executions. The drawer shows its recorded trace, read-only, as Recorded · …, and its button reads Replay {HH:mm} {control id}. Re-run with my edits runs the unsaved workflow on the recorded message. A recorded failed trace stays failed after you fix the draft.
The Steps view
Steps draws a channel as a pipeline: the Source card, then a lane per destination with its name and condition (always when it has no filter). After a test run each lane says TAKEN or SKIPPED, each card shows its run status, and every card that ran reads, for example, in 9 → out 10 fields · 1 changed, or in 9 fields → stopped · … when it failed. Data on a card opens a compact input → output view.

- The + after each card (Add a step here) opens the step palette at that point: after the Source, before the router; after a destination's steps, before its send.
- Clicking a card opens its editor over the pipeline. × or Esc closes it.
- The column on the right shows the same workflow as a small read-only graph (Graph · same workflow · click a node). Clicking a node opens that step. When the Agent is open, it sits under that graph.
The Steps view keeps the Sample message panel, with Replace, and the Test run panel at its foot. See Test with sample messages.
The Agent in the builder
Agent in the toolbar, or ⌘J, opens the Agent. In the Graph view it sits beside the canvas, which then ends 360 px from the right. In the Steps view it sits under the small graph. It names what it is working on, step 3 · Location → facility or whole workflow, and offers the chips Explain this step (or Explain workflow), Suggest data-map fields, Write a template and Generate from description.
Everything the Agent does in the builder lands in the draft. It never saves, deploys or sends anything.
- Suggest data-map fields lists the mappings the Agent proposes, as paths only, never values, with Add fields. Adding them opens the data map with the new rows highlighted.
- After a failed test run, the Agent opens on a card naming the failed step and its error, masked as the drawer masks it. When a code table has no entry for a value, Pass unknown codes through changes only the draft and runs the test again from step 1.
- A change the Agent drafts from your own words becomes an unsaved edit: Drafted a change for “…” on . It's in the step editor as an unsaved edit; run a test before you save.
- Ask Agent in the step editor, and Write with Agent and Suggest fields in its sections, send a request built from the step.
- A draft that has never been deployed can listen before its first deploy. When the Agent's Open in builder card brings you here, Open MLLP listener : on ? asks first; Open listener starts it. The builder then reads MLLP listener : is open on · messages held until the first deploy, and the first deploy runs the held messages in arrival order. Close listener stops it and keeps what it held. Operators and admins only. See Live changes ask first.
With AI off on the engine, none of these show. See The Agent.
Review and save
Save, ⌘S or Review & save in the command bar opens Review & save · v:
- Changes since v: added (+), removed (−) and edited (~) steps, a rename, the trigger and new wiring. Layout and title edits only or No changes since v when there's nothing else.
- What changed: a note, for example
e.g. Map the new 5 East ward, kept with the version. - Test cases: every saved case runs against the edits on screen, nothing sent. Each row shows Running…, then Passing or Failing.

Save as draft saves a new version as a draft. Production keeps running the deployed version until a new one is deployed. Save and deploy v is for admins and stays grey until every test case passes and no step needs setup. It saves, asks a second admin to approve the new version and opens the Versions page, which says Needs a second admin's approval first, then Approved · ready to deploy. It never deploys on its own. Components and templates offer only Save as draft. See Test, version and deploy.
PHI in the builder
PHI is masked by default everywhere in the builder, for every role: the Data Map, the Sample message panel, the field rules and their Recent values, test runs (the drawer, Run step and Run to here), the live proof, the Errors & retries tab and its errors, and test cases pinned from real messages. A sample you paste is masked too, once it is saved. Masking keeps the message's shape: segment names, field paths and JSON keys stay readable, names keep their initials, ids their first two characters, dates read ••••-••-••, and other values •••. You can still map, filter and test on masked data.
To see the values, choose Show PHI and pick a reason: Troubleshooting, Patient request or Audit. The engine writes a phi.revealed audit entry with the reason and a keyed hash of the patient, never a value, before it sends anything. If that entry can't be written, the values stay masked. Hide PHI masks them again, and a new run or a new sample starts masked. Viewers see Show PHI disabled.
- The bundled synthetic samples have no PHI and are shown as they are.
- A test case pinned from a real message is marked as one and read masked. Its input reads Saved test input · from a real message, masked. A masked run can't be pinned or saved as a test case until you reveal it.
- Recent · PHI and a recent message in the Input picker are audited as
message.viewedon every read.
Every reveal shows on the audit log's PHI access tab. See Audit log.
Viewers
Viewers can look but not edit. A viewer opens steps read-only: the settings are disabled with the title Viewers can look but not edit, a note says why, and code blocks stay readable. Run step, Run to here, Remove step, Pin as test case and the other editing buttons are disabled with the same title. The + buttons, the palette, Tidy layout, Run test, Save and Reset to an empty workflow are hidden. A viewer can still switch a step's tabs, use Ask Agent to explain a step, pick a bundled sample in the Input picker (real messages stay out of reach) and use the command bar's Steps group.
Keyboard and the command bar
| Keys | Action |
|---|---|
| ⌘S | Review & save |
| ⌘↵ | Run test |
| ⌘Z, ⇧⌘Z | Undo, redo (a text field keeps its own ⌘Z) |
| ⌘K | The builder's command bar |
| ⌘J | The Agent, as everywhere in the engine |
| Esc | Close the top layer |
Use Ctrl instead of ⌘ on Windows and Linux. The command bar lists Actions (including Add a step… and Overlay: live traffic, 24 h / Overlay: test run), Input (one Use per bundled sample, with (fails at step ) after a run with it failed) and Steps, filtered as you type.
Links into the builder
A link to a workflow's Build tab can act when the builder loads:
| Parameter | What it does |
|---|---|
run=1 | Runs one test. With input=, on that input: bundled:adt-a01, saved, recent:{execution id} or case:{id}. Without one, on the bundled sample. Ignored for viewers. |
tour=builder | Starts the builder tour from step 1, even if you've seen it. |
step={step id} | Opens that step's editor. |
replay={execution id} | Shows that run's recorded trace in the drawer. |
For example, https://engine.example.test/workflows/wf_7c21e0?tab=build&run=1&input=bundled:adt-a01. The builder then drops run, input, tour and step from the address, so a reload doesn't act again.
Troubleshooting
| Problem | Fix |
|---|---|
| Save and deploy stays grey | A test case fails or a step needs setup. Review & save says which. You can still Save as draft. |
| A step in the palette is greyed out | The workflow can't hold it at that point. Read the reason under it. |
Values show as ••• | PHI is masked by default. Choose Show PHI with a reason, or test with a bundled sample. |
| Show PHI is disabled | You're a viewer, or the run sent for real and can't be fetched again. |
| Pin as test case is refused | The run is masked. Reveal it first, or run the bundled sample. |
| A filter rule says it read a masked value | The rule read a masked value, so it can't say pass or fail. Reveal the sample or test with a bundled sample. |
| Generate with Agent and Fix with Agent are missing | AI is off on this engine. |