Workflow diagram template: map decisions, owners and exceptions
A workflow diagram template turns a bounded task into named actions, answerable decisions and explicit outcomes. Fill in the branch labels and responsible roles before connecting executable nodes. The worked template below maps CSV import triage: determine a parsing profile, quarantine structurally inconsistent files, or prepare a mapping manifest without writing destination records.
By Ai Flowi · Published
Choose the process boundary and its outputs
This map starts with a frozen copy of a synthetic CSV file and ends with one of three artifacts: a prepared mapping manifest, a quarantine report or an unresolved-profile note. Importing the records belongs to a separate process. A manifest therefore means the proposed mapping is ready to inspect, not that any row has been inserted.
The earlier request-intake map covers correction and human review; this template instead separates file interpretation from structural acceptance and destination mapping.
Before drawing, write the decisions as questions with observable answers. “File looks fine” cannot identify the checks that selected a route. “Does every parsed record have the declared number of columns?” can. Freeze the file reference and parsing profile together: changing the delimiter midway produces a different interpretation of the same bytes and invalidates the earlier width check.
Copy the editable workflow diagram
Copy this Mermaid source into an existing editor that supports Mermaid. The rectangles are actions, diamonds are questions and rounded endpoints name the resulting artifacts. These labels describe an authored process; they are not claims about built-in CSV import controls in AI Flowi Workflow.
flowchart TD
A([Frozen file copy]) --> B[Identify parsing profile]
B --> C{Exactly one profile established?}
C -- Yes --> D[Inspect parsed record widths]
C -- No --> F[Profile analyst resolves interpretation]
F --> G{Explicit profile established?}
G -- Yes --> D
G -- No --> H([Held: unresolved profile note])
D --> E{All record widths consistent?}
E -- No --> Q([Quarantine report])
E -- Yes --> M[Record explicit column mapping]
M --> P([Mapping manifest prepared])
The analyst route is bounded: if a profile cannot be established during this triage, record the uncertainty and stop. Do not keep guessing until one parser accepts the file. Quarantine retains the frozen input and the locations of structural discrepancies; it is not a command to delete records or discard the original file.
Fill the decision and responsibility table
| Action | Responsible role | Decision evidence | Output |
|---|---|---|---|
| Freeze input | Import operator | File reference and immutable working copy | Identifiable input for all later checks |
| Identify profile | Import operator | Declared encoding, delimiter, quoting and header policy | One established profile or analyst assignment |
| Resolve ambiguity | Profile analyst | Source export specification and candidate interpretations | Explicit profile or unresolved-profile note |
| Inspect structure | Import operator | Expected column count compared with each parsed record | Consistent result or quarantine report naming discrepancies |
| Map columns | Mapping maintainer | Established profile, header positions and target field meanings | Manifest linking each source column to its proposed destination field |
Column mapping needs a separate artifact because equal widths do not prove equal meanings. A three-column file ordered reference, message, version cannot inherit a manifest written for reference, version, message. Preserve source positions as well as header labels; duplicate labels otherwise make a name-only mapping ambiguous.
Repair an orphan branch and a missing responsibility
BEFORE
Identify profile -> Inspect widths -> Map columns [role missing] -> End
Identify profile -> Ambiguous -> [no destination]
AFTER
Ambiguous profile -> Profile analyst -> Explicit profile or held note
Established profile -> Inspect every record -> Quarantine or column mapping
Consistent structure -> Mapping maintainer -> Prepared manifest
The draft’s ambiguous branch stops without preserving the candidate interpretations. Repair it by naming the profile analyst and the held outcome. Also replace the generic end box with the manifest artifact and assign its creation to the mapping maintainer. A reader can now identify what work remains when parsing succeeds but mapping has not yet been recorded.
Walk a synthetic file through the repaired map. Its declared profile uses UTF-8 text, a comma delimiter, double-quoted fields and a header row. One message contains a comma inside quotes. Counting commas in the raw line would falsely report an extra column; inspecting records under the stated quoting rules preserves the intended three fields. Another record genuinely has only two fields, so the entire batch reaches the quarantine report before mapping. No partial destination write is part of this map.
After a corrected file arrives, freeze it as a new input and repeat the checks. Do not overwrite the prior quarantine evidence or apply its verdict to the new bytes. If the replacement is structurally consistent, the mapping maintainer records the source positions and target meanings in the manifest. That artifact can feed a separately designed import process.
Check branch coverage without executing an import
- Trace a declared profile with consistent records to the prepared manifest; confirm that the endpoint names an artifact, not a completed import.
- Trace missing or conflicting profile information to the analyst. Exercise both established and unresolved answers.
- Trace one inconsistent parsed record to quarantine. Check that the report keeps its record location and expected width.
- Use a quoted delimiter and a quoted line break as examples: records need not correspond to physical lines.
- Check duplicate headers and changed column order at mapping. Structural consistency alone must not select an old mapping.
These are tabletop coverage checks. A data flow diagram can separately trace which file fields enter a store; this chart records which process outcome follows each interpretation decision.
Represent one routing decision in AI Flowi Workflow
Status: documented. Condition is documented in the catalogue; not production-tested by Ai Flowi.
The Condition reference owns its interface; this exercise represents only the structural-result branch, after an external inspection has established the result.
example configuration, not a recorded test
Prepare your AI Flowi Workflow account and a synthetic JSON inspection artifact. Set Condition’s data_input to that artifact, key_name to width_state, operator to
and equalscompare_value to consistent. Inspect both routing outputs using one consistent and one inconsistent fixture. No provider account or API key is required for this standalone routing check; later provider usage requires your own credentials and separate billing.
The expected output is the artifact on the selected branch. Condition does not parse the CSV or generate a quarantine report here. Check a missing width_state as a distinct unresolved input before connecting actions; do not infer that the comparison validates the inspection source.
What are the limits of the workflow diagram template?
Use this template for file-level triage before import. It does not specify partial acceptance, parallel parsing, destination transactions or formal BPMN semantics. If a business needs to accept good records while isolating bad ones, define how record identities, batch totals and rejected-record reports reconcile before changing the whole-file quarantine policy.