Skip to main content

Visualizations

Workflows4s provides two visualization modes for representing workflows: BPMN and Mermaid Flowchart. Each mode has its strengths and use cases. Both options are considered experimental, and they are subject to change.

Visualization Modes Overview

ModeDescriptionGood ForLimitations
BPMN

Leverages the Business Process Model and Notation (BPMN) standard, widely recognized in workflow and process modeling domains. Requires the workflows4s-bpmn module for conversion and rendering.

  • Standardized format for workflow representation
  • Integration into BPMN-compatible tools
  • Basic auto-layout capabilities
  • Weaker integration ecosystem compared to modern alternatives
  • Additional dependency required: workflows4s-bpmn
  • Rendering as image requires 3rd-party, community-provided tool
Mermaid Flowchart

Renders workflows as Mermaid flowcharts using built-in support in workflows4s-core. Provides more flexibility, relies on custom workflow representation.

  • Better support within tools like GitLab, Markdown, and documentation platforms
  • Good auto-layout support
  • Rendering as image through official mermaid-cli
  • Non-standardized format

Usage Examples

BPMN

val wio: WIO[?, ?, ?, ?] = PullRequestWorkflow.workflow
val bpmnModel = BPMNConverter.convert(wio.toProgress.toModel, "process")
val bpmnXml = Bpmn.convertToString(bpmnModel)

pull-request.svg

Mermaid Flowchart

val wio: WIO[?, ?, ?, ?] = PullRequestWorkflow.workflow
val mermaidString = MermaidRenderer.renderWorkflow(wio.toProgress)