You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using nested hierarchical workflow with more than 2 levels of hierarchy, in case where a workflow is instantiated several times below the first level of hierarchy, without any aliasing of the workflow name, the exported DAG with mermaid does not reflect the nextflow dag.
Steps to reproduce the problem
Consider the following MWE, where the sub_sub workflow is instantiated twice by two different sub_x workflows in the top level workflow.
The exported mermaid graph has the following code:
flowchart TB
subgraph sub_1
subgraph sub_sub
v0([a])
end
end
subgraph " "
v1["-"]
v3["-"]
end
subgraph sub_2
subgraph sub_sub
v2([a])
end
end
v0 --> v1
v2 --> v3
Which seems fine on paper. Unfortunately, mermaid can have a unique subgraph with name sub_sub, and as a result, when displaying the graph, two instances of a are displayed within sub_1::sub_sub, while the subgraph of sub_2 remains empty.
Environment
Nextflow version: 24.10.4
Java version: openjdk 11.0.20 2023-07-18
Operating system: Linux
Bash version: GNU bash, version 5.1.8(1)-release (x86_64-redhat-linux-gnu)
The text was updated successfully, but these errors were encountered:
kdesnos
changed the title
Invalid Mermaid DAG with nested workflow
Invalid Mermaid DAG with nested workflows
Mar 4, 2025
Bug report
Expected behavior and actual behavior
When using nested hierarchical workflow with more than 2 levels of hierarchy, in case where a workflow is instantiated several times below the first level of hierarchy, without any aliasing of the workflow name, the exported DAG with mermaid does not reflect the nextflow dag.
Steps to reproduce the problem
Consider the following MWE, where the
sub_sub
workflow is instantiated twice by two differentsub_x
workflows in the top level workflow.Program output
The exported mermaid graph has the following code:
Which seems fine on paper. Unfortunately, mermaid can have a unique subgraph with name
sub_sub
, and as a result, when displaying the graph, two instances ofa
are displayed withinsub_1::sub_sub
, while the subgraph ofsub_2
remains empty.Environment
The text was updated successfully, but these errors were encountered: