Trouble with Groups in Network Diagrams

0 votes
asked Feb 16 in Bug by owenfunkhouser (120 points)

Using the following code, PlantUML is not creating 3 distinct groups but instead overlapping the boxes on top of each other. Is there a way to fix this or is this a bug?

@startuml

!include <office/Servers/application_server>

!include <office/Servers/database_server>

nwdiag {

  group {

    description = "Demo 1";

    color = "#FFaaaa";

    DEMO1_PCoIP;

    DEMO1_Client;

  }

  group {

    description = "Demo 2";

    color = "#aaaaFF";

    DEMO2_PCoIP;

    DEMO2_Client;

  }

  group {

    description = "Demo 3";

    color = "#aaFFaa";

    DEMO3_PCoIP;

    DEMO3_Client;

  }

  network DEMO_VLAN {

    DEMO1_PCoIP;

    DEMO2_PCoIP;

    DEMO3_PCoIP;

  }

  network PCoIP_VLAN {

    DEMO1_PCoIP;

    DEMO1_Client;

    DEMO2_PCoIP;

    DEMO2_Client;

    DEMO3_PCoIP;

    DEMO3_Client;

  }

}

@enduml

commented Feb 16 by The-Lu (31,200 points)

Hello O. and PlantUML team,

It is a bug, here is a minimal example:

For 2 group that is OK, but as soon as there are 3 groups that is KO:

@startuml
nwdiag {
  group {
    web01;
    db01;
  }
  group {
    web02;
    db02;
  }
  group {
    web03;
    db03;
  }

  network dmz {
      web01;
      web02;
      web03;
  }
  network internal {
      web01;
      db01 ;
      web02;
      db02 ;
      web03;
      db03;
  }
}
@enduml


During testing, here are also some other observed errors:

1/ "Forget to set a network" test

@startuml
nwdiag {
  group {
    web01;
    db01;
  }
  group {
    web02;
    db02;
  }
  group {
    web03;
    db03;
  }

  network dmz {
      web01;
      web02;
      web03;
  }
}
@enduml

→ will generate a 'java.lang.NullPointerException', instead of saying 'db01, db02, db02 are not defined'

2/ Order test (if you define network before group!)

@startuml
nwdiag {

  network dmz {
      web01;
      web02;
      web03;
  }
  network internal {
      web01;
      db01 ;
      web02;
      db02 ;
      web03;
      db03;
  }

  group {
    web01;
    db01;
  }
  group {
    web02;
    db02;
  }
  group {
    web03;
    db03;
  }

}
@enduml

→ will generate also a 'java.lang.NullPointerException', contrary to the original nwdiag site that generates a good diagram.

3/ other test:

nwdiag {

  group {
    web01;
    db01;
  }
  group {
    web02;
    db02;
  }
  group {
    web03;
    db03;
  }    
    
  network dmz {
      web01;
      web05;
      web03;
  }
  network internal {
      web01;
      db01 ;
      web02;
      db02 ;
      web03;
      db03;
  }

}

→ will generate also a 'java.lang.NullPointerException', contrary to the original nwdiag site that generates a good diagram.

Thanks for your support wink,
Regards,
Th.

commented Jul 24 by The-Lu (31,200 points)

Hello all,

Thanks PlantUML team for the correction of the other observed errors:

1/ "Forget to set a network" test: OK

2/ Order test (if you define network before group!) : OK

3/ other test: ~OK/KO (group KO) [web05 must be outside any group]

Then awaiting the correction on the group issues,
Regards,
Th.

commented Jul 24 by The-Lu (31,200 points)

3/ with this order that is good... wink

  network dmz {
      web01;
      web03;
      web05;

  }

1 Answer

0 votes
answered Sep 12 by The-Lu (31,200 points)

Hello O.,

With last version (V1.2021.10), we can now observed the expected result:


enlightenedFor me that is better, but a bit very too straight (a little shift between each network will be perhaps appreciate [in order to transform opposite layout on an pseudo alternate layout...] )
→ I create this request: 

If that can help,
Regards,
Th.

...