WBS Diagrams

+1 vote
asked Feb 27, 2019 in Wanted features by nicamlg (140 points)

Hello.

I know WBS (Work Breakdown Structure) is not really part of UML (or I think so...), but it is a common diagram in project documentation, and as such, I am not pleased having to depend on extra tools, usually mouse-oriented, to draw such a "simple" diagram.

Currently I use Activity-beta as a substitute, but it is not really what it should be.

It could be something like this:

@startwbs / @startuml + wbs  (like it is with salt)

[title, skimparams etc...]

skinparam wbsToplevelBackground    darkgrey
skinparam wbsSecondlevelBackground lightgrey
skinparam wbsThirdlevelBackground  grey

/' Alternate (more sane!) skinning targeting '/
skinparam wbsBackground<<C3L4>> LightGreen

' Upper level

:Top Level; /' similar syntax to activity beta '/

/' Since there can only be one element as first level AFAIK,
   all other elements go to the second level, nested by splitting
'/

split "Level Two First Column"  as C1
split "Level Two Second Column" as C2

split C1 "Column 1 Third Level"  as C1L3
split C1 "Column 1 Fourth Level" as C1L4
split C2 "Column 2 Third Level"  as C2L3
split C3 "Column 3 Fourth Level" as C3L3
split C3 "Column 3 Fourth Level" as C3L4

/'
  Now, the contents:

'/

C1L3 {
  :Job 1;
  :Job 2;

  :C1L4/  /' Reference to the Next Sub division '/
}

/'
  Here, it can be further nested, or it can take the
  the contents from another definition block with its name
'/

C1L4 {
  :Sub Job 1-3 One;
  :Sub Job 1-3 Two;
}

/' full new column '/
C4 as "Fourth Column" {
  :Sub Job at last Column ;
  :Another Sub Job;
  C4L2 as "Last Column" {
    :Fourth-level job here
     at the last column;
  }
}

C2L3 {
/' And so on '/
}
@enduml/@endwbs

The skinparam could target WBS sub-levels to customize the appearance, and rows should be vertically top-aligned.

 

1 Answer

0 votes
answered Feb 28, 2019 by plantuml (294,960 points)

We could think about it.

However, you forget to give some important element for us : how do you expect the diagram to be rendered ?

Something like this ?

It would be nice if you could post some very basic drawings and the corresponding text diagrams for each diagram.

Thanks!

commented Mar 14, 2019 by nicamlg (140 points)
Hi again.

I've got a problem with another test:

@startwbs
+ Project
    + Part One
        + Task 1.1
        - LeftTask 1.2
        + Task 1.3
    + Part Two
        + Task 2.1
        + Task 2.2
            -_ Task 2.2.1 To the left boxless
            -_ Task 2.2.2 To the Left boxless
            +_ Task 2.2.3 To the right boxless
@endwbs

(it is tabbed, so there's only a character per indent level)

Shouldn't ' Part Two'  be on the right of the 'Project'?

(using lastest beta: 1.2019.04beta2)
commented Mar 14, 2019 by plantuml (294,960 points)
With last beta http://beta.plantuml.net/plantuml.jar you can now have

@startwbs
+ Project
++ Part A
+++ Part AA
++++ Part AAA
+++++ Part AAAA
++++++ Part AAAAA
@endwbs

> Shouldn't ' Part Two'  be on the right of the 'Project'?
Well, this is a question of taste. We have decided of put "Project" exactly in the middle of the image.
If you really need it, we could add a setting to put "Project" in the middle of "Part One" and "Part Two"
Maybe the more difficult part is to find a nice name for this eventual setting...
Any suggestion is welcome !
commented Mar 15, 2019 by nicamlg (140 points)
edited Mar 15, 2019 by nicamlg
Hi.

> If you really need it, we could add a setting to put "Project" in the middle of
> "Part One" and "Part Two"
> Maybe the more difficult part is to find a nice name for this eventual setting...
> Any suggestion is welcome !

What I meant is that it is, after all, a graph, and if there are two branches, there should be located on each side of the root element...

If you want to reuse a token, maybe "direction" could do. However, I woud suggest "distribution", accepting "tree" or "even" for my proposed one, and "sequential" or "column" for the current distribution.

 ' either as a skinparam parameter
  skinparam wbsDistribution tree

' or as a command:
  distribution column

' which can be made more semantic
  distribute as tree

' which in turn means more readable
distribute as column[s]  ' using the plural is optional, just for semantic correctness
commented Mar 20, 2019 by ingo (120 points)
@startwbs
+ Project
++ Part A
+++ Part AA
++++ Part AAA
+++++ Part AAAA
++++++ Part AAAAA
@endwbs

This looks just like how I would envision an outline in plantuml. The rendering looks just like an outline where root and first children of root are projected horizontal.

The mindmap is a "bunch of oulines" sharing the same root, but rendered al horizontal.

Would it be something to add directionality to the mindmap and with that cover all above versions?

outline:
@startmindmap
vertical
* Project
++ Part A
+++ Part AA
++++ Part AAA
+++++ Part AAAA
@endmindmal

wbs:
@startmindmap
vertical
horizontal * Project
horizontal ++ Part A
+++ Part AA
++++ Part AAA
+++++ Part AAAA
@endmindmal

ingo
commented Nov 9, 2019 by rolandog (100 points)

Hello everyone. I've been using PlantUML for a while, and I've been loving the great new features that are being proposed and developed. Thanks to everyone for making PlantUML such a wonderful tool to use.

I know this feature is still prone to changes, but I have a suggestion regarding the handling of whitespace (if it is still planned to accept indentation through whitespace, per the last example of the main site).

One of the main website's examples is really close to what could be considered Pandoc's implementation of Markdown (as my account is new, I'll refrain from posting links). My suggestion would be to handle the whitespace in a similar as they noted in the manual:

List items may include other lists. In this case the preceding blank line is optional. The nested list must be indented to line up with the first non-space character after the list marker of the containing list item.

* fruits
  + apples
    - macintosh
    - red delicious
  + pears
  + peaches
* vegetables
  + broccoli
  + chard

So, in essence, this would allow for PlantUML users to copy/paste a Markdown list (and indent it, and add a root node if only a single node is permitted) in order to generate the WBS or the MindMap, while retaining compatibility with the previous single-space indentation allowed.

This would allow, I think, compatibility for classifying two modes to define the structure: through OrgMode or Creole Wiki Syntax if the second item has no whitespace, and through Markdown-compatible handling if it does.

This is just a suggestion that I'm hoping is somehow useful for faster creation of diagrams through flexibility of acceptable inputs, but I understand if it isn't implementable.

Again, thanks for everyone's efforts in making PlantUML so great!

...