BPMN → Diagram Interchange, laid out by Graphviz
Lay out a BPMN that carries no Diagram Interchange (bpmn_to_svg.py beside this file, moved from .github/skills/bpmn_layout/ by bean folio-assistant-tgaj): one Graphviz cluster per participant, the coordinates written back into the BPMN as <bpmndi:BPMNDiagram>, and Graphviz’s own SVG. cat-harness-tools’ render:bpmn draws only the DI a file already has (bpmn-js does not lay out), so this is the step before it for a DAK process written, or imported, without one.
| Tool | bpmn-graphviz-layout |
| IRI | http://smart.who.int/base/tools/bpmn-graphviz-layout.jsonld |
| part of | http://smart.who.int/base/smart-base.jsonld |
| type | https://litlfred.github.io/cat-harness/v0/ns/Tool |
| declared by | smart-base |
| invoked | shell |
| qa | qa-reports |
Skills it satisfies
A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.
smart-base-tools
Source: smart-base/skills/content/authoring-who-smart-guidelines/smart-base-tools.md.
Also satisfied by: extract-dak, kg-extract-dak, bpmn-to-fsh, bpmn-validate, kg-extract-bpmn, kg-extract-citations, kg-extract-dmn, kg-extract-l3.
The skill declares no I/O contract (schemas/skills/smart-base-tools/{input,output}.schema.json).
Inputs and outputs
Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.
| port | type | required | description | constraint | |
|---|---|---|---|---|---|
| in | bpmn | RepoPath | yes | A BPMN 2.0 file, with or without DI. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
| out | bpmn | RepoPath | The BPMN with a Graphviz-placed <bpmndi:BPMNDiagram> (--bpmn). | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| out | svg | RepoPath | Graphviz’s drawing (--svg); not bpmn-js’s, so not the published picture. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
Processes and tasks
Steps this Tool can carry out, because each names a skill it satisfies:
| process | step | lane | via skill |
|---|---|---|---|
| SMART Guideline end to end | 3 · Choose L2 dependencies (WHO / jurisdiction DAKs) | Authoring agent | smart-base-tools |
| SMART Guideline end to end | 4 · Create / adapt L2 DAK assets | Authoring agent | smart-base-tools |
| SMART Guideline end to end | 5 · Choose L3 dependencies (WHO / jurisdiction IGs) | Authoring agent | smart-base-tools |
| SMART Guideline end to end | 6 · Produce L3 assets | Authoring agent | smart-base-tools |
How it is deployed and reached
- Command line. From the repository root:
python3 smart-base/L2-bpmn/tools/bpmn-graphviz-layout/bpmn_to_svg.py <file.bpmn> [--bpmn <out.bpmn>] [--svg <out.svg>] [--dot <out.dot>]. - GitHub Actions. No workflow in this checkout runs its command.
As an API: its operation in the OpenAPI document and the MCP tool list of its layer.
| install | none |
| runtime | python3, graphviz |
| network | no |
| when to choose it | |
|---|---|
| when | A BPMN has no Diagram Interchange, so render:bpmn would draw it blank, and a first layout is wanted before an author tidies it (bpmn:detangle). |
| limits | A first layout, not the finished one: it does not meet bpmn-authoring’s readability rules (fixed task size, label placement, lane order); run bun run cat bpmn:detangle --write and look at render:bpmn’s picture after it. It parses with the standard library’s ElementTree, so it is for files an author holds, not untrusted input. |
| cost | Seconds; needs Graphviz dot on the PATH. |
What it is made of
Linked data
The Tool is published as its own JSON-LD document at its IRI, http://smart.who.int/base/tools/bpmn-graphviz-layout.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.
{
"@context": "http://smart.who.int/base/smart-base.context.jsonld",
"@id": "http://smart.who.int/base/tools/bpmn-graphviz-layout.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "http://smart.who.int/base/smart-base.jsonld",
"name": "bpmn-graphviz-layout",
"title": "BPMN → Diagram Interchange, laid out by Graphviz",
"description": "Lay out a BPMN that carries no Diagram Interchange (`bpmn_to_svg.py` beside this file, moved from `.github/skills/bpmn_layout/` by bean folio-assistant-tgaj): one Graphviz cluster per participant, the coordinates written back into the BPMN as `<bpmndi:BPMNDiagram>`, and Graphviz's own SVG. cat-harness-tools' `render:bpmn` draws only the DI a file already has (bpmn-js does not lay out), so this is the step before it for a DAK process written, or imported, without one.",
"install": {
"none": true
},
"invoke": {
"shell": "python3 smart-base/L2-bpmn/tools/bpmn-graphviz-layout/bpmn_to_svg.py <file.bpmn> [--bpmn <out.bpmn>] [--svg <out.svg>] [--dot <out.dot>]"
},
"io": {
"inputs": [
{
"name": "bpmn",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "A BPMN 2.0 file, with or without DI.",
"required": true
}
],
"outputs": [
{
"name": "bpmn",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The BPMN with a Graphviz-placed `<bpmndi:BPMNDiagram>` (`--bpmn`)."
},
{
"name": "svg",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "Graphviz's drawing (`--svg`); not bpmn-js's, so not the published picture."
}
]
},
"satisfies": [
"smart-base-tools"
],
"requirements": {
"runtime": [
"python3",
"graphviz"
],
"network": false
},
"selection": {
"when": "A BPMN has no Diagram Interchange, so `render:bpmn` would draw it blank, and a first layout is wanted before an author tidies it (`bpmn:detangle`).",
"limits": "A first layout, not the finished one: it does not meet `bpmn-authoring`'s readability rules (fixed task size, label placement, lane order); run `bun run cat bpmn:detangle --write` and look at `render:bpmn`'s picture after it. It parses with the standard library's ElementTree, so it is for files an author holds, not untrusted input.",
"cost": "Seconds; needs Graphviz `dot` on the PATH."
}
}