That's happening because the line start1_5 -> start2_1;
in the first subgraph is defining start2_1
in that subgraph. You need to define start1_5
in the first subgraph but leave it unconnected until after you define start2_1
in the second subgraph.
digraph BigProcess {
graph [ label="Some big process" ]
subgraph clusterSubProcess1 {
graph [ label="Subprocess one", color="red" ]
start1_1 -> start1_2;
start1_2 -> start1_3a;
start1_2 -> start1_3b;
start1_3a -> start1_4;
start1_3b -> start1_5;
start1_4 -> start1_1;
start1_5;
}
subgraph clusterSubProcess2 {
graph [ label="Subprocess two", color="blue" ]
start2_1 -> start2_2;
start2_2 -> start2_3a;
start2_2 -> start2_3b;
start2_3a -> start2_4;
start2_3b -> start2_5;
start2_4 -> start2_1;
start2_5 -> end1;
}
//Now connect the nodes in the two different subgraphs
start1_5 -> start2_1;
}