#7699·mermaid

为 Mermaid.js 添加原生 BPMN 2.0 支持

作者: andreas-emrich创建于 2026年5月2日更新于 2026年9月28日
标签Type: EnhancementContributor neededStatus: ApprovedType: New DiagramRequired Grooming

基本流程带有独占网关:

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]-> endEvent2

流程带有池和通道:

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 --> endEvent

支持的元素包括: start/end

内容来源: mermaid-js/mermaid