Add Native BPMN 2.0 Support to Mermaid.js
Proposal
Mermaid.js should add native support for Business Process Model and Notation (BPMN 2.0) because it is the dominant standard for business process modeling, widely adopted in both research and industry. Despite Mermaid's growing adoption, it currently has no support for BPMN, leaving a significant gap for business analysts, software engineers, and researchers who need to embed formal process diagrams in Markdown documentation and version-controlled repositories.
A prototype DSL and initial implementation already exist (we are preparing a scientific reference paper right now : Emrich, A., Hollax, J. (2025). "Domain-Specific Languages for Business Process Modeling: Mermaid Diagrams for BPMN", DFKI), demonstrating the feasibility of integrating BPMN into Mermaid's architecture using its existing plugin conventions (detector, parser, renderer, shapes).
Use Cases
The BPMN diagram type could be used for:
- Academic publishing: Embedding formal process diagrams directly in Markdown or LaTeX documents for research papers and theses.
- Business process documentation: Allowing analysts to author BPMN diagrams alongside textual descriptions without switching tools.
- Model-Driven Software Engineering (MDSE): Using BPMN models as preliminary artifacts in information systems development workflows.
- LLM-assisted modeling: Mermaid's text-based DSL is machine-readable and has been shown to be generatable by large language models, enabling AI-assisted BPMN diagram creation.
- Version-controlled documentation: Embedding BPMN diagrams in GitHub READMEs, wikis, and changelogs for auditability and team collaboration.
Screenshots
Syntax
Basic process with exclusive gateway:
bpmn
startEvent[type:event,subtype:none,behaviour:start,label:,lane:,pool:]
task[type:task,subtype:,label:Review Request,lane:,pool:]
exclusiveGateway[type:gateway,subtype:exclusive,markers:(),label:Approved?,lane:,pool:]
endEvent1[type:event,subtype:none,behaviour:end,label:Approved,lane:,pool:]
endEvent2[type:event,subtype:none,behaviour:end,label:Rejected,lane:,pool:]
startEvent --> task --> exclusiveGateway
exclusiveGateway -[type:control,labelLabel:Yes]-> endEvent1
exclusiveGateway -[type:control,labelLabel:No]-> endEvent2Process with pools and lanes:
bpmn
pool Customer
pool Shop
startEvent[type:event,subtype:none,behaviour:start,label:,pool:Customer]
task[type:task,label:Place Order,pool:Customer]
task[type:task,label:Process Order,pool:Shop]
endEvent[type:event,subtype:none,behaviour:end,label:,pool:Shop]
startEvent --> task
task -[type:message]-> task
task --> endEventSupported elements include: start/end events (all subtypes), tasks (abstract + subtypes: send, receive, user, manual, service, script, business rule), all gateway types (exclusive, parallel, inclusive, event-based, complex), intermediate events, sequence/message flows, subprocesses (expanded/collapsed), call activities, pools, lanes, and boundary events.
Implementation
I will try and implement it myself.
Source: mermaid-js/mermaid