What is BPMN-TXT?
BPMN-TXT is a text-based Domain Specific Language (DSL) for defining BPMN 2.0 business processes. It provides a human-readable alternative to editing XML directly, making process definitions easier to write, review, and version control.
Why BPMN-TXT?
The Problem with BPMN XML
BPMN 2.0 XML is verbose and hard to read:
<bpmn:process id="Process_1" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" name="Start">
<bpmn:outgoing>Flow_1</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:task id="Task_1" name="Do Something">
<bpmn:incoming>Flow_1</bpmn:incoming>
<bpmn:outgoing>Flow_2</bpmn:outgoing>
</bpmn:task>
<bpmn:endEvent id="EndEvent_1" name="End">
<bpmn:incoming>Flow_2</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="Task_1"/>
<bpmn:sequenceFlow id="Flow_2" sourceRef="Task_1" targetRef="EndEvent_1"/>
</bpmn:process> The BPMN-TXT Solution
The same process in BPMN-TXT:
process: Process_1
start: StartEvent_1
name: "Start"
task: Task_1
name: "Do Something"
end: EndEvent_1
name: "End"
flow: Flow_1
from: StartEvent_1
to: Task_1
flow: Flow_2
from: Task_1
to: EndEvent_1 Key Features
- YAML-like Syntax - Familiar, indentation-based structure
- BPMN 2.0 Parity - Supports all standard BPMN elements
- Automatic Layout - Generates diagram coordinates automatically
- Multiple Outputs - Export to BPMN XML or JSON
- CLI Tool - Compile, watch, and validate from command line
- TypeScript API - Use programmatically in Node.js
Supported Elements
| Category | Elements |
|---|---|
| Events | Start, End, Intermediate (Catch/Throw), Boundary |
| Tasks | User, Service, Script, Send, Receive, Manual, Business Rule |
| Gateways | Exclusive, Parallel, Inclusive, Event-Based, Complex |
| Containers | Process, Pool, Lane, Subprocess |
| Flows | Sequence Flow, Message Flow |
| Data | Data Object, Data Store |
| Artifacts | Text Annotation, Group |
Next Steps
- Getting Started - Install and create your first process
- CLI Usage - Learn the command-line interface
- Syntax Reference - Complete syntax documentation